diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 88 |
1 files changed, 63 insertions, 25 deletions
diff --git a/Makefile.am b/Makefile.am index 2a8698b..e878df5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,42 +24,80 @@ EXTRA_DIST = windows/asn1-parser/asn1-parser.vcproj \ windows/gnulib/getopt.h windows/gnulib/gnulib.vcproj \ windows/libtasn1/libtasn1.vcproj \ windows/test-parser/test-parser.vcproj \ - windows/test-tree/test-tree.vcproj windows/libtasn14win.mk + windows/test-tree/test-tree.vcproj windows/libtasn14win.mk \ + CONTRIBUTING.md cfg.mk maint.mk AUTHORS NEWS ChangeLog \ + THANKS LICENSE -SUBDIRS = gl lib src tests +SUBDIRS = lib src tests if ENABLE_DOC SUBDIRS += doc examples endif -ACLOCAL_AMFLAGS = -I m4 -I gl/m4 -I lib/glm4 +include $(top_srcdir)/aminclude_static.am -EXTRA_DIST += cfg.mk maint.mk .clcopying +ACLOCAL_AMFLAGS = -I m4 -I m4-gl -gnulib-update: - gnulib-tool --add-import --dir=. --lib=libgnu --source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=lgl --no-vc-files +EXTRA_DIST += cfg.mk maint.mk .clcopying README.md -TMPFILE="abi-temp.xml" +ABIDW_COMMON = --no-show-locs --no-corpus-path +ABIGNORE_FILE = "$(top_srcdir)/devel/libtasn1.abignore" +LIBGNUTLS_ABI_LAST_FILE = "$(top_srcdir)/devel/libtasn1-latest-$$(uname -m).abi" -abi-check: - @rm -f $(TMPFILE) - @echo "Checking libtasn1 ABI" - @echo "<version>$(VERSION)</version>" >$(TMPFILE) - @echo "<headers>$(srcdir)/lib/libtasn1.h" >>$(TMPFILE) - @echo "$(builddir)/lib/libtasn1.h</headers>" >>$(TMPFILE) - @echo "<libs>$(builddir)/lib/.libs</libs>" >>$(TMPFILE) - test ! -f "$(srcdir)/devel/ABI-$$(uname -m).dump" || \ - abi-compliance-checker -abi -lib libtasn1 -old "$(srcdir)/devel/ABI-$$(uname -m).dump" -new $(TMPFILE) - @rm -f $(TMPFILE) +abi-dump-versioned: lib/libtasn1.la + @echo "**************************************************" + @echo "Generating versioned ABI files of current libtasn1" + @echo "**************************************************" + @abidw lib/.libs/libtasn1.so $(ABIDW_COMMON) --suppressions $(ABIGNORE_FILE) --out-file "$(srcdir)/devel/libtasn1-$(VERSION)-$$(uname -m).abi" -abi-dump: - @mkdir -p devel/headers-tmp - @cp lib/libtasn1.h devel/headers-tmp - @abi-dumper lib/.libs/libtasn1.so -o "./devel/ABI-$$(uname -m).dump" -public-headers devel/headers-tmp - @rm -rf devel/headers-tmp +abi-dump-latest: lib/libtasn1.la + @echo "****************************************" + @echo "Generating ABI files of current libtasn1" + @echo "****************************************" + @abidw lib/.libs/libtasn1.so $(ABIDW_COMMON) --suppressions $(ABIGNORE_FILE) --out-file $(LIBGNUTLS_ABI_LAST_FILE) + @rm -f "./devel/libtasn1-latest-$$(uname -m).tmp" +abi-check-latest: lib/libtasn1.la + @echo "Checking whether the latest ABI dump matches" + @abidiff --suppressions $(ABIGNORE_FILE) lib/.libs/libtasn1.so $(LIBGNUTLS_ABI_LAST_FILE) --hd2 "$(srcdir)/lib/includes/"; if test $$? != 0;then \ + echo "*********************************************************"; \ + echo "libtasn1 ABI has changed; use 'make files-update' "; \ + echo "and use 'git diff' to check correctness before committing"; \ + echo "*********************************************************"; \ + false; \ + fi + @echo "********************************" + @echo "Current release matches ABI dump" + @echo "********************************" -dist-hook: abi-check - make -C doc/ compare-makefile +ABICHECK_COMMON = --no-added-syms +abi-check: lib/libtasn1.la + @for file in $$(echo $(srcdir)/devel/libtasn1-*-$$(uname -m).abi);do \ + echo "Comparing libtasn1 with $$file"; \ + abidiff $${file} lib/.libs/libtasn1.so $(ABICHECK_COMMON) --suppressions $(ABIGNORE_FILE) --hd2 "$(srcdir)/lib/includes//"; \ + if test $$? != 0;then \ + echo "****************************************************************************"; \ + echo "ABI check failed; If intentional add suppression in devel/libtasn1.abignore"; \ + echo "****************************************************************************"; \ + false; \ + fi; \ + done + @echo "********************" + @echo "ABI checks completed" + @echo "********************" -.PHONY: abi-dump abi-check +files-update: abi-dump-latest + +local-code-coverage-output: code-coverage-capture + cat "GNU Libtasn1-$(VERSION)-coverage/index.html"|grep headerCovTableEntry|grep '%'|head -1|sed 's/^.*>\([0-9]\+\.[0-9]\+\s*%\)<.*$$/ coverage lines: \1/' || true + +clean-local: code-coverage-clean +distclean-local: code-coverage-dist-clean + +dist-hook: + if test -d "$(top_srcdir)/devel";then \ + $(MAKE) -C $(top_srcdir) abi-check-latest; \ + make -C doc/ compare-makefile; \ + fi + +.PHONY: abi-check abi-dump-versioned abi-dump-latest |