]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/Makefile.ng
Adjust severity levels of some log messages
[ngircd-alex.git] / src / ngircd / Makefile.ng
1 #
2 # ngIRCd -- The Next Generation IRC Daemon
3 # Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
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 2 of the License, or
8 # (at your option) any later version.
9 # Please read the file COPYING, README and AUTHORS for more information.
10 #
11
12 __ng_Makefile_am_template__
13
14 EXTRA_DIST = Makefile.ng
15
16 AM_CPPFLAGS = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
17
18 LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
19  -varuse -retvalother -emptyret -unrecog
20
21 sbin_PROGRAMS = ngircd
22
23 ngircd_SOURCES = \
24         ngircd.c \
25         array.c \
26         channel.c \
27         class.c \
28         client.c \
29         client-cap.c \
30         conf.c \
31         conn.c \
32         conn-encoding.c \
33         conn-func.c \
34         conn-ssl.c \
35         conn-zip.c \
36         hash.c \
37         io.c \
38         irc.c \
39         irc-cap.c \
40         irc-channel.c \
41         irc-encoding.c \
42         irc-info.c \
43         irc-login.c \
44         irc-metadata.c \
45         irc-mode.c \
46         irc-op.c \
47         irc-oper.c \
48         irc-server.c \
49         irc-write.c \
50         lists.c \
51         log.c \
52         login.c \
53         match.c \
54         numeric.c \
55         op.c \
56         pam.c \
57         parse.c \
58         proc.c \
59         resolve.c \
60         sighandlers.c
61
62 ngircd_LDFLAGS = -L../portab -L../tool -L../ipaddr
63
64 ngircd_LDADD = -lngportab -lngtool -lngipaddr
65
66 noinst_HEADERS = \
67         ngircd.h \
68         array.h \
69         channel.h \
70         class.h \
71         client.h \
72         client-cap.h \
73         conf.h \
74         conf-ssl.h \
75         conn.h \
76         conn-encoding.h \
77         conn-func.h \
78         conn-ssl.h \
79         conn-zip.h \
80         defines.h \
81         hash.h \
82         io.h \
83         irc.h \
84         irc-cap.h \
85         irc-channel.h \
86         irc-encoding.h \
87         irc-info.h \
88         irc-login.h \
89         irc-metadata.h \
90         irc-mode.h \
91         irc-op.h \
92         irc-oper.h \
93         irc-server.h \
94         irc-write.h \
95         lists.h \
96         log.h \
97         login.h \
98         match.h \
99         messages.h \
100         numeric.h \
101         op.h \
102         pam.h \
103         parse.h \
104         proc.h \
105         resolve.h \
106         sighandlers.h
107
108 clean-local:
109         rm -f check-version check-help lint.out
110
111 maintainer-clean-local:
112         rm -f Makefile Makefile.in Makefile.am
113
114 check-version: Makefile
115         echo "#!/bin/sh" > check-version
116         echo "./ngircd --version | grep ngircd >/dev/null 2>&1" >>check-version
117         chmod 755 check-version
118
119 check-help: Makefile
120         echo "#!/bin/sh" > check-help
121         echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
122         chmod 755 check-help
123
124 lint:
125         @splint --version >/dev/null 2>&1 \
126          || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
127         @echo; warnings=0; files=0; \
128         for f in *.c; do \
129          echo "checking $$f ..."; \
130          splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
131           $(AM_CPPFLAGS) $(AM_CFLAGS) >lint.out 2>&1; \
132          grep "no warnings" lint.out > /dev/null 2>&1; \
133          if [ $$? -ne 0 ]; then \
134           waswarning=1; \
135           echo; grep -v "^Command Line: " lint.out; echo; \
136           w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
137           [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
138           files=`expr $$files + 1`; \
139          else \
140           waswarning=0; \
141          fi; \
142          rm -f lint.out; \
143         done; \
144         [ $$waswarning -eq 0 ] && echo; \
145         [ $$warnings -gt 0 ] \
146          && echo "Result: $$warnings warning(s) in $$files file(s)!" \
147          || echo "Result: no warnings found."; \
148         echo; [ $$warnings -gt 0 ] && exit 1
149
150 TESTS = check-version check-help
151
152 # -eof-