2002-01-02 03:43:50 +01:00
|
|
|
#
|
|
|
|
# ngIRCd -- The Next Generation IRC Daemon
|
2003-02-23 13:02:26 +01:00
|
|
|
# Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
|
2002-01-02 03:43:50 +01:00
|
|
|
#
|
2003-01-13 13:20:16 +01:00
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
# Please read the file COPYING, README and AUTHORS for more information.
|
2002-01-02 03:43:50 +01:00
|
|
|
#
|
2008-02-26 23:50:35 +01:00
|
|
|
# $Id: Makefile.am,v 1.51 2008/02/26 22:04:17 fw Exp $
|
2002-01-02 03:43:50 +01:00
|
|
|
#
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2002-05-22 11:09:43 +02:00
|
|
|
AUTOMAKE_OPTIONS = ../portab/ansi2knr
|
|
|
|
|
2008-02-26 23:50:35 +01:00
|
|
|
INCLUDES = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
|
2002-03-12 15:37:51 +01:00
|
|
|
|
2004-05-09 20:23:35 +02:00
|
|
|
LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
|
2005-04-09 20:23:37 +02:00
|
|
|
-varuse -retvalother -emptyret -unrecog
|
2002-03-25 20:38:16 +01:00
|
|
|
|
2001-12-11 22:53:04 +01:00
|
|
|
sbin_PROGRAMS = ngircd
|
|
|
|
|
2005-08-25 10:40:15 +02:00
|
|
|
ngircd_SOURCES = ngircd.c array.c channel.c client.c conf.c conn.c conn-func.c \
|
2008-09-13 15:10:32 +02:00
|
|
|
conn-ssl.c conn-zip.c hash.c io.c irc.c irc-channel.c irc-info.c irc-login.c \
|
2005-08-25 10:40:15 +02:00
|
|
|
irc-mode.c irc-op.c irc-oper.c irc-server.c irc-write.c lists.c log.c \
|
2007-11-21 13:16:33 +01:00
|
|
|
match.c numeric.c parse.c rendezvous.c resolve.c
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2008-02-26 23:50:35 +01:00
|
|
|
ngircd_LDFLAGS = -L../portab -L../tool -L../ipaddr
|
2002-05-19 03:30:29 +02:00
|
|
|
|
2008-02-26 23:50:35 +01:00
|
|
|
ngircd_LDADD = -lngportab -lngtool -lngipaddr
|
2002-05-19 03:15:55 +02:00
|
|
|
|
2005-08-25 10:40:15 +02:00
|
|
|
noinst_HEADERS = ngircd.h array.h channel.h client.h conf.h conn.h conn-func.h \
|
2008-09-13 15:10:32 +02:00
|
|
|
conn-ssl.h conn-zip.h hash.h io.h irc.h irc-channel.h irc-info.h irc-login.h \
|
2005-08-25 10:40:15 +02:00
|
|
|
irc-mode.h irc-op.h irc-oper.h irc-server.h irc-write.h lists.h log.h \
|
2007-11-21 13:16:33 +01:00
|
|
|
match.h numeric.h parse.h rendezvous.h resolve.h \
|
2005-08-25 10:40:15 +02:00
|
|
|
defines.h messages.h
|
2001-12-11 22:53:04 +01:00
|
|
|
|
2002-02-21 18:25:16 +01:00
|
|
|
clean-local:
|
2008-04-20 23:10:22 +02:00
|
|
|
rm -f check-version check-help lint.out
|
2002-02-21 18:25:16 +01:00
|
|
|
|
2001-12-11 22:53:04 +01:00
|
|
|
maintainer-clean-local:
|
|
|
|
rm -f Makefile Makefile.in
|
|
|
|
|
2002-02-21 18:25:16 +01:00
|
|
|
check-version: Makefile
|
|
|
|
echo "#!/bin/sh" > check-version
|
2005-08-25 10:40:15 +02:00
|
|
|
echo "./ngircd --version | grep ngircd >/dev/null 2>&1" >>check-version
|
2002-02-21 19:47:49 +01:00
|
|
|
chmod 755 check-version
|
2002-02-21 18:25:16 +01:00
|
|
|
|
|
|
|
check-help: Makefile
|
|
|
|
echo "#!/bin/sh" > check-help
|
2005-08-25 10:40:15 +02:00
|
|
|
echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
|
2002-02-21 19:47:49 +01:00
|
|
|
chmod 755 check-help
|
2002-02-21 18:25:16 +01:00
|
|
|
|
2002-03-25 20:38:16 +01:00
|
|
|
lint:
|
2005-04-09 14:30:55 +02:00
|
|
|
@splint --version >/dev/null 2>&1 \
|
|
|
|
|| ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
|
2004-05-09 20:23:35 +02:00
|
|
|
@echo; warnings=0; files=0; \
|
2002-03-25 20:38:16 +01:00
|
|
|
for f in *.c; do \
|
|
|
|
echo "checking $$f ..."; \
|
2004-05-09 20:23:35 +02:00
|
|
|
splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
|
|
|
|
$(INCLUDES) $(AM_CFLAGS) >lint.out 2>&1; \
|
2002-03-25 20:38:16 +01:00
|
|
|
grep "no warnings" lint.out > /dev/null 2>&1; \
|
|
|
|
if [ $$? -ne 0 ]; then \
|
2004-05-09 20:23:35 +02:00
|
|
|
waswarning=1; \
|
2005-04-09 14:30:55 +02:00
|
|
|
echo; grep -v "^Command Line: " lint.out; echo; \
|
2006-03-11 02:48:50 +01:00
|
|
|
w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
|
2005-05-23 02:11:15 +02:00
|
|
|
[ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
|
2004-05-09 20:23:35 +02:00
|
|
|
files=`expr $$files + 1`; \
|
|
|
|
else \
|
|
|
|
waswarning=0; \
|
2002-03-25 20:38:16 +01:00
|
|
|
fi; \
|
2004-05-09 20:23:35 +02:00
|
|
|
rm -f lint.out; \
|
|
|
|
done; \
|
|
|
|
[ $$waswarning -eq 0 ] && echo; \
|
|
|
|
[ $$warnings -gt 0 ] \
|
|
|
|
&& echo "Result: $$warnings warning(s) in $$files file(s)!" \
|
|
|
|
|| echo "Result: no warnings found."; \
|
|
|
|
echo; [ $$warnings -gt 0 ] && exit 1
|
2002-03-25 20:38:16 +01:00
|
|
|
|
2002-02-21 18:25:16 +01:00
|
|
|
TESTS = check-version check-help
|
|
|
|
|
2001-12-11 22:53:04 +01:00
|
|
|
# -eof-
|