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