- $(top_srcdir)/mkinstalldirs $(etcdir)
- for file in $(INSTALL_ETC_FILES); do \
- echo $$file; \
- if [ -f $(etcdir)/$$file ]; then \
- mv $(etcdir)/$$file $(etcdir)/$$file.prev; \
- fi; \
- $(INSTALL_DATA) $(srcdir)/$$file $(etcdir)/$$file; \
- if diff $(etcdir)/$$file.prev $(etcdir)/$$file; then \
- rm $(etcdir)/$$file.prev; \
+ $(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`; \
+ echo "Installing $$file..."; \
+ if [ -f $(DESTDIR)$(etcdir)/$$file ]; then \
+ mv $(DESTDIR)$(etcdir)/$$file $(DESTDIR)$(etcdir)/$$file.prev; \
+ $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \
+ if diff $(DESTDIR)$(etcdir)/$$file.prev $(DESTDIR)$(etcdir)/$$file; then \
+ rm $(DESTDIR)$(etcdir)/$$file.prev; \
+ else \
+ echo; \
+ echo " Previous version of $$file saved as $$file.prev due\c";\
+ echo " to diffs."; \
+ echo " Please merge any local config changes into the new\c"; \
+ echo " $$file."; \
+ echo; \
+ fi; \
+ else \
+ $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \