iff they are identical to the installed default configuration files.
Added scripts/remove-cfg.sh to do the safe removal because we need that
functionality in many Makefiles.
Made installed mime.conf removal safe. We were removing it without checking
for modifications.
Added commands to remove the following installed default configuration
files: cachemgr.conf.default and msntauth.conf.default.
rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
done; \
fi \
- done; \
+ done;
+ @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh $(RM) $(DESTDIR)$(DEFAULT_STYLESHEET)
rm -f $(DESTDIR)$(DEFAULT_STYLESHEET).default
# undocumented hack. You can use this target to create multi-lingual
# Uncomment and customize the following to suit your needs:
#
+MSNTAUTH_CONF = $(sysconfdir)/msntauth.conf
libexec_PROGRAMS = msnt_auth
$(COMPILE) -DSYSCONFDIR=\"$(sysconfdir)\" -c $(srcdir)/confload.c -o $@
install-data-local:
- @if test -f $(DESTDIR)$(sysconfdir)/msntauth.conf ; then \
- echo "$@ will not overwrite existing $(DESTDIR)$(sysconfdir)/msntauth.conf" ; \
+ @if test -f $(DESTDIR)$(MSNTAUTH_CONF) ; then \
+ echo "$@ will not overwrite existing $(DESTDIR)$(MSNTAUTH_CONF)" ; \
else \
- echo "$(INSTALL_DATA) $(srcdir)/msntauth.conf.default $(DESTDIR)$(sysconfdir)/msntauth.conf" ; \
- $(INSTALL_DATA) $(srcdir)/msntauth.conf.default $(DESTDIR)$(sysconfdir)/msntauth.conf ; \
+ echo "$(INSTALL_DATA) $(srcdir)/msntauth.conf.default $(DESTDIR)$(MSNTAUTH_CONF)" ; \
+ $(INSTALL_DATA) $(srcdir)/msntauth.conf.default $(DESTDIR)$(MSNTAUTH_CONF) ; \
fi
+
+uninstall-local:
+ @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh $(RM) $(DESTDIR)$(MSNTAUTH_CONF)
+ $(RM) -f $(DESTDIR)$(MSNTAUTH_CONF).default
+
-#
-# This file is a Makefile for compiling and installing Cache Manager.
-# Cache Manager is a manager program for Internet Object Cache.
-#
-
-
bin_SCRIPTS = RunCache RunAccel
EXTRA_DIST = AnnounceCache.pl access-log-matrix.pl cache-compare.pl \
cachetrace.pl check_cache.pl convert.configure.to.os2 \
fileno-to-pathname.pl flag_truncs.pl icp-test.pl \
icpserver.pl tcp-banger.pl udp-banger.pl upgrade-1.0-store.pl
+
+dist_noinst_SCRIPTS = remove-cfg.sh
--- /dev/null
+#!/bin/sh
+
+# Removes an configuration file if it is identical to the default file,
+# preventing "make distcheck" failures due to configuration leftovers.
+# Intended to be used for installed configuration files.
+
+remover=$1 # the program to remove a file
+prime=$2 # the configuration file to be removed, including path
+default=$3 # the default configuration filename, including path
+
+# by default, use .default default extension
+if test -z "$default"
+then
+ default="$prime.default"
+fi
+
+# is the primary configuration file present?
+if test -f $prime
+then
+ # is the primary config identical to the default?
+ if diff -q $default $prime > /dev/null
+ then
+ echo " $remover -f $prime";
+ $remover -f $prime;
+ fi
+fi
+
+exit 0
$(mkinstalldirs) $(DESTDIR)$(DEFAULT_LOG_PREFIX)
uninstall-local:
- @if test -f $(DESTDIR)$(DEFAULT_MIME_TABLE) ; then \
- echo "rm -f $(DESTDIR)$(DEFAULT_MIME_TABLE)"; \
- $(RM) -f $(DESTDIR)$(DEFAULT_MIME_TABLE); \
- fi
-
-# Don't automatically uninstall config files
-# @if test -f $(DESTDIR)$(DEFAULT_CONFIG_FILE) ; then \
-# echo "rm -f $(DESTDIR)$(DEFAULT_CONFIG_FILE)"; \
-# $(RM) -f $(DESTDIR)$(DEFAULT_CONFIG_FILE); \
-# fi
+ @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh $(RM) $(DESTDIR)$(DEFAULT_MIME_TABLE)
+ @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh $(RM) $(DESTDIR)$(DEFAULT_CONFIG_FILE)
CLEANFILES = cf_gen_defines.h cf.data cf_parser.h squid.conf.default squid.conf.documented \
globals.cc string_arrays.c repl_modules.cc DiskIO/DiskIOModules_gen.cc \
fi
uninstall-local:
-
-# Don't automatically uninstall config files
-# @if test -f $(DESTDIR)$(DEFAULT_CONFIG_FILE) ; then \
-# echo "rm -f $(DESTDIR)$(DEFAULT_CONFIG_FILE)"; \
-# $(RM) -f $(DESTDIR)$(DEFAULT_CONFIG_FILE); \
-# fi
+ @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh $(RM) $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)
+ $(RM) -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default
DISTCLEANFILES =