Add gtk-doc to build-time dependencies
[platform/upstream/libtasn1.git] / cfg.mk
1 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
2 # Author: Simon Josefsson
3 #
4 # This file is part of LIBTASN1.
5 #
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.
10 #
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.
15 #
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/>.
18
19 WFLAGS ?= --enable-gcc-warnings
20 ADDFLAGS ?=
21 CFGFLAGS ?= --enable-gtk-doc --enable-gtk-doc-pdf $(ADDFLAGS) $(WFLAGS)
22
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`
24
25 ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
26 .DEFAULT_GOAL := bootstrap
27 endif
28
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                 \
32         sc_bindtextdomain sc_GPL_version sc_prohibit_always_true_header_tests \
33         sc_prohibit_gnu_make_extensions
34
35 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)$$
36 update-copyright-env = UPDATE_COPYRIGHT_USE_INTERVALS=1
37
38 # Explicit syntax-check exceptions.
39 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/TestIndef.p12$$
40 exclude_file_name_regexp--sc_GPL_version = ^lib/includes/libtasn1.h$$
41 exclude_file_name_regexp--sc_program_name = ^tests/|examples/
42 exclude_file_name_regexp--sc_prohibit_atoi_atof = ^src/asn1Coding.c|src/asn1Decoding.c$$
43 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/.*.(cer|der|asn|txt|p12)|tests/TestIndef.p12|msvc/.*$$
44 exclude_file_name_regexp--sc_error_message_uppercase = ^tests/Test_tree.c$$
45 exclude_file_name_regexp--sc_unmarked_diagnostics = ^tests/Test_tree.c$$
46 exclude_file_name_regexp--sc_prohibit_undesirable_word_seq = ^msvc/.*$$
47 exclude_file_name_regexp--sc_trailing_blank = ^msvc/.*$$
48 exclude_file_name_regexp--sc_useless_cpp_parens = ^lib/includes/libtasn1.h$$
49 exclude_file_name_regexp--sc_prohibit_intprops_without_use = ^lib/decoding.c$$
50 exclude_file_name_regexp--sc_m4_quote_check=^m4-gl/.*$$
51 exclude_file_name_regexp--sc_makefile_at_at_check='lib/gl/Makefile.am'
52
53 gpg_key_ID = b565716f
54
55 autoreconf:
56         @echo "Running ./bootstrap"
57         ./bootstrap
58
59 bootstrap: autoreconf
60
61 review-diff:
62         git diff `git describe --abbrev=0`.. \
63         | grep -v -e ^index -e '^diff --git' \
64         | 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' \
65         | less
66
67 # Release
68
69 htmldir = ../www-$(PACKAGE)
70
71 coverage-copy:
72         rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
73         mkdir -p $(htmldir)/coverage/
74         cp -rv $(COVERAGE_OUT)/* $(htmldir)/coverage/
75
76 coverage-upload:
77         cd $(htmldir) && \
78         find coverage -type d -! -name CVS -! -name '.' \
79                 -exec cvs add {} \; && \
80         find coverage -type d -! -name CVS -! -name '.' \
81                 -exec sh -c "cvs add -kb {}/*.png" \; && \
82         find coverage -type d -! -name CVS -! -name '.' \
83                 -exec sh -c "cvs add {}/*.html" \; && \
84         cvs add coverage/libtasn1.info coverage/gcov.css || true && \
85         cvs commit -m "Update." coverage
86
87 clang:
88         make clean
89         scan-build ./configure
90         rm -rf scan.tmp
91         scan-build -o scan.tmp make
92
93 clang-copy:
94         rm -fv `find $(htmldir)/clang-analyzer -type f | grep -v CVS`
95         mkdir -p $(htmldir)/clang-analyzer/
96         cp -rv scan.tmp/*/* $(htmldir)/clang-analyzer/
97
98 clang-upload:
99         cd $(htmldir) && \
100                 cvs add clang-analyzer || true && \
101                 cvs add clang-analyzer/*.css clang-analyzer/*.js \
102                         clang-analyzer/*.html || true && \
103                 cvs commit -m "Update." clang-analyzer
104
105 cyclo-copy:
106         cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/index.html
107
108 cyclo-upload:
109         cd $(htmldir) && cvs commit -m "Update." cyclo/index.html
110
111 gendoc-copy:
112         cd doc && $(SHELL) ../build-aux/gendocs.sh \
113                 --html "--css-include=texinfo.css" \
114                 -o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
115
116 gendoc-upload:
117         cd $(htmldir) && \
118                 cvs add manual || true && \
119                 cvs add manual/html_node || true && \
120                 cvs add -kb manual/*.gz manual/*.pdf || true && \
121                 cvs add manual/*.txt manual/*.html \
122                         manual/html_node/*.html || true && \
123                 cvs commit -m "Update." manual/
124
125 gtkdoc-copy:
126         mkdir -p $(htmldir)/reference/
127         cp -v doc/reference/$(PACKAGE).pdf \
128                 doc/reference/html/*.html \
129                 doc/reference/html/*.png \
130                 doc/reference/html/*.devhelp2 \
131                 doc/reference/html/*.css \
132                 $(htmldir)/reference/
133
134 gtkdoc-upload:
135         cd $(htmldir) && \
136                 cvs add reference || true && \
137                 cvs add -kb reference/*.png reference/*.pdf || true && \
138                 cvs add reference/*.html reference/*.css \
139                         reference/*.devhelp2 || true && \
140                 cvs commit -m "Update." reference/
141
142 ChangeLog:
143         git2cl > ChangeLog
144         cat .clcopying >> ChangeLog
145
146 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
147
148 tarball:
149         ! git tag -l $(tag) | grep $(PACKAGE) > /dev/null
150         rm -f ChangeLog
151         $(MAKE) ChangeLog distcheck
152
153 libtasn14win:
154         cd windows && make -f libtasn14win.mk libtasn14win VERSION=$(VERSION)
155
156 libtasn14win-upload:
157         cd windows && make -f libtasn14win.mk upload VERSION=$(VERSION)
158
159 source:
160         git tag -u b565716f -m $(VERSION) $(tag)
161
162 release-check: syntax-check tarball libtasn14win gendoc-copy gtkdoc-copy coverage coverage-copy clang clang-copy
163
164 release-upload-www: gendoc-upload gtkdoc-upload coverage-upload clang-upload
165
166 release-upload-ftp:
167         build-aux/gnupload --to ftp.gnu.org:$(PACKAGE) $(distdir).tar.gz
168         cp $(distdir).tar.gz $(distdir).tar.gz.sig ../releases/$(PACKAGE)/
169         git push
170         git push --tags
171
172 release: release-check release-upload-www source release-upload-ftp libtasn14win-upload
173
174 .PHONY: bootstrap autoreconf