1 # Makefile for the Undernet IRC Daemon.
2 # Copyright (C) 1997, Carlo Wood <carlo@runaway.xs4all.nl>
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)
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.
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
19 #### Start of system configuration section. ####
28 #### End of system configuration section. ####
34 .PHONY: server build depend install config update diff patch export update
35 # Some versions of make give a warning when this is empty:
39 @for i in ${SUBDIRS}; do \
40 echo "Building $$i..."; \
41 cd $$i; ${MAKE} build; cd ..; \
45 @echo "*************************************************************"
46 @echo "* The \"make config\" step is now DEPRECATED. Most *"
47 @echo "* server options are now configurable via the configuration *"
48 @echo "* file using F-lines; the rest are specified on the command *"
49 @echo "* line to \"./configure\". To aid the transition, a shell *"
50 @echo "* script has been provided to generate the necessary *"
51 @echo "* configuration lines for you. You may run this script by *"
52 @echo "* typing \"tools/transition\"; please pay attention to its *"
53 @echo "* output. This message will be removed for the next major *"
54 @echo "* release of ircu. *"
55 @echo "*************************************************************"
58 @for i in '*.orig' '.*.orig' '\#*' '*~' '.*~' '*.bak' '.*.bak' core; do\
59 echo "Removing $$i"; \
60 REMOVE_FILES="`find . -name "$$i" -print`"; \
61 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
65 @for i in ${SUBDIRS}; do \
66 echo "Cleaning $$i..."; \
67 cd $$i; ${MAKE} clean; cd ..;\
70 clean: root-clean sub-clean
72 root-distclean: root-clean
73 @for i in '*.rej'; do \
74 echo "Removing $$i"; \
75 REMOVE_FILES="`find . -name "$$i" -print`"; \
76 test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \
80 @for i in ${SUBDIRS}; do \
81 echo "Dist-cleaning $$i..."; \
82 cd $$i; ${MAKE} distclean; cd ..;\
85 distclean: root-distclean sub-distclean
86 ${RM} -f Makefile config.h config.log config.cache config.status \
89 maintainer-clean: root-distclean
90 @for i in ${SUBDIRS}; do \
91 echo "maintainer-cleaning $$i..."; \
92 cd $$i; ${MAKE} maintainer-clean; cd ..;\
96 @for i in ${SUBDIRS}; do \
97 echo "Making dependencies in $$i..."; \
98 cd $$i; ${MAKE} depend; cd ..; \
102 @for i in ${SUBDIRS}; do \
103 echo "Installing $$i..."; \
104 cd $$i; ${MAKE} install; cd ..; \
108 @for i in ${SUBDIRS}; do \
109 echo "Uninstalling $$i..."; \
110 cd $$i; ${MAKE} uninstall; cd ..; \
113 ${srcdir}/aclocal.m4: acinclude.m4
114 cd ${srcdir} && aclocal
116 ${srcdir}/configure: configure.in aclocal.m4
117 cd ${srcdir} && autoconf
119 # autoheader might not change config.h.in, so touch a stamp file.
120 ${srcdir}/config.h.in: stamp-h.in
121 ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h
122 cd ${srcdir} && autoheader
123 echo timestamp > ${srcdir}/stamp-h.in
126 stamp-h: config.h.in config.status
129 Makefile: Makefile.in config.status
132 doc/Makefile: doc/Makefile.in config.status
135 ircd/Makefile: ircd/Makefile.in config.status
138 config.status: configure
139 ./config.status --recheck
141 # Some versions of 'make' do not support the .PHONY target :
144 # Indent all headers and source files:
146 @test "`indent --version`" = "GNU indent 2.1.0" || \
147 (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1);
148 VERSION_CONTROL=none indent include/*.h ircd/*.c