2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
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 2 of the License, or
8 # (at your option) any later version.
9 # Please read the file COPYING, README and AUTHORS for more information.
12 __ng_Makefile_am_template__
14 EXTRA_DIST = Makefile.ng
16 AM_CPPFLAGS = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
18 LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
19 -varuse -retvalother -emptyret -unrecog
21 sbin_PROGRAMS = ngircd
62 ngircd_LDFLAGS = -L../portab -L../tool -L../ipaddr
64 ngircd_LDADD = -lngportab -lngtool -lngipaddr
110 rm -f check-version check-help lint.out
112 maintainer-clean-local:
113 rm -f Makefile Makefile.in Makefile.am
115 check-version: Makefile
116 echo "#!/bin/sh" > check-version
117 echo "./ngircd --version | grep ngircd >/dev/null 2>&1" >>check-version
118 chmod 755 check-version
121 echo "#!/bin/sh" > check-help
122 echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
126 @splint --version >/dev/null 2>&1 \
127 || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
128 @echo; warnings=0; files=0; \
130 echo "checking $$f ..."; \
131 splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
132 $(AM_CPPFLAGS) $(AM_CFLAGS) >lint.out 2>&1; \
133 grep "no warnings" lint.out > /dev/null 2>&1; \
134 if [ $$? -ne 0 ]; then \
136 echo; grep -v "^Command Line: " lint.out; echo; \
137 w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
138 [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
139 files=`expr $$files + 1`; \
145 [ $$waswarning -eq 0 ] && echo; \
146 [ $$warnings -gt 0 ] \
147 && echo "Result: $$warnings warning(s) in $$files file(s)!" \
148 || echo "Result: no warnings found."; \
149 echo; [ $$warnings -gt 0 ] && exit 1
151 TESTS = check-version check-help