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