Update GTK-DOC infrastructure.
[platform/upstream/libtasn1.git] / cfg.mk
1 # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Free Software
2 # Foundation, Inc.
3 # Author: Simon Josefsson
4 #
5 # This file is part of LIBTASN1.
6 #
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20 WFLAGS ?= --enable-gcc-warnings
21 ADDFLAGS ?=
22 CFGFLAGS ?= --enable-gtk-doc --enable-gtk-doc-pdf $(ADDFLAGS) $(WFLAGS)
23
24 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
26 ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
27 .DEFAULT_GOAL := bootstrap
28 endif
29
30 local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_have_config_h     \
31         sc_require_config_h sc_require_config_h_first                   \
32         sc_immutable_NEWS sc_prohibit_magic_number_exit                 \
33         sc_bindtextdomain
34 VC_LIST_ALWAYS_EXCLUDE_REGEX = ^(maint.mk|build-aux/|gl/.*|lib/gllib/.*|lib/glm4/.*|lib/ASN1\.c|m4/pkg.m4|doc/gdoc|windows/.*|doc/fdl-1.3.texi|build-aux/pmccabe2html|build-aux/pmccabe.css)$$
35
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_space_tab = ^gtk-doc.make$$
43
44 bootstrap-tools := autoconf,automake,libtool,bison
45 gpg_key_ID = b565716f
46
47 autoreconf:
48         test -f ./configure || autoreconf --install
49
50 bootstrap: autoreconf
51         ./configure $(CFGFLAGS)
52
53 coverage-web:
54         rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
55         cp -rv $(COVERAGE_OUT)/* $(htmldir)/coverage/
56
57 coverage-web-upload:
58         cd $(htmldir) && \
59                 cvs commit -m "Update." coverage
60
61 ChangeLog:
62         git2cl > ChangeLog
63         cat .clcopying >> ChangeLog
64
65 htmldir = ../www-$(PACKAGE)
66 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
67
68 release: prepare upload web upload-web
69
70 prepare:
71         ! git tag -l $(tag) | grep $(PACKAGE) > /dev/null
72         rm -f ChangeLog
73         $(MAKE) ChangeLog distcheck
74         git commit -m Generated. ChangeLog
75         git tag -u b565716f! -m $(VERSION) $(tag)
76
77 upload:
78         git push
79         git push --tags
80         gnupload --to ftp.gnu.org:libtasn1 $(distdir).tar.gz
81         cp $(distdir).tar.gz $(distdir).tar.gz.sig ../releases/$(PACKAGE)/
82
83 web:
84         cd doc && $(SHELL) ../build-aux/gendocs.sh \
85                 --html "--css-include=texinfo.css" \
86                 -o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
87         cp -v doc/reference/$(PACKAGE).pdf doc/reference/html/*.html doc/reference/html/*.png doc/reference/html/*.devhelp doc/reference/html/*.css $(htmldir)/reference/
88         cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/index.html
89
90 upload-web:
91         cd $(htmldir) && cvs commit -m "Update." manual/ reference/ cyclo/
92
93 review-diff:
94         git diff `git describe --abbrev=0`.. \
95         | grep -v -e ^index -e '^diff --git' \
96         | 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' \
97         | less