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