Makefile.am 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #
  2. # ngIRCd -- The Next Generation IRC Daemon
  3. # Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
  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. # $Id: Makefile.am,v 1.51 2008/02/26 22:04:17 fw Exp $
  12. #
  13. AUTOMAKE_OPTIONS = ../portab/ansi2knr
  14. INCLUDES = -I$(srcdir)/../portab -I$(srcdir)/../tool -I$(srcdir)/../ipaddr
  15. LINTARGS = -weak -warnunixlib +unixlib -booltype BOOLEAN \
  16. -varuse -retvalother -emptyret -unrecog
  17. sbin_PROGRAMS = ngircd
  18. ngircd_SOURCES = ngircd.c array.c channel.c client.c conf.c conn.c conn-func.c \
  19. conn-zip.c hash.c io.c irc.c irc-channel.c irc-info.c irc-login.c \
  20. irc-mode.c irc-op.c irc-oper.c irc-server.c irc-write.c lists.c log.c \
  21. match.c numeric.c parse.c rendezvous.c resolve.c
  22. ngircd_LDFLAGS = -L../portab -L../tool -L../ipaddr
  23. ngircd_LDADD = -lngportab -lngtool -lngipaddr
  24. noinst_HEADERS = ngircd.h array.h channel.h client.h conf.h conn.h conn-func.h \
  25. conn-zip.h hash.h io.h irc.h irc-channel.h irc-info.h irc-login.h \
  26. irc-mode.h irc-op.h irc-oper.h irc-server.h irc-write.h lists.h log.h \
  27. match.h numeric.h parse.h rendezvous.h resolve.h \
  28. defines.h messages.h
  29. clean-local:
  30. rm -f check-version check-help lint.out
  31. maintainer-clean-local:
  32. rm -f Makefile Makefile.in
  33. check-version: Makefile
  34. echo "#!/bin/sh" > check-version
  35. echo "./ngircd --version | grep ngircd >/dev/null 2>&1" >>check-version
  36. chmod 755 check-version
  37. check-help: Makefile
  38. echo "#!/bin/sh" > check-help
  39. echo "./ngircd --help | grep help >/dev/null 2>&1" >>check-help
  40. chmod 755 check-help
  41. lint:
  42. @splint --version >/dev/null 2>&1 \
  43. || ( echo; echo "Error: \"splint\" not found!"; echo; exit 1 )
  44. @echo; warnings=0; files=0; \
  45. for f in *.c; do \
  46. echo "checking $$f ..."; \
  47. splint $$f $(LINTARGS) -I$(srcdir) -I$(srcdir)/.. \
  48. $(INCLUDES) $(AM_CFLAGS) >lint.out 2>&1; \
  49. grep "no warnings" lint.out > /dev/null 2>&1; \
  50. if [ $$? -ne 0 ]; then \
  51. waswarning=1; \
  52. echo; grep -v "^Command Line: " lint.out; echo; \
  53. w=$$( grep "code warning" lint.out | $(AWK) "{ print \$$4 }" ); \
  54. [ "$$w" -gt 0 ] && warnings=`expr $$warnings + $$w`; \
  55. files=`expr $$files + 1`; \
  56. else \
  57. waswarning=0; \
  58. fi; \
  59. rm -f lint.out; \
  60. done; \
  61. [ $$waswarning -eq 0 ] && echo; \
  62. [ $$warnings -gt 0 ] \
  63. && echo "Result: $$warnings warning(s) in $$files file(s)!" \
  64. || echo "Result: no warnings found."; \
  65. echo; [ $$warnings -gt 0 ] && exit 1
  66. TESTS = check-version check-help
  67. # -eof-