- $(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 \
+ if cmp -s "$$path" "$(DESTDIR)$(etcdir)/$$file"; then \
+ echo "$(DESTDIR)$(etcdir)/$$file unchanged, skipped"; \
+ else \
+ $(INSTALL_DATA) "$$path" "$(DESTDIR)$(etcdir)/$$file.dist"; \
+ echo "INFO: $(DESTDIR)$(etcdir)/$$file installed with .dist extension"; \
+ fi; \
+ else \
+ $(INSTALL_DATA) $$path $(DESTDIR)$(etcdir)/$$file; \