commit - 160f728530806385dbeee398a20fe5eac7318c5a
commit + 4cf65b973c780880047b0ad4e77e95cf7315cb0f
blob - 92e019b832ad1bcd00b3ca0bdd4f4fe929a72472
blob + 3bf68fb4a22991bfde217b124b956d80d4f4907b
--- doc/Makefile.am
+++ doc/Makefile.am
install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
- if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
- $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; \
+ @if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
+ make install-config; \
fi
$(mkinstalldirs) $(DESTDIR)$(docdir)
for f in $(static_docs) $(toplevel_docs); do \
$(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
done
+install-config:
+ $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf
+ @echo; \
+ echo " ** NOTE: Installed sample configuration file:"; \
+ echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
+ echo
+
uninstall-hook:
rm -rf $(DESTDIR)$(docdir)
+ @if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
+ make uninstall-config; \
+ else \
+ echo; \
+ echo " ** NOTE: Not uninstalling changed configuration file:"; \
+ echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
+ echo; \
+ fi
+uninstall-config:
+ rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
+
srcdoc:
make -C src srcdoc
+.PHONY: install-config uninstall-config srcdoc
+
# -eof-