Makefile.am 2.7 KB

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