]> jfr.im git - solanum.git/blob - Makefile.in
During installation, don't unconditionally create an empty `modules-old' directory.
[solanum.git] / Makefile.in
1 #************************************************************************
2 #* IRC - Internet Relay Chat, Makefile
3 #* Copyright (C) 1990, Jarkko Oikarinen
4 #*
5 #* This program is free software; you can redistribute it and/or modify
6 #* it under the terms of the GNU General Public License as published by
7 #* the Free Software Foundation; either version 1, or (at your option)
8 #* any later version.
9 #*
10 #* This program is distributed in the hope that it will be useful,
11 #* but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 #* GNU General Public License for more details.
14 #*
15 #* You should have received a copy of the GNU General Public License
16 #* along with this program; if not, write to the Free Software
17 #* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #*
19 #* $Id: Makefile.in 1347 2006-05-17 14:49:13Z nenolod $
20 #*/
21
22 RM=@RM@
23 prefix = @prefix@
24 exec_prefix = @exec_prefix@
25 bindir = @bindir@
26 mandir = @mandir@
27 moduledir = @moduledir@
28 helpdir = @helpdir@
29 confdir = @confdir@
30 logdir = @logdir@
31
32 # Default CFLAGS
33 # CFLAGS = -g -O2 -DNDEBUG
34 CFLAGS = @CFLAGS@
35 # Developers CFLAGS
36 #CFLAGS= -g -O2 -Wunused -Wall -ggdb -pedantic -Wshadow -Wmissing-declarations
37
38 # Default make flags - you may want to uncomment this on a multicpu machine
39 #MFLAGS = -j 4
40
41 #
42 # For developers
43 #CFLAGS= -g -O2 -Wall
44
45 # You may need to define the FD_SETSIZE in order to overrule
46 # the system one.
47 #CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
48 SHELL=/bin/sh
49 # `extensions' must be after `modules' for proper creation of $(moduledir).
50 SUBDIRS=libratbox modules extensions src tools ssld bandb doc help
51 CLEANDIRS = ${SUBDIRS}
52 RSA_FILES=rsa_respond/README rsa_respond/respond.c rsa_respond/Makefile
53
54 all: build
55
56
57 autoconf: configure.ac
58 autoconf
59 autoheader
60 ${RM} -f config.cache
61
62 build:
63 -@if [ ! -f include/setup.h ] ; then \
64 echo "Hmm...doesn't look like you've run configure..."; \
65 echo "Doing so now."; \
66 sh configure; \
67 fi
68 @if [ -d .git ] ; then \
69 revh=`git log -1 --date=short --pretty=format:%cd_%h 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
70 [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
71 elif [ -d .hg ] ; then \
72 revh=`hg parents --template '{date|shortdate}_{node|short}' 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
73 [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
74 fi
75 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
76 @for i in $(SUBDIRS); do \
77 echo "build ==> $$i";\
78 cd $$i;\
79 ${MAKE} || exit; cd ..;\
80 done
81
82 clean:
83 ${RM} -f *~ core rsa_respond.tar rsa_respond.tar.gz
84 @for i in $(CLEANDIRS); do \
85 echo "clean ==> $$i";\
86 cd $$i;\
87 ${MAKE} clean; cd ..;\
88 done
89 -@if [ -f include/setup.h ] ; then \
90 echo "To really restart installation, make distclean" ; \
91 fi
92
93 distclean:
94 ${RM} -f Makefile *~ *.rej *.orig core ircd.core
95 ${RM} -f config.status config.cache config.log
96 cd include; ${RM} -f setup.h *~ *.rej *.orig ; cd ..
97 @for i in $(CLEANDIRS); do \
98 echo "distclean ==> $$i";\
99 cd $$i;\
100 ${MAKE} distclean; cd ..;\
101 done
102
103 depend:
104 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
105 @for i in $(SUBDIRS); do \
106 echo "depend ==> $$i";\
107 cd $$i;\
108 ${MAKE} depend; cd ..;\
109 done
110
111 lint:
112 @for i in $(SUBDIRS); do \
113 echo "lint ==> $$i";\
114 cd $$i;\
115 ${MAKE} lint; cd ..;\
116 done
117
118 install-mkdirs:
119 @echo "ircd: setting up ircd directory structure"
120 -@if test ! -d $(DESTDIR)$(prefix); then \
121 mkdir $(DESTDIR)$(prefix); \
122 fi
123 -@if test ! -d $(DESTDIR)$(bindir); then \
124 mkdir $(DESTDIR)$(bindir); \
125 fi
126 -@if test ! -d $(DESTDIR)$(confdir); then \
127 mkdir $(DESTDIR)$(confdir); \
128 fi
129 -@if test ! -d $(DESTDIR)$(mandir); then \
130 mkdir $(DESTDIR)$(mandir); \
131 fi
132 -@if test ! -d $(DESTDIR)$(helpdir); then \
133 mkdir $(DESTDIR)$(helpdir); \
134 fi
135 -@if test ! -d $(DESTDIR)$(logdir); then \
136 mkdir $(DESTDIR)$(logdir); \
137 fi
138
139 install: install-mkdirs all
140 @for i in $(SUBDIRS); do \
141 echo "install ==> $$i";\
142 cd $$i;\
143 ${MAKE} install; \
144 cd ..; \
145 done
146
147 rsa_respond:
148 @cd tools;\
149 echo "Creating rsa_respond.tar.gz";\
150 tar cf ../rsa_respond.tar $(RSA_FILES);\
151 cd ..;\
152 gzip rsa_respond.tar