tidied up m_relay.c
[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 @SET_MAKE@
29 #### End of system configuration section. ####
30
31 SUBDIRS = ircd ircd/test
32 IRCD_MAKEFILES = Makefile ircd/Makefile ircd/test/Makefile
33
34 all: build
35
36 .PHONY: server build depend install
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 root-clean:
47         @for i in '*.orig' '.*.orig' '\#*' '*~' '.*~' '*.bak' '.*.bak' core; do\
48                 echo "Removing $$i"; \
49                 REMOVE_FILES="`find . -name "$$i" -print`"; \
50                 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
51         done || true
52
53 sub-clean: ${IRCD_MAKEFILES}
54         @for i in ${SUBDIRS}; do \
55                 echo "Cleaning $$i..."; \
56                 cd $$i; ${MAKE} clean; cd ..;\
57         done
58
59 clean: root-clean sub-clean
60
61 root-distclean: root-clean
62         @for i in '*.rej'; do \
63                 echo "Removing $$i"; \
64                 REMOVE_FILES="`find . -name "$$i" -print`"; \
65                 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
66         done || true
67
68 sub-distclean: ${IRCD_MAKEFILES}
69         @for i in ${SUBDIRS}; do \
70                 echo "Dist-cleaning $$i..."; \
71                 cd $$i; ${MAKE} distclean; cd ..;\
72         done
73
74 distclean: root-distclean sub-distclean
75         ${RM} -f Makefile config.h config.log config.cache config.status \
76                 stamp-h
77
78 maintainer-clean: root-distclean ${IRCD_MAKEFILES}
79         @for i in ${SUBDIRS}; do \
80                 echo "maintainer-cleaning $$i..."; \
81                 cd $$i; ${MAKE} maintainer-clean; cd ..;\
82         done
83
84 depend: ${IRCD_MAKEFILES}
85         @for i in ${SUBDIRS}; do \
86                 echo "Making dependencies in $$i..."; \
87                 cd $$i; ${MAKE} depend; cd ..; \
88         done
89
90 install: ${IRCD_MAKEFILES}
91         test -d ${prefix} || mkdir ${prefix}
92         @for i in ${SUBDIRS}; do \
93                 echo "Installing $$i..."; \
94                 cd $$i; ${MAKE} install; cd ..; \
95         done
96
97 uninstall: ${IRCD_MAKEFILES}
98         @for i in ${SUBDIRS}; do \
99                 echo "Uninstalling $$i..."; \
100                 cd $$i; ${MAKE} uninstall; cd ..; \
101         done
102
103 ${srcdir}/aclocal.m4: acinclude.m4
104         cd ${srcdir} && aclocal
105
106 ${srcdir}/configure: configure.in aclocal.m4
107         cd ${srcdir} && autoconf
108
109 # autoheader might not change config.h.in, so touch a stamp file.
110 ${srcdir}/config.h.in: stamp-h.in
111 ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h
112         cd ${srcdir} && autoheader
113         echo timestamp > ${srcdir}/stamp-h.in
114
115 config.h: stamp-h
116 stamp-h: config.h.in config.status
117         ./config.status
118
119 Makefile: Makefile.in config.status
120         ./config.status
121
122 ircd/Makefile: ircd/Makefile.in config.status
123         ./config.status
124
125 ircd/test/Makefile: ircd/test/Makefile.in config.status
126         ./config.status
127
128 config.status: configure
129         ./config.status --recheck
130
131 # Some versions of 'make' do not support the .PHONY target :
132 FORCE:
133
134 # Indent all headers and source files:
135 indent:
136         @test "`indent --version`" = "GNU indent 2.1.0" || \
137           (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1);
138         VERSION_CONTROL=none indent include/*.h ircd/*.c
139