]>
Commit | Line | Data |
---|---|---|
189935b1 | 1 | # Makefile for the Undernet IRC Daemon. |
2 | # Copyright (C) 1997, Carlo Wood <carlo@runaway.xs4all.nl> | |
3 | ||
4 | # This program is free software; you can redistribute it and/or modify | |
5 | # it under the terms of the GNU General Public License as published by | |
6 | # the Free Software Foundation; either version 2, or (at your option) | |
7 | # any later version. | |
8 | ||
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. | |
13 | ||
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
17 | # 02111-1307, USA. | |
18 | ||
19 | #### Start of system configuration section. #### | |
20 | ||
21 | prefix = @prefix@ | |
22 | srcdir = @srcdir@ | |
23 | VPATH = @srcdir@ | |
24 | ||
25 | SHELL = @SHPROG@ | |
26 | RM = @RMPROG@ | |
27 | AWK = @AWK@ | |
28 | @SET_MAKE@ | |
29 | #### End of system configuration section. #### | |
30 | ||
31 | SUBDIRS = doc ircd ircd/test | |
32 | IRCD_MAKEFILES = Makefile doc/Makefile ircd/Makefile ircd/test/Makefile | |
33 | ||
34 | all: build | |
35 | ||
36 | .PHONY: server build depend install config update diff patch export update | |
37 | # Some versions of make give a warning when this is empty: | |
38 | .SUFFIXES: .dummy | |
39 | ||
40 | build: ${IRCD_MAKEFILES} | |
41 | @for i in ${SUBDIRS}; do \ | |
42 | echo "Building $$i..."; \ | |
43 | cd $$i; ${MAKE} build; cd ..; \ | |
44 | done | |
45 | ||
46 | config: | |
47 | @echo "*************************************************************" | |
48 | @echo "* The \"make config\" step is now DEPRECATED. Most *" | |
49 | @echo "* server options are now configurable via the configuration *" | |
50 | @echo "* file using F-lines; the rest are specified on the command *" | |
51 | @echo "* line to \"./configure\". To aid the transition, a shell *" | |
52 | @echo "* script has been provided to generate the necessary *" | |
53 | @echo "* configuration lines for you. You may run this script by *" | |
54 | @echo "* typing \"tools/transition\"; please pay attention to its *" | |
55 | @echo "* output. This message will be removed for the next major *" | |
56 | @echo "* release of ircu. *" | |
57 | @echo "*************************************************************" | |
58 | ||
59 | root-clean: | |
60 | @for i in '*.orig' '.*.orig' '\#*' '*~' '.*~' '*.bak' '.*.bak' core; do\ | |
61 | echo "Removing $$i"; \ | |
62 | REMOVE_FILES="`find . -name "$$i" -print`"; \ | |
63 | test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \ | |
64 | done || true | |
65 | ||
66 | sub-clean: ${IRCD_MAKEFILES} | |
67 | @for i in ${SUBDIRS}; do \ | |
68 | echo "Cleaning $$i..."; \ | |
69 | cd $$i; ${MAKE} clean; cd ..;\ | |
70 | done | |
71 | ||
72 | clean: root-clean sub-clean | |
73 | ||
74 | root-distclean: root-clean | |
75 | @for i in '*.rej'; do \ | |
76 | echo "Removing $$i"; \ | |
77 | REMOVE_FILES="`find . -name "$$i" -print`"; \ | |
78 | test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \ | |
79 | done || true | |
80 | ||
81 | sub-distclean: ${IRCD_MAKEFILES} | |
82 | @for i in ${SUBDIRS}; do \ | |
83 | echo "Dist-cleaning $$i..."; \ | |
84 | cd $$i; ${MAKE} distclean; cd ..;\ | |
85 | done | |
86 | ||
87 | distclean: root-distclean sub-distclean | |
88 | ${RM} -f Makefile config.h config.log config.cache config.status \ | |
89 | stamp-h | |
90 | ||
91 | maintainer-clean: root-distclean ${IRCD_MAKEFILES} | |
92 | @for i in ${SUBDIRS}; do \ | |
93 | echo "maintainer-cleaning $$i..."; \ | |
94 | cd $$i; ${MAKE} maintainer-clean; cd ..;\ | |
95 | done | |
96 | ||
97 | depend: ${IRCD_MAKEFILES} | |
98 | @for i in ${SUBDIRS}; do \ | |
99 | echo "Making dependencies in $$i..."; \ | |
100 | cd $$i; ${MAKE} depend; cd ..; \ | |
101 | done | |
102 | ||
103 | install: ${IRCD_MAKEFILES} | |
104 | test -d ${prefix} || mkdir ${prefix} | |
105 | @for i in ${SUBDIRS}; do \ | |
106 | echo "Installing $$i..."; \ | |
107 | cd $$i; ${MAKE} install; cd ..; \ | |
108 | done | |
109 | ||
110 | uninstall: ${IRCD_MAKEFILES} | |
111 | @for i in ${SUBDIRS}; do \ | |
112 | echo "Uninstalling $$i..."; \ | |
113 | cd $$i; ${MAKE} uninstall; cd ..; \ | |
114 | done | |
115 | ||
116 | ${srcdir}/aclocal.m4: acinclude.m4 | |
117 | cd ${srcdir} && aclocal | |
118 | ||
119 | ${srcdir}/configure: configure.in aclocal.m4 | |
120 | cd ${srcdir} && autoconf | |
121 | ||
122 | # autoheader might not change config.h.in, so touch a stamp file. | |
123 | ${srcdir}/config.h.in: stamp-h.in | |
124 | ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h | |
125 | cd ${srcdir} && autoheader | |
126 | echo timestamp > ${srcdir}/stamp-h.in | |
127 | ||
128 | config.h: stamp-h | |
129 | stamp-h: config.h.in config.status | |
130 | ./config.status | |
131 | ||
132 | Makefile: Makefile.in config.status | |
133 | ./config.status | |
134 | ||
135 | doc/Makefile: doc/Makefile.in config.status | |
136 | ./config.status | |
137 | ||
138 | ircd/Makefile: ircd/Makefile.in config.status | |
139 | ./config.status | |
140 | ||
141 | ircd/test/Makefile: ircd/test/Makefile.in config.status | |
142 | ./config.status | |
143 | ||
144 | config.status: configure | |
145 | ./config.status --recheck | |
146 | ||
147 | # Some versions of 'make' do not support the .PHONY target : | |
148 | FORCE: | |
149 | ||
150 | # Indent all headers and source files: | |
151 | indent: | |
152 | @test "`indent --version`" = "GNU indent 2.1.0" || \ | |
153 | (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1); | |
154 | VERSION_CONTROL=none indent include/*.h ircd/*.c | |
155 | ||
156 | # do a cvs update | |
157 | update: | |
158 | cvs -z9 update |