# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.


SHELL = @SHELL@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
sysconfdir = @sysconfdir@

mandir = @mandir@

MANFILES = $(MAN1FILES) $(MAN5FILES)
MAN1FILES = ample.1
MAN1PATH = ${mandir}/man1
MAN5FILES = ample.conf.5 ample.html.5
MAN5PATH = ${mandir}/man5

INSTALL = @INSTALL@

all:
	@for i in $(MANFILES); do \
	  echo "Creating man page $$i ..."; \
	  cat $${i}.in | sed 's,@sysconfdir\@,$(sysconfdir),g' > $$i; \
	done

clean:
	rm -f $(MANFILES)

install:
	$(INSTALL) -d $(MAN1PATH) $(MAN5PATH);
	@for i in $(MAN1FILES); do \
	  echo "Installing man page $$i ..."; \
	  $(INSTALL) -m 644 $$i $(MAN1PATH); \
	done
	@for i in $(MAN5FILES); do \
          echo "Installing $$i ..."; \
	  $(INSTALL) -m 644 $$i $(MAN5PATH); \
	done

uninstall:
	@for i in $(MAN1FILES); do \
	  echo "Removing $$i ..."; \
	  rm -f $(MAN1PATH)/$$i; \
	done
	@for i in $(MAN5FILES); do \
	  echo "Removing $$i ..."; \
	  rm -f $(MAN5PATH)/$$i; \
	done

maint-clean:
	rm -f Makefile *~ $(MANFILES)
	
dist-clean:
	rm -rf CVS Makefile *~ $(MANFILES)

.PHONY: all clean install dist-clean maint-clean

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
