Fix.
[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 # Use alpha.gnu.org for alpha and beta releases.
20 # Use ftp.gnu.org for major releases.
21 gnu_ftp_host-alpha = alpha.gnu.org
22 gnu_ftp_host-beta = alpha.gnu.org
23 gnu_ftp_host-major = ftp.gnu.org
24 gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE))
25
26 url_dir_list = \
27   ftp://$(gnu_rel_host)/gnu/libtasn1
28
29 WFLAGS ?= --enable-gcc-warnings
30 ADDFLAGS ?=
31 CFGFLAGS ?= --enable-gtk-doc $(ADDFLAGS) $(WFLAGS)
32
33 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`
34
35 ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
36 .DEFAULT_GOAL := bootstrap
37 endif
38
39 local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_have_config_h     \
40         sc_require_config_h sc_require_config_h_first                   \
41         sc_trailing_blank sc_GPL_version sc_immutable_NEWS              \
42         sc_copyright_check
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 web-coverage:
54         rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
55         cp -rv $(COVERAGE_OUT)/* $(htmldir)/coverage/
56
57 upload-web-coverage:
58         cd $(htmldir) && \
59                 cvs commit -m "Update." coverage
60
61 W32ROOT ?= $(HOME)/gnutls4win/inst
62
63 mingw32: autoreconf 
64         ./configure --enable-gtk-doc --host=i586-mingw32msvc --build=`./config.guess` --prefix=$(W32ROOT)
65
66 ChangeLog:
67         git2cl > ChangeLog
68         cat .clcopying >> ChangeLog
69
70 htmldir = ../www-$(PACKAGE)
71 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
72
73 release: prepare upload web upload-web
74
75 prepare:
76         ! git tag -l $(tag) | grep $(PACKAGE) > /dev/null
77         rm -f ChangeLog
78         $(MAKE) ChangeLog distcheck
79         git commit -m Generated. ChangeLog
80         git tag -u b565716f! -m $(VERSION) $(tag)
81
82 upload:
83         git push
84         git push --tags
85         gnupload --to ftp.gnu.org:libtasn1 $(distdir).tar.gz
86         scp $(distdir).tar.gz $(distdir).tar.gz.sig igloo.linux.gr:~ftp/pub/gnutls/libtasn1/
87         ssh igloo.linux.gr 'cd ~ftp/pub/gnutls/libtasn1/ && sha1sum *.tar.gz > CHECKSUMS'
88         cp $(distdir).tar.gz $(distdir).tar.gz.sig ../releases/$(PACKAGE)/
89
90 web:
91         cd doc && ../build-aux/gendocs.sh --html "--css-include=texinfo.css" \
92                 -o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
93         cp -v doc/reference/html/*.html doc/reference/html/*.png doc/reference/html/*.devhelp doc/reference/html/*.css $(htmldir)/reference/
94         cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/index.html
95
96 upload-web:
97         cd $(htmldir) && cvs commit -m "Update." manual/ reference/
98
99 # Work around maint.mk issue.
100 taint-distcheck:
101 my-distcheck: