/[cvs]/eggdrop1.6/Makefile.in
ViewVC logotype

Contents of /eggdrop1.6/Makefile.in

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.39 - (show annotations) (download)
Sun Jul 25 11:17:33 2004 UTC (15 years, 2 months ago) by wcc
Branch: MAIN
Changes since 1.38: +30 -22 lines
* We now support module loading under Darwin (Mac OS X) and NeXT Step.

* Detect Tcl in $HOME/lib and $HOME/tcl/lib first, as to make it easier to allow users to override the system's Tcl version.

* Cleaned up modules.c and the module configure stuff quite a bit.

* Check for -Wall as it's own test (backport 1.9).

* No more eggmod.sh.

* Small fix to a previous patch (removed an unused variable).

1 #
2 # This is the Makefile for EGGDROP (the IRC bot)
3 # You should never need to edit this.
4 #
5 # $Id: Makefile.in,v 1.38 2004/06/17 05:43:28 wcc Exp $
6
7 SHELL = @SHELL@
8 top_srcdir = @top_srcdir@
9 srcdir = @srcdir@
10 VPATH = @srcdir@
11
12 @SET_MAKE@
13 prefix = @prefix@
14 DEST = @DEST@
15 EGGEXEC = @EGGEXEC@
16 EGGVERSION = @EGGVERSION@
17
18 # things you can put here:
19 # -Wall if you're using gcc and it supports it
20 # (configure usually detects this anyway now)
21 #
22 # -DDEBUG_ASSERT to enable assert debugging
23 # -DDEBUG_MEM to be able to debug memory allocation (.debug)
24 # These can both be set by using 'make debug'
25 # or 'make sdebug'
26 CFLGS =
27
28 # ./configure SHOULD set these; however you may need to tweak them to
29 # get modules to compile. If you do, PLEASE let the development team know,
30 # so we can incorporate needed changes into the next release. You can
31 # contact us at eggdev@eggheads.org, as always.
32
33 # Compiler
34 CC = @CC@
35 MOD_CC = @MOD_CC@
36 SHLIB_CC = @SHLIB_CC@
37
38 # Linker
39 LD = @CC@
40 MOD_LD = @MOD_LD@
41 SHLIB_LD = @SHLIB_LD@
42
43 # Stripping
44 # To turn STRIP off, use 'STRIP = touch' not 'STRIP ='.
45 STRIP = @STRIP@
46 MOD_STRIP = @MOD_STRIP@
47 SHLIB_STRIP = @SHLIB_STRIP@
48
49 # Programs make install uses
50 LN_S = @LN_S@
51 INSTALL = @INSTALL@
52 INSTALL_PROGRAM = @INSTALL_PROGRAM@
53 INSTALL_DATA = @INSTALL_DATA@
54 INSTALL_SCRIPT = @INSTALL_SCRIPT@
55
56 # Misc
57 RANLIB = @RANLIB@
58 MOD_EXT = @MOD_EXT@
59 XREQS = @TCL_REQS@
60 TCLLIB = @TCLLIB@
61 TCLLIBFN = @TCLLIBFN@
62
63 # Extra libraries
64 # XLIBS will be linked with everything; MODULE_XLIBS will only be linked with
65 # the actual module objects.
66 XLIBS = @TCL_LIBS@ @LIBS@
67 MODULE_XLIBS = @MODULE_XLIBS@
68
69 # Shouldn't need to touch anything below here.
70 DEBCFLAGS = -DDEBUG_ASSERT -DDEBUG_MEM
71
72 modconf = $(top_srcdir)/misc/modconfig --top_srcdir=$(top_srcdir)
73
74 egg_test_run = EGG_LANGDIR=$(top_srcdir)/language ./$(EGGEXEC) -v
75
76 post_config = echo "" && \
77 echo "You can now compile the bot, using \"make\"." && \
78 echo ""
79
80 post_iconfig = $(modconf) update-depends && \
81 $(modconf) Makefile && \
82 (cd src/mod && $(MAKE_CONFIG) config) && \
83 $(modconf) Makefile
84
85 egg_install_msg = echo "" && \
86 echo "Now run \"make install\" to install your bot." && \
87 echo ""
88
89 MAKE_MODEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD)' \
90 'STRIP=$(MOD_STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS)' \
91 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
92 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(standard build)' 'MODOBJS='
93
94 MAKE_MODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
95 'STRIP=$(SHLIB_STRIP)' 'CFLGS=$(CFLGS)' 'XLIBS=$(XLIBS)' 'MOD_EXT=$(MOD_EXT)' \
96 'MODULE_XLIBS=$(MODULE_XLIBS)'
97
98 MAKE_STATIC = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \
99 'STRIP=$(STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS) -DSTATIC' \
100 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
101 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static version)' \
102 'MODOBJS=mod/*.o'
103
104 MAKE_DEBEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD) -g' \
105 'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \
106 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \
107 'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(debug version)' 'MODOBJS='
108
109 MAKE_DEBMODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
110 'XLIBS=$(XLIBS)' 'STRIP=touch' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \
111 'MOD_EXT=$(MOD_EXT)' 'MODULE_XLIBS=$(MODULE_XLIBS)'
112
113 MAKE_SDEBUG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD) -g' \
114 'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) -DSTATIC $(CFLGS)' \
115 'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' \
116 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static debug version)' 'MODOBJS=mod/*.o'
117
118 MAKE_DEPEND = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \
119 'STRIP=$(STRIP)' 'CFLGS=$(CFLGS)'
120
121 MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)'
122
123 MAKE_INSTALL = $(MAKE) 'MAKE=$(MAKE)' 'DEST=$(DEST)'
124
125 all: @DEFAULT_MAKE@
126
127 eggclean:
128 @rm -f $(EGGEXEC) *.$(MOD_EXT) *.stamp core DEBUG *~
129 @cd doc && $(MAKE) clean
130 @cd scripts && $(MAKE) clean
131 @cd src && $(MAKE) clean
132 @cd src/md5 && $(MAKE) clean
133 @cd src/compat && $(MAKE) clean
134
135 clean: eggclean
136 @cd src/mod && $(MAKE) clean
137
138 distclean: eggclean clean-modconfig
139 @cd src/mod && $(MAKE) distclean
140 @rm -f Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/compat/Makefile src/mod/Makefile
141 @rm -f config.cache config.log config.status config.h lush.h
142 @rm -rf autom4te.cache
143
144 distrib:
145 misc/releaseprep
146
147 depend:
148 @cat /dev/null > lush.h
149 @cd src && $(MAKE_DEPEND) depend
150 @cd src/md5 && $(MAKE_DEPEND) depend
151 @cd src/mod && $(MAKE_DEPEND) depend
152 @cd src/compat && $(MAKE_DEPEND) depend
153
154 config:
155 @$(modconf) modules-still-exist
156 @$(modconf) detect-modules
157 @$(modconf) update-depends
158 @$(modconf) Makefile
159 @cd src/mod && $(MAKE_CONFIG) config
160 @$(modconf) Makefile
161 @$(post_config)
162
163 new-iconfig:
164 @$(modconf) modules-still-exist
165 @$(modconf) update-depends
166 @$(modconf) -n configure
167 @$(post_iconfig)
168 @$(post_config)
169
170 iconfig:
171 @$(modconf) modules-still-exist
172 @$(modconf) detect-modules
173 @$(modconf) update-depends
174 @$(modconf) configure
175 @$(post_iconfig)
176 @$(post_config)
177
178 clean-modconfig:
179 @rm -f .modules .known_modules
180
181 conftest:
182 @if test ! -f .modules; then \
183 echo ""; \
184 echo "You have NOT configured modules yet. This has to be done before you"; \
185 echo "can start compiling."; \
186 echo ""; \
187 echo " Run \"make config\" or \"make iconfig\" now."; \
188 echo ""; \
189 exit 1; \
190 fi
191
192 reconfig: clean-modconfig config
193
194 eggdrop: modegg modules
195
196 modegg: modtest
197 @rm -f src/mod/mod.xlibs
198 @cd src && $(MAKE_MODEGG) $(EGGEXEC)
199
200 modules: modtest
201 @cd src/mod && $(MAKE_MODULES) modules
202 @echo ""
203 @echo "Test run of ./eggdrop -v:"
204 @$(egg_test_run)
205 @echo ""
206 @echo "Eggdrop successfully compiled:"
207 @ls -l $(EGGEXEC)
208 @echo ""
209 @echo "Modules successfully compiled:"
210 @ls -l *.$(MOD_EXT)
211 @$(egg_install_msg)
212
213 static: eggtest
214 @echo ""
215 @echo "Making module objects for static linking..."
216 @echo ""
217 @rm -f src/mod/mod.xlibs
218 @cd src/mod && $(MAKE_STATIC) static
219 @echo ""
220 @echo "Making core eggdrop for static linking..."
221 @echo ""
222 @cd src && $(MAKE_STATIC) $(EGGEXEC)
223 @echo ""
224 @echo "Test run of ./eggdrop -v:"
225 @$(egg_test_run)
226 @echo ""
227 @echo "Eggdrop successfully compiled:"
228 @ls -l $(EGGEXEC)
229 @echo ""
230 @$(egg_install_msg)
231
232 debug: debegg debmodules
233
234 debegg: modtest
235 @cd src && $(MAKE_DEBEGG) $(EGGEXEC)
236
237 debmodules: modtest
238 @cd src/mod && $(MAKE_DEBMODULES) modules
239 @echo ""
240 @echo "Test run of ./eggdrop -v:"
241 @$(egg_test_run)
242 @echo ""
243 @echo "Eggdrop successfully compiled:"
244 @ls -l $(EGGEXEC)
245 @echo ""
246 @echo "Modules successfully compiled:"
247 @ls -l *.$(MOD_EXT)
248 @$(egg_install_msg)
249
250 sdebug: eggtest
251 @echo ""
252 @echo "Making module objects for static linking."
253 @echo ""
254 @rm -f src/mod/mod.xlibs
255 @cd src/mod && $(MAKE_SDEBUG) static
256 @echo ""
257 @echo "Making eggdrop core for static linking."
258 @echo ""
259 @cd src && $(MAKE_SDEBUG) $(EGGEXEC)
260 @echo ""
261 @echo "Test run of ./eggdrop -v:"
262 @$(egg_test_run)
263 @echo ""
264 @echo "Eggdrop successfully compiled:"
265 @ls -l $(EGGEXEC)
266 @echo ""
267 @$(egg_install_msg)
268
269 eggtest: conftest
270 @if test -f EGGMOD.stamp; then \
271 echo "You're trying to do a STATIC build of eggdrop when you've";\
272 echo "already run 'make' for a module build.";\
273 echo "You must first type \"make clean\" before you can build";\
274 echo "a static version.";\
275 exit 1;\
276 fi
277 @echo "stamp" >EGGDROP.stamp
278
279 modtest: conftest
280 @if [ -f EGGDROP.stamp ]; then \
281 echo "You're trying to do a MODULE build of eggdrop when you've";\
282 echo "already run 'make' for a static build.";\
283 echo "You must first type \"make clean\" before you can build";\
284 echo "a module version.";\
285 exit 1;\
286 fi
287 @echo "stamp" >EGGMOD.stamp
288
289 install: ainstall
290
291 dinstall: eggdrop ainstall
292
293 sinstall: static ainstall
294
295 ainstall: install-start install-bin install-modules install-data \
296 install-help install-language install-filesys install-doc \
297 install-scripts install-end
298
299 install-start:
300 @if test ! -f $(EGGEXEC); then \
301 echo ""; \
302 echo "You haven't compiled Eggdrop yet."; \
303 echo "To compile Eggdrop, use:"; \
304 echo ""; \
305 echo " make [target]"; \
306 echo ""; \
307 echo "Valid targets: 'eggdrop', 'static', 'debug', 'sdebug'."; \
308 echo "Default target: '@DEFAULT_MAKE@'."; \
309 echo ""; \
310 exit 1; \
311 fi
312 @if test "x$(DEST)" = "x"; then \
313 echo "You must specify a destination directory."; \
314 echo "Example:"; \
315 echo ""; \
316 echo " make install DEST=\"/home/wcc/mybot\""; \
317 echo ""; \
318 exit 1; \
319 fi
320 @echo ""
321 @$(egg_test_run)
322 @echo ""
323 @echo "Installing in directory: '$(DEST)'."
324 @echo ""
325 @if test ! -d $(DEST); then \
326 echo "Creating directory '$(DEST)'."; \
327 $(top_srcdir)/misc/mkinstalldirs $(DEST) >/dev/null; \
328 fi
329
330 install-bin:
331 @if test -f $(DEST)/o$(EGGEXEC); then \
332 rm -f $(DEST)/o$(EGGEXEC); \
333 fi
334 @if test -h $(DEST)/$(EGGEXEC); then \
335 echo "Removing symlink to archival eggdrop binary."; \
336 rm -f $(DEST)/$(EGGEXEC); \
337 fi
338 @if test -f $(DEST)/$(EGGEXEC); then \
339 echo "Renaming old '$(EGGEXEC)' executable to 'o$(EGGEXEC)'."; \
340 mv -f $(DEST)/$(EGGEXEC) $(DEST)/o$(EGGEXEC); \
341 fi
342 @echo "Copying new '$(EGGEXEC)' executable and creating symlink."
343 @$(INSTALL_PROGRAM) $(EGGEXEC) $(DEST)/$(EGGEXEC)-$(EGGVERSION)
344 @(cd $(DEST) && $(LN_S) $(EGGEXEC)-$(EGGVERSION) $(EGGEXEC))
345
346 install-modules:
347 @if test -h $(DEST)/modules; then \
348 echo "Removing symlink to archival modules subdirectory."; \
349 rm -f $(DEST)/modules; \
350 fi
351 @if test -d $(DEST)/modules; then \
352 echo "Moving old modules into 'modules.old' subdirectory."; \
353 rm -rf $(DEST)/modules.old; \
354 mv -f $(DEST)/modules $(DEST)/modules.old; \
355 fi
356 @if test ! "x`echo *.$(MOD_EXT)`" = "x*.$(MOD_EXT)"; then \
357 if test ! -d $(DEST)/modules-$(EGGVERSION); then \
358 echo "Creating 'modules-$(EGGVERSION)' subdirectory and symlink."; \
359 $(top_srcdir)/misc/mkinstalldirs $(DEST)/modules-$(EGGVERSION) >/dev/null; \
360 fi; \
361 (cd $(DEST) && $(LN_S) modules-$(EGGVERSION) modules); \
362 echo "Copying new modules."; \
363 for i in *.$(MOD_EXT); do \
364 $(INSTALL_PROGRAM) $$i $(DEST)/modules-$(EGGVERSION)/; \
365 done; \
366 fi
367
368 install-data:
369 @if test ! -f $(DEST)/eggdrop.conf; then \
370 $(INSTALL_DATA) $(srcdir)/eggdrop.conf $(DEST)/; \
371 fi
372 @if test ! -d $(DEST)/logs; then \
373 echo "Creating 'logs' subdirectory."; \
374 $(top_srcdir)/misc/mkinstalldirs $(DEST)/logs >/dev/null; \
375 $(INSTALL_DATA) $(srcdir)/logs/CONTENTS $(DEST)/logs/; \
376 fi;
377 @if test ! -d $(DEST)/text; then \
378 echo "Creating 'text' subdirectory."; \
379 $(top_srcdir)/misc/mkinstalldirs $(DEST)/text >/dev/null; \
380 fi;
381 @if test ! -f $(DEST)/text/motd; then \
382 $(INSTALL_DATA) $(srcdir)/text/motd $(DEST)/text/; \
383 fi
384 @if test ! -f $(DEST)/text/banner; then \
385 $(INSTALL_DATA) $(srcdir)/text/banner $(DEST)/text/; \
386 fi
387
388 install-help:
389 @echo "Copying help files."
390 @if test ! "x`echo $(srcdir)/help/*.help`" = "x$(srcdir)/help/*.help"; then \
391 if test ! -d $(DEST)/help; then \
392 echo "Creating 'help' subdirectory."; \
393 $(top_srcdir)/misc/mkinstalldirs $(DEST)/help >/dev/null; \
394 fi; \
395 for i in $(srcdir)/help/*.help; do \
396 $(INSTALL_DATA) $$i $(DEST)/help/; \
397 done; \
398 fi
399 @if test ! "x`echo $(srcdir)/help/msg/*.help`" = "x$(srcdir)/help/msg/*.help"; then \
400 if test ! -d $(DEST)/help/msg; then \
401 echo "Creating 'help/msg' subdirectory."; \
402 $(top_srcdir)/misc/mkinstalldirs $(DEST)/help/msg >/dev/null; \
403 fi; \
404 for i in $(srcdir)/help/msg/*.help; do \
405 $(INSTALL_DATA) $$i $(DEST)/help/msg/; \
406 done; \
407 fi
408 @if test ! "x`echo $(srcdir)/help/set/*.help`" = "x$(srcdir)/help/set/*.help"; then \
409 if test ! -d $(DEST)/help/set; then \
410 echo "Creating 'help/set' subdirectory."; \
411 $(top_srcdir)/misc/mkinstalldirs $(DEST)/help/set >/dev/null; \
412 fi; \
413 for i in $(srcdir)/help/set/*.help; do \
414 $(INSTALL_DATA) $$i $(DEST)/help/set/; \
415 done; \
416 fi
417 @cd src/mod/ && $(MAKE_INSTALL) install-help
418
419 install-language:
420 @echo "Copying language files."
421 @if test ! "x`echo $(srcdir)/language/*.lang`" = "x$(srcdir)/language/*.lang"; then \
422 if test ! -d $(DEST)/language; then \
423 echo "Creating 'language' subdirectory."; \
424 $(top_srcdir)/misc/mkinstalldirs $(DEST)/language >/dev/null; \
425 fi; \
426 for i in $(srcdir)/language/*.lang; do \
427 $(INSTALL_DATA) $$i $(DEST)/language/; \
428 done; \
429 fi
430 @cd src/mod && $(MAKE_INSTALL) install-language
431
432 install-filesys:
433 @if test ! -d $(DEST)/filesys; then \
434 echo "Creating skeletal filesystem subdirectories."; \
435 $(top_srcdir)/misc/mkinstalldirs $(DEST)/filesys >/dev/null; \
436 $(top_srcdir)/misc/mkinstalldirs $(DEST)/filesys/incoming >/dev/null; \
437 fi
438
439 install-doc:
440 @$(INSTALL_DATA) $(srcdir)/README $(DEST)
441 @cd doc/ && $(MAKE_INSTALL) install
442
443 install-scripts:
444 @cd scripts/ && $(MAKE_INSTALL) install
445
446 install-end:
447 @echo
448 @echo "Installation completed."
449 @echo ""
450 @echo "You MUST ensure that you edit/verify your configuration file."
451 @echo "An example configuration file, eggdrop.conf, is distributed with Eggdrop."
452 @echo ""
453 @echo "Remember to change directory to $(DEST) before you proceed."
454 @echo ""
455
456 #safety hash

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23