Makefile.am 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # Makefile for popt library.
  2. AUTOMAKE_OPTIONS = 1.4 foreign
  3. LINT = splint
  4. MCCABE = pmccabe
  5. EXTRA_DIST = config.rpath lookup3.c autogen.sh CHANGES $(man_MANS) \
  6. m4/Makefile.in \
  7. footer_no_timestamp.html libpopt.vers \
  8. testit.sh test-poptrc \
  9. popt.xcodeproj/project.pbxproj \
  10. popt.ps
  11. SUBDIRS = po . auto
  12. AM_CPPFLAGS = -I. -I$(top_srcdir)
  13. noinst_HEADERS = poptint.h system.h
  14. noinst_PROGRAMS = test1 test2 tdict # test3
  15. test1_SOURCES = test1.c
  16. test1_LDFLAGS =
  17. test1_LDADD = $(usrlib_LTLIBRARIES)
  18. test2_SOURCES = test2.c
  19. test2_LDFLAGS =
  20. test2_LDADD = $(usrlib_LTLIBRARIES)
  21. #test3_SOURCES = test3.c
  22. #test3_LDFLAGS =
  23. #test3_LDADD = $(usrlib_LTLIBRARIES)
  24. tdict_SOURCES = tdict.c
  25. tdict_LDFLAGS =
  26. tdict_LDADD = $(usrlib_LTLIBRARIES)
  27. noinst_SCRIPTS = testit.sh
  28. TESTS_ENVIRONMENT = \
  29. test1="$(top_builddir)/test1"
  30. TESTS = $(top_srcdir)/testit.sh
  31. include_HEADERS = popt.h
  32. usrlibdir = $(libdir)
  33. usrlib_LTLIBRARIES = libpopt.la
  34. libpopt_la_SOURCES = popt.c poptparse.c poptconfig.c popthelp.c poptint.c
  35. libpopt_la_LDFLAGS = -no-undefined @LTLIBINTL@ @LTLIBICONV@
  36. pkgconfigdir = $(prefix)/lib/pkgconfig
  37. pkgconfig_DATA = popt.pc
  38. if HAVE_LD_VERSION_SCRIPT
  39. libpopt_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/libpopt.vers
  40. endif
  41. man_MANS = popt.3
  42. BUILT_SOURCES = popt.pc # popt.lcd
  43. distclean-local:
  44. rm -rf .ccache
  45. .PHONY: updatepo
  46. updatepo:
  47. rsync -Lrtvz translationproject.org::tp/latest/popt/ po
  48. popt.lcd: Makefile.am ${libpopt_la_SOURCES} ${include_HEADERS} ${noinst_HEADERS}
  49. lclint -dump $@ ${libpopt_la_SOURCES}
  50. .PHONY: sources
  51. sources:
  52. @echo $(libpopt_la_SOURCES:%=popt/%)
  53. .PHONY: lint
  54. lint:
  55. $(LINT) ${DEFS} ${INCLUDES} test1.c ${libpopt_la_SOURCES}
  56. .PHONY: mccabe
  57. mccabe:
  58. $(MCCABE) $(libpopt_la_SOURCES) | sort -n -r | head -n 10
  59. .PHONY: doxygen
  60. doxygen: Doxyfile
  61. rm -rf doxygen
  62. mkdir -p doxygen
  63. doxygen
  64. .PHONY: lcov-reset # run lcov from scratch, always
  65. lcov-reset:
  66. make lcov-run
  67. make lcov-report
  68. .PHONY: lcov # run lcov from scratch if the dir is not there
  69. lcov:
  70. make lcov-reset
  71. .PHONY: lcov-run # reset run coverage tests
  72. lcov-run:
  73. @-rm -rf lcov
  74. find . -name "*.gcda" -exec rm {} \;
  75. make check
  76. .PHONY: lcov-report # generate report based on current coverage data
  77. lcov-report:
  78. mkdir lcov
  79. lcov --directory . --capture --output-file lcov/lcov.info
  80. lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove
  81. lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
  82. rm lcov/remove
  83. mv lcov/lcov.cleaned.info lcov/lcov.info
  84. genhtml -t "$(PACKAGE_STRING)" -o lcov lcov/lcov.info
  85. #.PHONY: lcov-upload
  86. #lcov-upload: lcov
  87. # rsync -rvz -e ssh --delete lcov/* ???
  88. ACLOCAL_AMFLAGS = -I m4