Makefile.am 3.1 KB

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