Author: Isomer <isomer@coders.net>
[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 srcdir=@srcdir@
22 VPATH=@srcdir@
23
24 SHELL=@SHPROG@
25 RM=@RMPROG@
26 AWK=@AWK@
27 @SET_MAKE@
28 #### End of system configuration section. ####
29
30 all: build
31
32 .PHONY: server build depend install config update diff patch export
33 # Some versions of make give a warning when this is empty:
34 .SUFFIXES: .dummy
35
36 build:
37         @if [ ! -f config/config.h ]; then \
38                 $(MAKE) config; \
39         else \
40           for i in config ircd; do \
41                   echo "Building $$i..."; \
42                   cd $$i; ${MAKE} build; cd ..; \
43           done; \
44         fi
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 clean: root-clean
54         @for i in ircd config; do \
55                 echo "Cleaning $$i..."; \
56                 cd $$i; ${MAKE} clean; cd ..;\
57         done
58
59 root-distclean: root-clean
60         @for i in '*.rej'; 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         ${RM} -f Makefile
66
67 distclean: root-distclean
68         @for i in doc ircd config; do \
69                 echo "Dist-cleaning $$i..."; \
70                 cd $$i; ${MAKE} distclean; cd ..;\
71         done
72
73 maintainer-clean: root-distclean
74         @for i in doc ircd config; do \
75                 echo "maintainer-cleaning $$i..."; \
76                 cd $$i; ${MAKE} maintainer-clean; cd ..;\
77         done
78
79 depend:
80         @for i in ircd; do \
81                 echo "Making dependencies in $$i..."; \
82                 cd $$i; ${MAKE} depend; cd ..; \
83         done
84
85 install:
86         @if [ -f ircd/ircd ]; then \
87                 for i in ircd doc; do \
88                         echo "Installing $$i..."; \
89                         cd $$i; ${MAKE} install; cd ..; \
90                 done \
91         else \
92                 echo "First run 'make'"; \
93         fi
94
95 uninstall:
96         @for i in doc ircd; do \
97                 echo "Uninstalling $$i..."; \
98                 cd $$i; ${MAKE} uninstall; cd ..; \
99         done
100
101 config: FORCE
102         @cd config; ${MAKE} config
103         @echo
104         @echo "The Undernet IRC daemon is now hopefully configured for your setup."
105         @echo "Next run 'make' to build the server."
106         @echo
107
108 # Coders: You need GNU make for this to work.
109 Makefile: config/config.status Makefile.in
110         @echo "recreating Makefile"
111         @cd config; \
112         CONFIG_FILES=../Makefile CONFIG_HEADERS= ./config.status > /dev/null
113
114 config/config.status:
115         @cd config; ${MAKE} config.status
116
117 # Some versions of 'make' do not support the .PHONY target :
118 FORCE:
119
120 # Indent all headers and source files:
121 indent:
122         @test "`indent --version`" = "GNU indent 2.1.0" || \
123           (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1);
124         VERSION_CONTROL=none indent include/*.h ircd/*.c