1 # Copyright (C) 2006-2013 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$$
43 bootstrap-tools := autoconf,automake,libtool,bison
48 test -f ./configure || autoreconf --install
51 ./configure $(CFGFLAGS)
54 git diff `git describe --abbrev=0`.. \
55 | grep -v -e ^index -e '^diff --git' \
56 | 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' \
61 htmldir = ../www-$(PACKAGE)
64 rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
65 mkdir -p $(htmldir)/coverage/
66 cp -rv $(COVERAGE_OUT)/* $(htmldir)/coverage/
70 find coverage -type d -! -name CVS -! -name '.' \
71 -exec cvs add {} \; && \
72 find coverage -type d -! -name CVS -! -name '.' \
73 -exec sh -c "cvs add -kb {}/*.png" \; && \
74 find coverage -type d -! -name CVS -! -name '.' \
75 -exec sh -c "cvs add {}/*.html" \; && \
76 cvs add coverage/libtasn1.info coverage/gcov.css || true && \
77 cvs commit -m "Update." coverage
81 scan-build ./configure
83 scan-build -o scan.tmp make
86 rm -fv `find $(htmldir)/clang-analyzer -type f | grep -v CVS`
87 mkdir -p $(htmldir)/clang-analyzer/
88 cp -rv scan.tmp/*/* $(htmldir)/clang-analyzer/
92 cvs add clang-analyzer || true && \
93 cvs add clang-analyzer/*.css clang-analyzer/*.js \
94 clang-analyzer/*.html || true && \
95 cvs commit -m "Update." clang-analyzer
98 cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/index.html
101 cd $(htmldir) && cvs commit -m "Update." cyclo/index.html
104 cd doc && $(SHELL) ../build-aux/gendocs.sh \
105 --html "--css-include=texinfo.css" \
106 -o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
110 cvs add manual || true && \
111 cvs add manual/html_node || true && \
112 cvs add -kb manual/*.gz manual/*.pdf || true && \
113 cvs add manual/*.txt manual/*.html \
114 manual/html_node/*.html || true && \
115 cvs commit -m "Update." manual/
118 mkdir -p $(htmldir)/reference/
119 cp -v doc/reference/$(PACKAGE).pdf \
120 doc/reference/html/*.html \
121 doc/reference/html/*.png \
122 doc/reference/html/*.devhelp2 \
123 doc/reference/html/*.css \
124 $(htmldir)/reference/
128 cvs add reference || true && \
129 cvs add -kb reference/*.png reference/*.pdf || true && \
130 cvs add reference/*.html reference/*.css \
131 reference/*.devhelp2 || true && \
132 cvs commit -m "Update." reference/
136 cat .clcopying >> ChangeLog
138 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
141 ! git tag -l $(tag) | grep $(PACKAGE) > /dev/null
143 $(MAKE) ChangeLog distcheck
146 cd windows && make -f libtasn14win.mk libtasn14win VERSION=$(VERSION)
149 cd windows && make -f libtasn14win.mk upload VERSION=$(VERSION)
152 git tag -u b565716f -m $(VERSION) $(tag)
154 release-check: syntax-check tarball libtasn14win gendoc-copy gtkdoc-copy coverage coverage-copy clang clang-copy
156 release-upload-www: gendoc-upload gtkdoc-upload coverage-upload clang-upload
159 build-aux/gnupload --to ftp.gnu.org:$(PACKAGE) $(distdir).tar.gz
160 cp $(distdir).tar.gz $(distdir).tar.gz.sig ../releases/$(PACKAGE)/
164 release: release-check release-upload-www source release-upload-ftp libtasn14win-upload