Blame


1 020c6d8b 2002-01-02 alex #
2 020c6d8b 2002-01-02 alex # ngIRCd -- The Next Generation IRC Daemon
3 aa152579 2003-02-23 alex # Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
4 020c6d8b 2002-01-02 alex #
5 0f3e84f4 2003-01-13 alex # This program is free software; you can redistribute it and/or modify
6 0f3e84f4 2003-01-13 alex # it under the terms of the GNU General Public License as published by
7 0f3e84f4 2003-01-13 alex # the Free Software Foundation; either version 2 of the License, or
8 0f3e84f4 2003-01-13 alex # (at your option) any later version.
9 0f3e84f4 2003-01-13 alex # Please read the file COPYING, README and AUTHORS for more information.
10 020c6d8b 2002-01-02 alex #
11 9c3c7e5a 2005-05-23 alex # $Id: Makefile.am,v 1.46 2005/05/23 00:11:15 alex Exp $
12 020c6d8b 2002-01-02 alex #
13 f4ade537 2001-12-11 alex
14 8430c557 2002-05-22 alex AUTOMAKE_OPTIONS = ../portab/ansi2knr
15 8430c557 2002-05-22 alex
16 0f3e84f4 2003-01-13 alex INCLUDES = -I$(srcdir)/../portab -I$(srcdir)/../tool
17 ca33cbda 2002-03-12 alex
18 cdb03967 2004-05-09 alex LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
19 dec7eba5 2005-04-09 alex -varuse -retvalother -emptyret -unrecog
20 b79ba679 2002-03-25 alex
21 f4ade537 2001-12-11 alex sbin_PROGRAMS = ngircd
22 f4ade537 2001-12-11 alex
23 0b04bfa7 2002-12-30 alex ngircd_SOURCES = ngircd.c channel.c client.c conf.c conn.c conn-zip.c conn-func.c \
24 0b04bfa7 2002-12-30 alex hash.c irc.c irc-channel.c irc-info.c irc-login.c irc-mode.c irc-op.c \
25 aa152579 2003-02-23 alex irc-oper.c irc-server.c irc-write.c lists.c log.c match.c parse.c \
26 aa152579 2003-02-23 alex rendezvous.c resolve.c
27 f4ade537 2001-12-11 alex
28 0f3e84f4 2003-01-13 alex ngircd_LDFLAGS = -L../portab -L../tool
29 cf029a81 2002-05-19 alex
30 0f3e84f4 2003-01-13 alex ngircd_LDADD = -lngportab -lngtool
31 509a34f0 2002-05-19 alex
32 0b04bfa7 2002-12-30 alex noinst_HEADERS = ngircd.h channel.h client.h conf.h conn.h conn-zip.h conn-func.h \
33 0b04bfa7 2002-12-30 alex hash.h irc.h irc-channel.h irc-info.h irc-login.h irc-mode.h irc-op.h \
34 aa152579 2003-02-23 alex irc-oper.h irc-server.h irc-write.h lists.h log.h match.h parse.h \
35 aa152579 2003-02-23 alex rendezvous.h resolve.h \
36 0f3e84f4 2003-01-13 alex messages.h defines.h
37 f4ade537 2001-12-11 alex
38 0253bcc8 2002-02-21 alex clean-local:
39 25f32ce8 2002-10-07 alex rm -f check-version check-help lint.out cvs-version.*
40 0253bcc8 2002-02-21 alex
41 f4ade537 2001-12-11 alex maintainer-clean-local:
42 f4ade537 2001-12-11 alex rm -f Makefile Makefile.in
43 f4ade537 2001-12-11 alex
44 0253bcc8 2002-02-21 alex check-version: Makefile
45 0253bcc8 2002-02-21 alex echo "#!/bin/sh" > check-version
46 6f15c062 2002-09-07 alex echo "./ngircd --version | grep ngircd > /dev/null 2>&1" >> check-version
47 3c233aa9 2002-02-21 alex chmod 755 check-version
48 0253bcc8 2002-02-21 alex
49 0253bcc8 2002-02-21 alex check-help: Makefile
50 0253bcc8 2002-02-21 alex echo "#!/bin/sh" > check-help
51 0253bcc8 2002-02-21 alex echo "./ngircd --help | grep help > /dev/null 2>&1" >> check-help
52 3c233aa9 2002-02-21 alex chmod 755 check-help
53 0253bcc8 2002-02-21 alex
54 b79ba679 2002-03-25 alex lint:
55 b0ae15e0 2005-04-09 alex @splint --version >/dev/null 2>&1 \
56 b0ae15e0 2005-04-09 alex || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
57 cdb03967 2004-05-09 alex @echo; warnings=0; files=0; \
58 b79ba679 2002-03-25 alex for f in *.c; do \
59 b79ba679 2002-03-25 alex echo "checking $$f ..."; \
60 cdb03967 2004-05-09 alex splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
61 cdb03967 2004-05-09 alex $(INCLUDES) $(AM_CFLAGS) >lint.out 2>&1; \
62 b79ba679 2002-03-25 alex grep "no warnings" lint.out > /dev/null 2>&1; \
63 b79ba679 2002-03-25 alex if [ $$? -ne 0 ]; then \
64 cdb03967 2004-05-09 alex waswarning=1; \
65 b0ae15e0 2005-04-09 alex echo; grep -v "^Command Line: " lint.out; echo; \
66 cdb03967 2004-05-09 alex w=$$( grep "code warning" lint.out | awk "{ print \$$4 }" ); \
67 9c3c7e5a 2005-05-23 alex [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
68 cdb03967 2004-05-09 alex files=`expr $$files + 1`; \
69 cdb03967 2004-05-09 alex else \
70 cdb03967 2004-05-09 alex waswarning=0; \
71 b79ba679 2002-03-25 alex fi; \
72 cdb03967 2004-05-09 alex rm -f lint.out; \
73 cdb03967 2004-05-09 alex done; \
74 cdb03967 2004-05-09 alex [ $$waswarning -eq 0 ] && echo; \
75 cdb03967 2004-05-09 alex [ $$warnings -gt 0 ] \
76 cdb03967 2004-05-09 alex && echo "Result: $$warnings warning(s) in $$files file(s)!" \
77 cdb03967 2004-05-09 alex || echo "Result: no warnings found."; \
78 cdb03967 2004-05-09 alex echo; [ $$warnings -gt 0 ] && exit 1
79 b79ba679 2002-03-25 alex
80 0424747e 2003-05-03 alex ngircd.c: cvs-version.h
81 25f32ce8 2002-10-07 alex
82 05e2c0f0 2003-12-04 alex irc-login.c: cvs-version.h
83 05e2c0f0 2003-12-04 alex
84 05e2c0f0 2003-12-04 alex irc-info.c: cvs-version.h
85 05e2c0f0 2003-12-04 alex
86 0424747e 2003-05-03 alex cvs-version.h: cvs-date
87 0424747e 2003-05-03 alex
88 25f32ce8 2002-10-07 alex cvs-date:
89 016e547d 2003-03-31 alex grep VERSION ../config.h | grep "CVS" \
90 427be23b 2002-12-12 alex && echo "#define CVSDATE \"$$( grep "\$$Id" $(srcdir)/*.c \
91 1bf0426a 2003-01-04 alex | $(AWK) "{ print \$$9 }" | sort | tail -1 \
92 e12179aa 2003-01-02 alex | sed -e "s/\//-/g" )\"" > cvs-version.new \
93 180eb810 2002-10-08 alex || echo "" > cvs-version.new
94 d8f3c2b4 2003-09-09 alex diff cvs-version.h cvs-version.new 2>/dev/null \
95 d8f3c2b4 2003-09-09 alex || cp cvs-version.new cvs-version.h
96 25f32ce8 2002-10-07 alex
97 0253bcc8 2002-02-21 alex TESTS = check-version check-help
98 0253bcc8 2002-02-21 alex
99 f4ade537 2001-12-11 alex # -eof-