1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
4 # This file is part of LIBTASN1.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
21 EXTRA_DIST = windows/asn1-parser/asn1-parser.vcproj \
22 windows/asn1-parser/config.h windows/libtasn1.ncb \
23 windows/libtasn1.sln windows/libtasn1.suo \
24 windows/gnulib/getopt.h windows/gnulib/gnulib.vcproj \
25 windows/libtasn1/libtasn1.vcproj \
26 windows/test-parser/test-parser.vcproj \
27 windows/test-tree/test-tree.vcproj windows/libtasn14win.mk \
28 CONTRIBUTING.md cfg.mk maint.mk AUTHORS NEWS ChangeLog \
31 SUBDIRS = lib src tests
34 SUBDIRS += doc examples
37 include $(top_srcdir)/aminclude_static.am
39 ACLOCAL_AMFLAGS = -I m4 -I m4-gl
41 EXTRA_DIST += cfg.mk maint.mk .clcopying README.md
43 ABIDW_COMMON = --no-show-locs --no-corpus-path
44 ABIGNORE_FILE = "$(top_srcdir)/devel/libtasn1.abignore"
45 LIBGNUTLS_ABI_LAST_FILE = "$(top_srcdir)/devel/libtasn1-latest-$$(uname -m).abi"
47 abi-dump-versioned: lib/libtasn1.la
48 @echo "**************************************************"
49 @echo "Generating versioned ABI files of current libtasn1"
50 @echo "**************************************************"
51 @abidw lib/.libs/libtasn1.so $(ABIDW_COMMON) --suppressions $(ABIGNORE_FILE) --out-file "$(srcdir)/devel/libtasn1-$(VERSION)-$$(uname -m).abi"
53 abi-dump-latest: lib/libtasn1.la
54 @echo "****************************************"
55 @echo "Generating ABI files of current libtasn1"
56 @echo "****************************************"
57 @abidw lib/.libs/libtasn1.so $(ABIDW_COMMON) --suppressions $(ABIGNORE_FILE) --out-file $(LIBGNUTLS_ABI_LAST_FILE)
58 @rm -f "./devel/libtasn1-latest-$$(uname -m).tmp"
60 abi-check-latest: lib/libtasn1.la
61 @echo "Checking whether the latest ABI dump matches"
62 @abidiff --suppressions $(ABIGNORE_FILE) lib/.libs/libtasn1.so $(LIBGNUTLS_ABI_LAST_FILE) --hd2 "$(srcdir)/lib/includes/"; if test $$? != 0;then \
63 echo "*********************************************************"; \
64 echo "libtasn1 ABI has changed; use 'make files-update' "; \
65 echo "and use 'git diff' to check correctness before committing"; \
66 echo "*********************************************************"; \
69 @echo "********************************"
70 @echo "Current release matches ABI dump"
71 @echo "********************************"
73 ABICHECK_COMMON = --no-added-syms
74 abi-check: lib/libtasn1.la
75 @for file in $$(echo $(srcdir)/devel/libtasn1-*-$$(uname -m).abi);do \
76 echo "Comparing libtasn1 with $$file"; \
77 abidiff $${file} lib/.libs/libtasn1.so $(ABICHECK_COMMON) --suppressions $(ABIGNORE_FILE) --hd2 "$(srcdir)/lib/includes//"; \
78 if test $$? != 0;then \
79 echo "****************************************************************************"; \
80 echo "ABI check failed; If intentional add suppression in devel/libtasn1.abignore"; \
81 echo "****************************************************************************"; \
85 @echo "********************"
86 @echo "ABI checks completed"
87 @echo "********************"
89 files-update: abi-dump-latest
91 local-code-coverage-output: code-coverage-capture
92 cat "GNU Libtasn1-$(VERSION)-coverage/index.html"|grep headerCovTableEntry|grep '%'|head -1|sed 's/^.*>\([0-9]\+\.[0-9]\+\s*%\)<.*$$/ coverage lines: \1/' || true
94 clean-local: code-coverage-clean
95 distclean-local: code-coverage-dist-clean
98 if test -d "$(top_srcdir)/devel";then \
99 $(MAKE) -C $(top_srcdir) abi-check-latest; \
100 make -C doc/ compare-makefile; \
103 .PHONY: abi-check abi-dump-versioned abi-dump-latest