2004-05-09 Michael Poole <mdpoole@troilus.org>
[ircu2.10.12-pk.git] / Makefile.in
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 adns_subdir = @ADNS_SUBDIR@
29 @SET_MAKE@
30 #### End of system configuration section. ####
31
32 SUBDIRS = doc ${adns_subdir} ircd
33 IRCD_MAKEFILES = Makefile doc/Makefile adns/Makefile ircd/Makefile
34
35 all: build
36
37 .PHONY: server build depend install config update diff patch export update
38 # Some versions of make give a warning when this is empty:
39 .SUFFIXES: .dummy
40
41 build: ${IRCD_MAKEFILES}
42         @for i in ${SUBDIRS}; do \
43                 echo "Building $$i..."; \
44                 cd $$i; ${MAKE} build; cd ..; \
45         done
46
47 config:
48         @echo "*************************************************************"
49         @echo "* The \"make config\" step is now DEPRECATED.  Most           *"
50         @echo "* server options are now configurable via the configuration *"
51         @echo "* file using F-lines; the rest are specified on the command *"
52         @echo "* line to \"./configure\".  To aid the transition, a shell    *"
53         @echo "* script has been provided to generate the necessary        *"
54         @echo "* configuration lines for you.  You may run this script by  *"
55         @echo "* typing \"tools/transition\"; please pay attention to its    *"
56         @echo "* output.  This message will be removed for the next major  *"
57         @echo "* release of ircu.                                          *"
58         @echo "*************************************************************"
59
60 root-clean:
61         @for i in '*.orig' '.*.orig' '\#*' '*~' '.*~' '*.bak' '.*.bak' core; do\
62                 echo "Removing $$i"; \
63                 REMOVE_FILES="`find . -name "$$i" -print`"; \
64                 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
65         done || true
66
67 sub-clean: ${IRCD_MAKEFILES}
68         @for i in ${SUBDIRS}; do \
69                 echo "Cleaning $$i..."; \
70                 cd $$i; ${MAKE} clean; cd ..;\
71         done
72
73 clean: root-clean sub-clean
74
75 root-distclean: root-clean
76         @for i in '*.rej'; do \
77                 echo "Removing $$i"; \
78                 REMOVE_FILES="`find . -name "$$i" -print`"; \
79                 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
80         done || true
81
82 sub-distclean: ${IRCD_MAKEFILES}
83         @for i in ${SUBDIRS}; do \
84                 echo "Dist-cleaning $$i..."; \
85                 cd $$i; ${MAKE} distclean; cd ..;\
86         done
87
88 distclean: root-distclean sub-distclean
89         ${RM} -f Makefile config.h config.log config.cache config.status \
90                 stamp-h
91
92 maintainer-clean: root-distclean ${IRCD_MAKEFILES}
93         @for i in ${SUBDIRS}; do \
94                 echo "maintainer-cleaning $$i..."; \
95                 cd $$i; ${MAKE} maintainer-clean; cd ..;\
96         done
97
98 depend: ${IRCD_MAKEFILES}
99         @for i in ${SUBDIRS}; do \
100                 echo "Making dependencies in $$i..."; \
101                 cd $$i; ${MAKE} depend; cd ..; \
102         done
103
104 install: ${IRCD_MAKEFILES}
105         test -d ${prefix} || mkdir ${prefix}
106         test -d ${prefix}/include || mkdir ${prefix}/include
107         @for i in ${SUBDIRS}; do \
108                 echo "Installing $$i..."; \
109                 cd $$i; ${MAKE} install; cd ..; \
110         done
111
112 uninstall: ${IRCD_MAKEFILES}
113         @for i in ${SUBDIRS}; do \
114                 echo "Uninstalling $$i..."; \
115                 cd $$i; ${MAKE} uninstall; cd ..; \
116         done
117
118 ${srcdir}/aclocal.m4: acinclude.m4
119         cd ${srcdir} && aclocal
120
121 ${srcdir}/configure: configure.in aclocal.m4
122         cd ${srcdir} && autoconf
123
124 # autoheader might not change config.h.in, so touch a stamp file.
125 ${srcdir}/config.h.in: stamp-h.in
126 ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h
127         cd ${srcdir} && autoheader
128         echo timestamp > ${srcdir}/stamp-h.in
129
130 config.h: stamp-h
131 stamp-h: config.h.in config.status
132         ./config.status
133
134 Makefile: Makefile.in config.status
135         ./config.status
136
137 doc/Makefile: doc/Makefile.in config.status
138         ./config.status
139
140 ircd/Makefile: ircd/Makefile.in config.status
141         ./config.status
142
143 config.status: configure
144         ./config.status --recheck
145
146 # Some versions of 'make' do not support the .PHONY target :
147 FORCE:
148
149 # Indent all headers and source files:
150 indent:
151         @test "`indent --version`" = "GNU indent 2.1.0" || \
152           (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1);
153         VERSION_CONTROL=none indent include/*.h ircd/*.c
154
155 # do a cvs update
156 update:
157         cvs -z9 update