File: Makefile.am

package info (click to toggle)
ngircd 27-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,792 kB
  • sloc: ansic: 19,545; sh: 5,566; perl: 699; makefile: 463; xml: 129
file content (92 lines) | stat: -rw-r--r-- 2,305 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# ngIRCd -- The Next Generation IRC Daemon
# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# Please read the file COPYING, README and AUTHORS for more information.
#

.tmpl:
	$(AM_V_GEN)sed \
	    -e "s@:ETCDIR:@${sysconfdir}@" \
	    -e "s@:DOCDIR:@${docdir}@" \
	    <$< >$@

SUFFIXES = .tmpl

static_docs = \
	Bopm.txt \
	Capabilities.txt \
	Commands.txt \
	Container.md \
	Contributing.txt \
	FAQ.md \
	HowToRelease.txt \
	Modes.txt \
	PAM.txt \
	Platforms.txt \
	Protocol.txt \
	README-AUX.txt \
	README-BeOS.txt \
	README-Interix.txt \
	RFC.txt \
	Services.txt \
	SSL.md

doc_templates = sample-ngircd.conf.tmpl

generated_docs = sample-ngircd.conf

toplevel_docs = ../AUTHORS.md ../COPYING ../ChangeLog ../INSTALL.md ../NEWS ../README.md

SUBDIRS = src

EXTRA_DIST = $(static_docs) $(doc_templates)

CLEANFILES = $(generated_docs)

maintainer-clean-local:
	rm -f Makefile Makefile.in

all: $(generated_docs)

install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
	$(MKDIR_P) -m 755 $(DESTDIR)$(sysconfdir)
	@if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
	  ${MAKE} install-config; \
	 fi
	$(MKDIR_P) -m 755 $(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

install-config:
	$(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf
	@echo; \
	 echo " ** NOTE: Installed sample configuration file:"; \
	 echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
	 echo

uninstall-hook:
	rm -rf $(DESTDIR)$(docdir)
	@if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
	  ${MAKE} uninstall-config; \
	 else \
	  echo; \
	  echo " ** NOTE: Not uninstalling changed configuration file:"; \
	  echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
	  echo; \
	 fi

uninstall-config:
	rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf

.PHONY: install-config uninstall-config

# -eof-