]> arthur.barton.de Git - ngircd.git/blob - doc/Makefile.am
1a792c5f95396e5fd1e2b894364a0e713b08f87c
[ngircd.git] / doc / Makefile.am
1 #
2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 # Please read the file COPYING, README and AUTHORS for more information.
10 #
11
12 .tmpl:
13         sed \
14             -e s@:ETCDIR:@${sysconfdir}@ \
15             <$< >$@
16
17 SUFFIXES = .tmpl
18
19 static_docs = \
20         Bopm.txt \
21         FAQ.txt \
22         GIT.txt \
23         HowToRelease.txt \
24         Modes.txt \
25         PAM.txt \
26         Platforms.txt \
27         Protocol.txt \
28         README-AUX.txt \
29         README-BeOS.txt \
30         README-Interix.txt \
31         RFC.txt \
32         Services.txt \
33         SSL.txt
34
35 doc_templates = sample-ngircd.conf.tmpl
36
37 generated_docs = sample-ngircd.conf
38
39 toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
40
41 SUBDIRS = src
42
43 EXTRA_DIST = $(static_docs) $(doc_templates)
44
45 CLEANFILES = $(generated_docs)
46
47 maintainer-clean-local:
48         rm -f Makefile Makefile.in
49
50 all: $(generated_docs)
51
52 install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
53         $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
54         if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
55           $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; \
56          fi
57         $(mkinstalldirs) $(DESTDIR)$(docdir)
58         for f in $(static_docs) $(toplevel_docs); do \
59           $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
60          done
61         for f in $(generated_docs); do \
62           $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
63          done
64
65 uninstall-hook:
66         rm -rf $(DESTDIR)$(docdir)
67
68 srcdoc:
69         make -C src srcdoc
70
71 # -eof-