1 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
2 # Author: Simon Josefsson
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 WFLAGS ?= --enable-gcc-warnings
21 CFGFLAGS ?= --enable-gtk-doc --enable-gtk-doc-pdf $(ADDFLAGS) $(WFLAGS)
23 INDENT_SOURCES = `find . -name \*.[ch]|grep -v -e ^./gl -e ^./lib/gl -e ^./build-aux/ -e ^./lib/ASN1.c -e ^./tests/Test_tree_asn1_tab.c`
25 ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
26 .DEFAULT_GOAL := bootstrap
29 local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_have_config_h \
30 sc_require_config_h sc_require_config_h_first \
31 sc_immutable_NEWS sc_prohibit_magic_number_exit \
33 VC_LIST_ALWAYS_EXCLUDE_REGEX = ^(maint.mk|gtk-doc.make|build-aux/.*|gl/.*|lib/gllib/.*|lib/glm4/.*|lib/ASN1\.c|m4/pkg.m4|doc/gdoc|windows/.*|doc/fdl-1.3.texi)$$
34 update-copyright-env = UPDATE_COPYRIGHT_USE_INTERVALS=1
36 # Explicit syntax-check exceptions.
37 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/TestIndef.p12$$
38 exclude_file_name_regexp--sc_GPL_version = ^lib/libtasn1.h$$
39 exclude_file_name_regexp--sc_program_name = ^tests/|examples/
40 exclude_file_name_regexp--sc_prohibit_atoi_atof = ^src/asn1Coding.c|src/asn1Decoding.c$$
41 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/crlf.cer|tests/TestIndef.p12$$
42 exclude_file_name_regexp--sc_error_message_uppercase = ^tests/Test_tree.c$$
43 exclude_file_name_regexp--sc_unmarked_diagnostics = ^tests/Test_tree.c$$
45 bootstrap-tools := autoconf,automake,libtool,bison
50 test -f ./configure || autoreconf --install
53 ./configure $(CFGFLAGS)
56 git diff `git describe --abbrev=0`.. \
57 | grep -v -e ^index -e '^diff --git' \
58 | filterdiff -p 1 -x 'gl/*' -x 'build-aux/*' -x 'lib/gl*' -x 'po/*' -x 'maint.mk' -x '.gitignore' -x '.x-sc*' -x ChangeLog -x GNUmakefile -x 'lib/ASN1.c' \
63 htmldir = ../www-$(PACKAGE)
66 rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
67 mkdir -p $(htmldir)/coverage/
68 cp -rv $(COVERAGE_OUT)/* $(htmldir)/coverage/
72 find coverage -type d -! -name CVS -! -name '.' \
73 -exec cvs add {} \; && \
74 find coverage -type d -! -name CVS -! -name '.' \
75 -exec sh -c "cvs add -kb {}/*.png" \; && \
76 find coverage -type d -! -name CVS -! -name '.' \
77 -exec sh -c "cvs add {}/*.html" \; && \
78 cvs add coverage/libtasn1.info coverage/gcov.css || true && \
79 cvs commit -m "Update." coverage
83 scan-build ./configure
85 scan-build -o scan.tmp make
88 rm -fv `find $(htmldir)/clang-analyzer -type f | grep -v CVS`
89 mkdir -p $(htmldir)/clang-analyzer/
90 cp -rv scan.tmp/*/* $(htmldir)/clang-analyzer/
94 cvs add clang-analyzer || true && \
95 cvs add clang-analyzer/*.css clang-analyzer/*.js \
96 clang-analyzer/*.html || true && \
97 cvs commit -m "Update." clang-analyzer
100 cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/index.html
103 cd $(htmldir) && cvs commit -m "Update." cyclo/index.html
106 cd doc && $(SHELL) ../build-aux/gendocs.sh \
107 --html "--css-include=texinfo.css" \
108 -o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
112 cvs add manual || true && \
113 cvs add manual/html_node || true && \
114 cvs add -kb manual/*.gz manual/*.pdf || true && \
115 cvs add manual/*.txt manual/*.html \
116 manual/html_node/*.html || true && \
117 cvs commit -m "Update." manual/
120 mkdir -p $(htmldir)/reference/
121 cp -v doc/reference/$(PACKAGE).pdf \
122 doc/reference/html/*.html \
123 doc/reference/html/*.png \
124 doc/reference/html/*.devhelp2 \
125 doc/reference/html/*.css \
126 $(htmldir)/reference/
130 cvs add reference || true && \
131 cvs add -kb reference/*.png reference/*.pdf || true && \
132 cvs add reference/*.html reference/*.css \
133 reference/*.devhelp2 || true && \
134 cvs commit -m "Update." reference/
138 cat .clcopying >> ChangeLog
140 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
143 ! git tag -l $(tag) | grep $(PACKAGE) > /dev/null
145 $(MAKE) ChangeLog distcheck
148 cd windows && make -f libtasn14win.mk libtasn14win VERSION=$(VERSION)
151 cd windows && make -f libtasn14win.mk upload VERSION=$(VERSION)
154 git tag -u b565716f -m $(VERSION) $(tag)
156 release-check: syntax-check tarball libtasn14win gendoc-copy gtkdoc-copy coverage coverage-copy clang clang-copy
158 release-upload-www: gendoc-upload gtkdoc-upload coverage-upload clang-upload
161 build-aux/gnupload --to ftp.gnu.org:$(PACKAGE) $(distdir).tar.gz
162 cp $(distdir).tar.gz $(distdir).tar.gz.sig ../releases/$(PACKAGE)/
166 release: release-check release-upload-www source release-upload-ftp libtasn14win-upload