-mts.conf: $(srcdir)/mts.conf.in Makefile
- rm -f $@
- $(SED) -e 's,%mailspool%,$(mailspool),' \
- -e 's,%etcdir%,$(etcdir),' \
- -e 's,%masquerade%,$(masquerade),' \
- -e 's,%smtpservers%,$(smtpservers),' < $(srcdir)/mts.conf.in > $@
-
-sendfiles: $(srcdir)/sendfiles.in Makefile
- rm -f $@
- $(SED) -e 's,%libdir%,$(libdir),' < $(srcdir)/sendfiles.in > $@
-
-install: install-files install-scripts
-
-install-files:
- $(top_srcdir)/mkinstalldirs $(etcdir)
- for file in $(DIST_FILES); do \
- if [ -f $(etcdir)/$$file ]; then \
- mv $(etcdir)/$$file $(etcdir)/$$file.old; \
+install: install-etc-files
+
+install-etc-files:
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(etcdir)
+ INSTALL_FILES="$(GENERATED_ETC_FILES)"; \
+ for file in $(STATIC_FILES); do \
+ INSTALL_FILES="$$INSTALL_FILES $(srcdir)/$$file"; \
+ done; \
+ for path in $$INSTALL_FILES; do \
+ file=`basename $$path`; \
+ if [ -f "$(DESTDIR)$(etcdir)/$$file" ]; then \
+ if cmp -s "$$path" "$(DESTDIR)$(etcdir)/$$file" ; then \
+ :; \
+ else \
+ $(INSTALL_DATA) "$$path" "$(DESTDIR)$(etcdir)/$$file.dist"; \
+ echo "$(DESTDIR)$(etcdir)/$$file has local modifications; installing with .dist suffix"; \
+ fi; \
+ else \
+ $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \