X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=doc%2FMakefile.am;h=5913c94ee1fdd05fbd34808c80d3e11646e79cb3;hp=c153fece01813cc61955fdfc20846ed08f579f4f;hb=c97fb2e93e9c7d66b1ce70fa681a762d1f430521;hpb=f173a974bee5181d8131519ed07b3b5261bf6366 diff --git a/doc/Makefile.am b/doc/Makefile.am index c153fece..5913c94e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors +# Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -10,15 +10,30 @@ # .tmpl: - sed \ - -e s@:ETCDIR:@${sysconfdir}@ \ + $(AM_V_GEN)sed \ + -e "s@:ETCDIR:@${sysconfdir}@" \ + -e "s@:DOCDIR:@${docdir}@" \ <$< >$@ SUFFIXES = .tmpl -static_docs = Bopm.txt FAQ.txt GIT.txt HowToRelease.txt Modes.txt PAM.txt \ - Platforms.txt Protocol.txt README-AUX.txt README-BeOS.txt \ - README-Interix.txt RFC.txt SSL.txt Services.txt +static_docs = \ + Bopm.txt \ + Capabilities.txt \ + Commands.txt \ + Contributing.txt \ + FAQ.txt \ + HowToRelease.txt \ + Modes.txt \ + PAM.txt \ + Platforms.txt \ + Protocol.txt \ + README-AUX.txt \ + README-BeOS.txt \ + README-Interix.txt \ + RFC.txt \ + Services.txt \ + SSL.txt doc_templates = sample-ngircd.conf.tmpl @@ -38,11 +53,11 @@ maintainer-clean-local: all: $(generated_docs) 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; \ + $(MKDIR_P) -m 755 $(DESTDIR)$(sysconfdir) + @if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \ + make install-config; \ fi - $(mkinstalldirs) $(DESTDIR)$(docdir) + $(MKDIR_P) -m 755 $(DESTDIR)$(docdir) for f in $(static_docs) $(toplevel_docs); do \ $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \ done @@ -50,10 +65,30 @@ install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs) $(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-