]> arthur.barton.de Git - ngircd-alex.git/blob - doc/Makefile.am
Merge branch 'automake-am11-am12'
[ngircd-alex.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         $(AM_V_GEN)sed \
14             -e s@:ETCDIR:@${sysconfdir}@ \
15             <$< >$@
16
17 SUFFIXES = .tmpl
18
19 static_docs = \
20         Bopm.txt \
21         Capabilities.txt \
22         Contributing.txt \
23         FAQ.txt \
24         GIT.txt \
25         HowToRelease.txt \
26         Modes.txt \
27         PAM.txt \
28         Platforms.txt \
29         Protocol.txt \
30         README-AUX.txt \
31         README-BeOS.txt \
32         README-Interix.txt \
33         RFC.txt \
34         Services.txt \
35         SSL.txt
36
37 doc_templates = sample-ngircd.conf.tmpl
38
39 generated_docs = sample-ngircd.conf
40
41 toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
42
43 SUBDIRS = src
44
45 EXTRA_DIST = $(static_docs) $(doc_templates)
46
47 CLEANFILES = $(generated_docs)
48
49 maintainer-clean-local:
50         rm -f Makefile Makefile.in
51
52 all: $(generated_docs)
53
54 install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
55         $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
56         @if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
57           make install-config; \
58          fi
59         $(mkinstalldirs) $(DESTDIR)$(docdir)
60         for f in $(static_docs) $(toplevel_docs); do \
61           $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
62          done
63         for f in $(generated_docs); do \
64           $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
65          done
66
67 install-config:
68         $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf
69         @echo; \
70          echo " ** NOTE: Installed sample configuration file:"; \
71          echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
72          echo
73
74 uninstall-hook:
75         rm -rf $(DESTDIR)$(docdir)
76         @if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
77           make uninstall-config; \
78          else \
79           echo; \
80           echo " ** NOTE: Not uninstalling changed configuration file:"; \
81           echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
82           echo; \
83          fi
84
85 uninstall-config:
86         rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
87
88 srcdoc:
89         make -C src srcdoc
90
91 .PHONY: install-config uninstall-config srcdoc
92
93 # -eof-