]> jfr.im git - solanum.git/blob - Makefile.in
Fix inconsistency between --sysconfdir and --with-confdir, deprecate --with-confdir.
[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 libdir = @libdir@
28 pkglibdir = @pkglibdir@
29 moduledir = @moduledir@
30 helpdir = @helpdir@
31 sysconfdir = @sysconfdir@
32 logdir = @logdir@
33 rundir = @rundir@
34 pkgrundir = @pkgrundir@
35 localstatedir = @localstatedir@
36 pkglocalstatedir= @pkglocalstatedir@
37 PACKAGE_TARNAME = @PACKAGE_TARNAME@
38
39 # Default CFLAGS
40 # CFLAGS = -g -O2 -DNDEBUG
41 CFLAGS = @CFLAGS@
42 # Developers CFLAGS
43 #CFLAGS= -g -O2 -Wunused -Wall -ggdb -pedantic -Wshadow -Wmissing-declarations
44
45 # Default make flags - you may want to uncomment this on a multicpu machine
46 #MFLAGS = -j 4
47
48 #
49 # For developers
50 #CFLAGS= -g -O2 -Wall
51
52 # You may need to define the FD_SETSIZE in order to overrule
53 # the system one.
54 #CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
55 SHELL=/bin/sh
56 # `extensions' must be after `modules' for proper creation of $(moduledir).
57 SUBDIRS=libratbox modules extensions src tools ssld bandb doc help
58 CLEANDIRS = ${SUBDIRS}
59 RSA_FILES=rsa_respond/README rsa_respond/respond.c rsa_respond/Makefile
60
61 all: build
62
63
64 autoconf: configure.ac
65 autoconf
66 autoheader
67 ${RM} -f config.cache
68
69 build:
70 -@if [ ! -f include/setup.h ] ; then \
71 echo "Hmm...doesn't look like you've run configure..."; \
72 echo "Doing so now."; \
73 sh configure; \
74 fi
75 @if [ -d .git ] ; then \
76 revh=`git log -1 --date=short --pretty=format:%cd_%h 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
77 [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
78 elif [ -d .hg ] ; then \
79 revh=`hg parents --template '{date|shortdate}_{node|short}' 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
80 [ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
81 fi
82 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
83 @for i in $(SUBDIRS); do \
84 echo "build ==> $$i";\
85 cd $$i;\
86 ${MAKE} || exit; cd ..;\
87 done
88
89 clean:
90 ${RM} -f *~ core rsa_respond.tar rsa_respond.tar.gz
91 @for i in $(CLEANDIRS); do \
92 echo "clean ==> $$i";\
93 cd $$i;\
94 ${MAKE} clean; cd ..;\
95 done
96 -@if [ -f include/setup.h ] ; then \
97 echo "To really restart installation, make distclean" ; \
98 fi
99
100 distclean:
101 ${RM} -f Makefile *~ *.rej *.orig core ircd.core
102 ${RM} -f config.status config.cache config.log
103 cd include; ${RM} -f setup.h *~ *.rej *.orig ; cd ..
104 @for i in $(CLEANDIRS); do \
105 echo "distclean ==> $$i";\
106 cd $$i;\
107 ${MAKE} distclean; cd ..;\
108 done
109
110 depend:
111 @[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
112 @for i in $(SUBDIRS); do \
113 echo "depend ==> $$i";\
114 cd $$i;\
115 ${MAKE} depend; cd ..;\
116 done
117
118 lint:
119 @for i in $(SUBDIRS); do \
120 echo "lint ==> $$i";\
121 cd $$i;\
122 ${MAKE} lint; cd ..;\
123 done
124
125 install-mkdirs:
126 @echo "ircd: setting up ircd directory structure"
127 -@if test ! -d $(DESTDIR)$(prefix); then \
128 mkdir -p -m 755 $(DESTDIR)$(prefix); \
129 fi
130 -@if test ! -d $(DESTDIR)$(bindir); then \
131 mkdir -p -m 755 $(DESTDIR)$(bindir); \
132 fi
133 -@if test ! -d $(DESTDIR)$(sysconfdir); then \
134 mkdir -p -m 755 $(DESTDIR)$(sysconfdir); \
135 fi
136 -@if test ! -d $(DESTDIR)$(mandir); then \
137 mkdir -p -m 755 $(DESTDIR)$(mandir); \
138 fi
139 -@if test ! -d $(DESTDIR)$(logdir); then \
140 mkdir -p -m 755 $(DESTDIR)$(logdir); \
141 fi
142 -@if test ! -d '$(DESTDIR)$(pkgrundir)'; then \
143 mkdir -p -m 755 '$(DESTDIR)$(pkgrundir)'; \
144 fi
145 -@if test ! -d '$(DESTDIR)$(pkglocalstatedir)'; then \
146 mkdir -p -m 755 '$(DESTDIR)$(pkglocalstatedir)'; \
147 fi
148
149 install: install-mkdirs all
150 @for i in $(SUBDIRS); do \
151 echo "install ==> $$i";\
152 cd $$i;\
153 ${MAKE} install; \
154 cd ..; \
155 done
156
157 rsa_respond:
158 @cd tools;\
159 echo "Creating rsa_respond.tar.gz";\
160 tar cf ../rsa_respond.tar $(RSA_FILES);\
161 cd ..;\
162 gzip rsa_respond.tar