1 # Makefile for popt library.
3 AUTOMAKE_OPTIONS = 1.4 foreign
8 EXTRA_DIST = config.rpath lookup3.c autogen.sh CHANGES $(man_MANS) \
10 footer_no_timestamp.html libpopt.vers \
11 testit.sh test-poptrc \
12 popt.xcodeproj/project.pbxproj \
17 AM_CPPFLAGS = -I. -I$(top_srcdir)
19 noinst_HEADERS = poptint.h system.h
21 noinst_PROGRAMS = test1 test2 tdict # test3
22 test1_SOURCES = test1.c
24 test1_LDADD = $(usrlib_LTLIBRARIES)
25 test2_SOURCES = test2.c
27 test2_LDADD = $(usrlib_LTLIBRARIES)
28 #test3_SOURCES = test3.c
30 #test3_LDADD = $(usrlib_LTLIBRARIES)
31 tdict_SOURCES = tdict.c
33 tdict_LDADD = $(usrlib_LTLIBRARIES)
35 noinst_SCRIPTS = testit.sh
38 test1="$(top_builddir)/test1"
40 TESTS = $(top_srcdir)/testit.sh
42 include_HEADERS = popt.h
45 usrlib_LTLIBRARIES = libpopt.la
47 libpopt_la_SOURCES = popt.c poptparse.c poptconfig.c popthelp.c poptint.c
48 libpopt_la_LDFLAGS = -no-undefined @LTLIBINTL@ @LTLIBICONV@
50 pkgconfigdir = $(prefix)/lib/pkgconfig
51 pkgconfig_DATA = popt.pc
53 if HAVE_LD_VERSION_SCRIPT
54 libpopt_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/libpopt.vers
59 BUILT_SOURCES = popt.pc # popt.lcd
66 rsync -Lrtvz translationproject.org::tp/latest/popt/ po
68 popt.lcd: Makefile.am ${libpopt_la_SOURCES} ${include_HEADERS} ${noinst_HEADERS}
69 lclint -dump $@ ${libpopt_la_SOURCES}
73 @echo $(libpopt_la_SOURCES:%=popt/%)
77 $(LINT) ${DEFS} ${INCLUDES} test1.c ${libpopt_la_SOURCES}
81 $(MCCABE) $(libpopt_la_SOURCES) | sort -n -r | head -n 10
89 .PHONY: lcov-reset # run lcov from scratch, always
94 .PHONY: lcov # run lcov from scratch if the dir is not there
98 .PHONY: lcov-run # reset run coverage tests
101 find . -name "*.gcda" -exec rm {} \;
104 .PHONY: lcov-report # generate report based on current coverage data
107 lcov --directory . --capture --output-file lcov/lcov.info
108 lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove
109 lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
111 mv lcov/lcov.cleaned.info lcov/lcov.info
112 genhtml -t "$(PACKAGE_STRING)" -o lcov lcov/lcov.info
116 # rsync -rvz -e ssh --delete lcov/* ???
118 ACLOCAL_AMFLAGS = -I m4