summary refs log tree commit diff
path: root/doc/Makefile.am
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2010-11-03 23:47:21 +0100
committerAlexander Barton <alex@barton.de>2010-11-03 23:47:21 +0100
commit30b6e72b96e8092f3a0884b1a02eb403b8a4b12c (patch)
tree3bef0596f6421a9942595bd5caa584a6f5d76db8 /doc/Makefile.am
parent4a197638688d4e39d57f201ac735a38c9fc5a260 (diff)
downloadngircd-30b6e72b96e8092f3a0884b1a02eb403b8a4b12c.tar.gz
ngircd-30b6e72b96e8092f3a0884b1a02eb403b8a4b12c.zip
Fix up generation and distribution of sample-ngircd.conf
- Add generated sample-ngircd.conf to new .gitignore file,
- refactor Makefile.am to generate sample-ngircd.conf on "make all",
  to clean it up on "make clean", and to install it to the correct place.
- Make sure path names in sample-ngircd.conf are separated by "/".
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am28
1 files changed, 20 insertions, 8 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 51fab0ee..4b20e701 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -17,27 +17,39 @@
 
 SUFFIXES = .tmpl
 
+static_docs = FAQ.txt GIT.txt Protocol.txt Platforms.txt README-AUX.txt \
+	README-BeOS.txt RFC.txt Services.txt SSL.txt Zeroconf.txt \
+	HowToRelease.txt
+
+doc_templates = sample-ngircd.conf.tmpl
+
+generated_docs = sample-ngircd.conf
+
+toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
+
 SUBDIRS = src
 
-EXTRA_DIST = FAQ.txt GIT.txt Protocol.txt Platforms.txt README-AUX.txt \
-	README-BeOS.txt RFC.txt Services.txt SSL.txt Zeroconf.txt \
-	HowToRelease.txt sample-ngircd.conf
+EXTRA_DIST = $(static_docs) $(doc_templates)
+
+CLEANFILES = $(generated_docs)
 
 maintainer-clean-local:
 	rm -f Makefile Makefile.in
 
-documents = $(EXTRA_DIST) ../AUTHORS ../COPYING ../ChangeLog ../INSTALL \
-	../NEWS ../README
+all: $(generated_docs)
 
-install-data-hook: $(documents)
+install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
 	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
 	if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
-	  $(INSTALL) -m 600 -c $(srcdir)/sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; \
+	  $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; \
 	 fi
 	$(mkinstalldirs) $(DESTDIR)$(docdir)
-	for f in $(documents); do \
+	for f in $(static_docs) $(toplevel_docs); do \
 	  $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
 	 done
+	for f in $(generated_docs); do \
+	  $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
+	 done
 
 uninstall-hook:
 	rm -rf $(DESTDIR)$(docdir)