#
# ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+# Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
#
# Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
# der GNU General Public License (GPL), wie von der Free Software Foundation
# Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
# der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
#
-# $Id: Makefile.am,v 1.10 2002/09/16 10:35:06 alex Exp $
-#
-SUBDIRS = en
+.tmpl:
+ sed \
+ -e s@:ETCDIR:@${sysconfdir}@ \
+ <$< >$@
+
+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 PAM.txt
+
+doc_templates = sample-ngircd.conf.tmpl
+
+generated_docs = sample-ngircd.conf
+
+toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
-EXTRA_DIST = CVS.txt FAQ.txt Protocol.txt README-AUX.txt \
- README-BeOS.txt RFC.txt sample-ngircd.conf
+SUBDIRS = src
+
+EXTRA_DIST = $(static_docs) $(doc_templates)
+
+CLEANFILES = $(generated_docs)
maintainer-clean-local:
rm -f Makefile Makefile.in
-install-data-hook:
+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 $(srcdir)/sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; \
- fi
+ $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; \
+ fi
+ $(mkinstalldirs) $(DESTDIR)$(docdir)
+ 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)
+
+srcdoc:
+ make -C src srcdoc
# -eof-