1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
include $(top_srcdir)/build/Makefile.am.common
AUTOMAKE_OPTIONS = foreign subdir-objects
ACLOCAL_AMFLAGS = -I build/m4
if CONFIGFILE_ENABLED
install-exec-local:
if [ ! -f $(DESTDIR)$(sysconfdir)/snoopy.ini ]; then \
echo ; \
echo "Installing configuration file: $(DESTDIR)$(sysconfdir)/snoopy.ini" ; \
echo ; \
if [ ! -e $(DESTDIR)$(sysconfdir) ]; then \
install -d $(DESTDIR)$(sysconfdir) ; \
fi ; \
install -m 644 snoopy.ini $(DESTDIR)$(sysconfdir)/snoopy.ini ; \
else \
if diff -u snoopy.ini $(DESTDIR)$(sysconfdir)/snoopy.ini; then \
echo ; \
echo "No changes to configuration file are required: $(DESTDIR)$(sysconfdir)/snoopy.ini" ; \
echo ; \
else \
install -m 644 snoopy.ini $(DESTDIR)$(sysconfdir)/snoopy.ini.NEW ; \
echo ; \
echo "Existing config file: $(DESTDIR)$(sysconfdir)/snoopy.ini" ; \
echo " New config file: $(DESTDIR)$(sysconfdir)/snoopy.ini.NEW" ; \
echo ; \
echo "WARNING: CONFIGURATION FILE CHANGES NEED MANUAL REVIEW" ; \
echo ; \
fi ; \
fi ; \
if [ -f $(DESTDIR)$(sysconfdir)/snoopy.ini ]; then \
if [ -x $(DESTDIR)$(sysconfdir)/snoopy.ini ]; then \
chmod 644 $(DESTDIR)$(sysconfdir)/snoopy.ini ; \
fi ; \
fi ; \
if [ -f $(DESTDIR)$(sysconfdir)/snoopy.ini.NEW ]; then \
if [ -x $(DESTDIR)$(sysconfdir)/snoopy.ini.NEW ]; then \
chmod 644 $(DESTDIR)$(sysconfdir)/snoopy.ini.NEW ; \
fi ; \
fi ;
uninstall-local:
if [ -f $(DESTDIR)$(sysconfdir)/snoopy.ini ]; then \
echo ; \
echo "Removing configuration file: $(DESTDIR)$(sysconfdir)/snoopy.ini" ; \
echo ; \
rm -f $(DESTDIR)$(sysconfdir)/snoopy.ini ; \
fi ;
endif
|