#
# Makefile for apcupsd etc directory
#
# Copyright (C) 1999-2002 Riccardo Facchetti <riccardo@master.oasi.gpa.it>
#

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

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

all-targets:

clean: targetclean

install:
	@echo "Installing apcupsd.conf..."; \
	srcconf=$(topdir)/platforms/etc/apcupsd.conf; \
	if test -f $(DESTDIR)$(sysconfdir)/apcupsd.conf; then \
	  dstconf=apcupsd.conf.new; \
	  echo " Found old apcupsd.conf, installing new file as $$dstconf"; \
	else \
	  dstconf=apcupsd.conf; \
	fi; \
	$(INSTALL_DATA) $$srcconf $(DESTDIR)$(sysconfdir)/$$dstconf; \
	for src in changeme commfailure commok offbattery onbattery; do \
	   if test -f $(DESTDIR)$(sysconfdir)/$$src; then \
	       echo " Found old $$src moving it to $$src.orig"; \
	       $(RMF) $(DESTDIR)$(sysconfdir)/$$src.orig; \
	       mv $(DESTDIR)$(sysconfdir)/$$src $(DESTDIR)$(sysconfdir)/$$src.orig; \
	   fi; \
	   $(INSTALL_SCRIPT) $$src $(DESTDIR)$(sysconfdir)/$$src; \
	done

uninstall:

distclean: targetdistclean
	$(RMF) apcupsd.conf changeme commfailure commok offbattery onbattery
	$(RMF) Makefile
	@rm -rf CVS

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


syntax highlighted by Code2HTML, v. 0.9.1