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