# Makefile template
#
# Copyright (C) 1999-2003 Riccardo Facchetti <riccardo@master.oasi.gpa.it>
#

# Default variables
@VARIABLES@
# TOP source directory.
topdir = @topdir@
top_builddir = $(topdir)

subdirs = etc @DISTNAME@


# Include the default make targets: to be put before the all-targets: rule.
@TARGETS@

all-targets: Makefile

#
# install symlinks after installing the boot script etc etc
#
install-distdir:
	(cd $(DISTNAME); \
	     $(MAKE) "DISTNAME=$(DISTNAME)" "DISTVER=$(DISTVER)" \
		 DESTDIR=$(DESTDIR) install);

install: @INSTALL_DISTDIR@
	@echo "Installing apccontrol script..."
	@if test -f $(DESTDIR)$(sysconfdir)/apccontrol; then \
	   mv -f $(DESTDIR)$(sysconfdir)/apccontrol $(DESTDIR)$(sysconfdir)/apccontrol.orig; \
	   echo " Found old apccontrol moving it to $(DESTDIR)$(sysconfdir)/apccontrol.orig"; \
	fi 
	@if test -f ./$(DISTNAME)/apccontrol; then \
	     $(INSTALL_SCRIPT) -m 744 ./$(DISTNAME)/apccontrol \
		$(DESTDIR)$(sysconfdir)/apccontrol; \
	else \
	     $(INSTALL_SCRIPT) -m 744 ./apccontrol \
		$(DESTDIR)$(sysconfdir)/apccontrol; \
	fi
	(cd etc/; $(MAKE) DESTDIR=$(DESTDIR) install)

#
# uninstall symlinks before removing the boot script etc etc
#
uninstall-distdir:
	(cd $(DISTNAME); \
	    $(MAKE) "DISTNAME=$(DISTNAME)" "DISTVER=$(DISTVER)" \
	       DESTDIR=$(DESTDIR) uninstall);

uninstall: @UNINSTALL_DISTDIR@
	$(RMF) $(DESTDIR)$(sysconfdir)/apccontrol

clean: targetclean

distclean: targetdistclean
	$(RMF) Makefile
	$(RMF) apccontrol
	$(RMF) -r CVS cygwin/CVS cygwin/bin/CVS cygwin/examples/CVS
	$(RMF) -r alpha/CVS darwin/CVS debian/CVS engarde/CVS
	$(RMF) -r etc/CVS freebsd/CVS gentoo/CVS hpux/CVS mandrake/CVS netbsd/CVS
	$(RMF) -r openbsd/CVS redhat/CVS slackware/CVS
	$(RMF) -r sun/CVS suse/CVS unifix/CVS unknown/CVS

# -----------------------------------------------------------------------
# DO NOT DELETE THIS LINE -- make depend depends on it.


syntax highlighted by Code2HTML, v. 0.9.1