Makefile.in 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. # Copyright (C) 2001-2009 Joe Orton <[email protected]>
  2. # Copyright (C) 1994, 1995-8, 1999, 2000 Free Software Foundation, Inc.
  3. # This Makefile.in is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. # libtool bits mostly stolen from libxml and libtool/demo
  11. SHELL = @SHELL@
  12. prefix = @prefix@
  13. exec_prefix = @exec_prefix@
  14. bindir = @bindir@
  15. libdir = @libdir@
  16. mandir = @mandir@
  17. man1dir = $(mandir)/man1
  18. man3dir = $(mandir)/man3
  19. datarootdir = @datarootdir@
  20. datadir = @datadir@
  21. docdir = $(datadir)/doc/neon-@NEON_VERSION@
  22. includedir = @includedir@
  23. neonincludes = $(includedir)/neon
  24. pkgconfigdir = $(libdir)/pkgconfig
  25. localedir = $(datadir)/locale
  26. top_srcdir = @top_srcdir@
  27. top_builddir = .
  28. srcdir = @srcdir@
  29. VPATH = @srcdir@
  30. @SET_MAKE@
  31. LDFLAGS = -L. @LDFLAGS@
  32. LIBS = @LIBS@
  33. CC = @CC@
  34. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  35. INSTALL_DATA = @INSTALL_DATA@
  36. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  37. INSTALL = @INSTALL@
  38. transform = @program_transform_name@
  39. LIBTOOL = @LIBTOOL@
  40. XMLTO = xmlto
  41. GCOV = gcov
  42. XGETTEXT_OPTS = --keyword=_ --keyword=N_ [email protected] \
  43. --default-domain=neon --flag ne_print_request_header:3:c-format \
  44. --flag ne_snprintf:3:c-format --flag ne_vsnprintf:3:c-format \
  45. --flag ne_set_error:2:c-format
  46. POTFILE = $(top_srcdir)/po/neon.pot
  47. XGETTEXT = xgettext
  48. MSGFMT = msgfmt
  49. MSGMERGE = msgmerge
  50. LINGUAS = @ALL_LINGUAS@
  51. # The headers to distribute - making up the public interface of neon
  52. DIST_HEADERS = ne_request.h ne_session.h ne_utils.h ne_uri.h ne_socket.h \
  53. ne_basic.h ne_207.h ne_props.h ne_xml.h ne_dates.h ne_string.h \
  54. ne_defs.h ne_locks.h ne_alloc.h ne_md5.h ne_i18n.h ne_redirect.h \
  55. ne_auth.h ne_compress.h ne_acl.h ne_ssl.h ne_xmlreq.h ne_pkcs11.h \
  56. ne_acl3744.h
  57. all: subdirs
  58. check: subdirs
  59. @cd test && $(MAKE) check
  60. # Useful for doing coverage analysis; use e.g.:
  61. # make TESTS=string-tests MODULE=ne_string.c cover
  62. cover: subdirs
  63. @rm -f src/*.*da test/common/*.*da test/*.*da
  64. @cd test && $(MAKE) check
  65. @cd src && $(GCOV) -cb $(MODULE)
  66. # as per 'cover' target; prints list of functions without 100% coverage
  67. uncover: subdirs
  68. @rm -f src/*.*da test/common/*.*da test/*.*da
  69. @cd test && $(MAKE) check
  70. @cd src && $(GCOV) -cb $(MODULE)
  71. @grep ^function src/$(MODULE).gcov | grep -v 'executed 100' | sort -nr -k 9,9
  72. subdirs:
  73. @cd src && $(MAKE)
  74. # Uses Tim Waugh's excellent "xmlto" utility, see
  75. # http://cyberelk.net/tim/xmlto/. (The docs target is executed at release
  76. # time before generating a .tar.gz)
  77. docs: docs-man docs-html
  78. docs-man:
  79. rm -rf doc/man; mkdir -p doc/man
  80. $(XMLTO) -o `pwd`/doc/man -x $(srcdir)/doc/man.xsl man $(srcdir)/doc/manual.xml
  81. docs-pdf:
  82. $(XMLTO) -o `pwd`/doc pdf $(srcdir)/doc/manual.xml
  83. docs-ps:
  84. $(XMLTO) -o `pwd`/doc ps $(srcdir)/doc/manual.xml
  85. docs-html:
  86. test -d doc/html && rm -rf doc/html || true
  87. mkdir -p doc/html
  88. $(XMLTO) -o `pwd`/doc/html -x $(srcdir)/doc/html.xsl html $(srcdir)/doc/manual.xml
  89. # Validate the manual source
  90. docs-valid:
  91. xmllint --noout --valid $(srcdir)/doc/manual.xml
  92. clean:
  93. @cd src && $(MAKE) clean
  94. @cd test && $(MAKE) clean
  95. distclean: clean
  96. rm -rf Makefile config.h neon.pc config.status src/Makefile libtool config.log config.cache neon-config autom4te*.cache test/Makefile
  97. again: clean
  98. Makefile: $(srcdir)/Makefile.in
  99. @./config.status Makefile
  100. neon-config: $(srcdir)/neon-config.in
  101. @./config.status neon-config
  102. install-docs: install-man install-html
  103. install-html: docs-html
  104. $(INSTALL) -d $(DESTDIR)$(docdir)/html
  105. for d in doc/html/*.html; do \
  106. $(INSTALL_DATA) $$d $(DESTDIR)$(docdir)/html; \
  107. done
  108. install-man: docs-man
  109. $(INSTALL) -d $(DESTDIR)$(man3dir)
  110. $(INSTALL) -d $(DESTDIR)$(man1dir)
  111. for m in doc/man/*.3; do \
  112. $(INSTALL_DATA) $$m $(DESTDIR)$(man3dir); done
  113. for m in doc/man/*.1; do \
  114. $(INSTALL_DATA) $$m $(DESTDIR)$(man1dir); done
  115. install: install-@ALLOW_INSTALL@
  116. install-memleak:
  117. @echo "ERROR: The neon internal memory leak checking code is for testing"
  118. @echo "ERROR: purposes only; this copy of neon must not be installed."
  119. @false
  120. install-yes: install-lib install-headers install-config install-docs install-nls
  121. # libtool does all the necessary magic here
  122. install-lib: subdirs
  123. $(INSTALL) -d $(DESTDIR)$(libdir)
  124. $(LIBTOOL) --mode=install $(INSTALL) src/libneon.la \
  125. $(DESTDIR)$(libdir)/libneon.la
  126. install-headers:
  127. $(INSTALL) -d $(DESTDIR)$(neonincludes)
  128. @for h in $(DIST_HEADERS); do \
  129. echo Installing $$h into $(DESTDIR)$(neonincludes); \
  130. $(INSTALL_DATA) $(srcdir)/src/$$h $(DESTDIR)$(neonincludes)/$$h \
  131. || exit 1; \
  132. done
  133. install-config: neon-config neon.pc
  134. $(INSTALL) -d $(DESTDIR)$(bindir)
  135. @echo Installing neon-config into $(DESTDIR)$(bindir)
  136. @$(INSTALL_SCRIPT) neon-config \
  137. $(DESTDIR)$(bindir)/`echo neon-config|sed '$(transform)'`
  138. $(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
  139. $(INSTALL_DATA) neon.pc $(DESTDIR)$(pkgconfigdir)/neon.pc
  140. install-tests: install-lib
  141. @cd test && make install
  142. install-nls: install-nls-@NE_FLAG_I18N@
  143. install-nls-no:
  144. @echo NLS not enabled.
  145. install-nls-yes:
  146. @for f in $(LINGUAS); do \
  147. $(INSTALL) -d $(DESTDIR)$(localedir)/$$f/LC_MESSAGES; \
  148. $(INSTALL_DATA) $(srcdir)/po/$$f.gmo $(DESTDIR)$(localedir)/$$f/LC_MESSAGES/neon.mo; \
  149. done
  150. ChangeLog:
  151. svn log > $@
  152. update-po:
  153. @xgettext $(XGETTEXT_OPTS) $(top_srcdir)/src/ne*.c -o $(POTFILE)
  154. @for f in $(LINGUAS); do \
  155. echo "> Updating \"$$f\" catalog:"; \
  156. $(MSGMERGE) --update $(top_srcdir)/po/$$f.po $(POTFILE); \
  157. $(MSGFMT) --output /dev/null --check-format $(top_srcdir)/po/$$f.po || exit 1; \
  158. done
  159. compile-gmo:
  160. @for f in $(LINGUAS); do \
  161. echo "> Compiling \"$$f\" catalog:"; \
  162. $(MSGFMT) --statistics -c -o po/$$f.gmo $(top_srcdir)/po/$$f.po; \
  163. done
  164. update-copyright: Makefile
  165. @mv README.md README.orig
  166. @(sed -n '/^Copyright/q;p' < README.orig; \
  167. grep -h Copyright src/*.[ch] po/*.po macros/*.m4 | \
  168. sed -r 's/\(C\) [12].+[0-9],? /(C) /;s/^\#*//;s/^dnl//;s/<.*>//g;s/ @ .*//;s/[ ]*//;s/ *$$//;/Orton/d' | \
  169. sort -u; echo '~~~') > README.md
  170. @diff -u README.orig README.md
  171. @rm -f README.orig
  172. doc-status:
  173. @echo -n "Missing docs for:"
  174. @for f in `nm src/.libs/libneon.so | grep ' T ' | colrm 1 11`; do \
  175. test -f doc/man/$$f.3 || echo -n " $$f"; \
  176. done; echo