Fix warning flags.
[platform/upstream/libtasn1.git] / cfg.mk
1 # Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation
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 $(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_trailing_blank sc_GPL_version sc_immutable_NEWS              \
32         sc_copyright_check
33
34 autoreconf:
35         test -f ./configure || autoreconf --install
36
37 bootstrap: autoreconf
38         ./configure $(CFGFLAGS)
39
40 web-coverage:
41         rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
42         cp -rv $(COVERAGE_OUT)/* $(htmldir)/coverage/
43
44 upload-web-coverage:
45         cd $(htmldir) && \
46                 cvs commit -m "Update." coverage
47
48 W32ROOT ?= $(HOME)/gnutls4win/inst
49
50 mingw32: autoreconf 
51         ./configure --enable-gtk-doc --host=i586-mingw32msvc --build=`./config.guess` --prefix=$(W32ROOT)
52
53 ChangeLog:
54         git2cl > ChangeLog
55         cat .clcopying >> ChangeLog
56
57 htmldir = ../www-$(PACKAGE)
58 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
59
60 release: prepare upload web upload-web
61
62 prepare:
63         ! git-tag -l $(tag) | grep $(PACKAGE) > /dev/null
64         rm -f ChangeLog
65         $(MAKE) ChangeLog distcheck
66         git commit -m Generated. ChangeLog
67         git-tag -u b565716f! -m $(VERSION) $(tag)
68
69 upload:
70         git-push
71         git-push --tags
72         gnupload --to ftp.gnu.org:gnutls $(distdir).tar.gz
73         scp $(distdir).tar.gz $(distdir).tar.gz.sig igloo.linux.gr:~ftp/pub/gnutls/libtasn1/
74         ssh igloo.linux.gr 'cd ~ftp/pub/gnutls/libtasn1/ && sha1sum *.tar.gz > CHECKSUMS'
75         cp $(distdir).tar.gz $(distdir).tar.gz.sig ../releases/gnutls/$(PACKAGE)/
76
77 web:
78         cd doc && ../build-aux/gendocs.sh --html "--css-include=texinfo.css" \
79                 -o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
80         cp -v doc/reference/html/*.html doc/reference/html/*.png doc/reference/html/*.devhelp doc/reference/html/*.css $(htmldir)/reference/
81         cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/index.html
82
83 upload-web:
84         cd $(htmldir) && cvs commit -m "Update." manual/ reference/