Copy cyclo page.
[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 CFGFLAGS ?= --enable-gtk-doc WARN_CFLAGS=-Werror
20
21 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`
22
23 ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
24 .DEFAULT_GOAL := bootstrap
25 endif
26
27 autoreconf:
28         test -f ./configure || autoreconf --install
29
30 bootstrap: autoreconf
31         ./configure $(CFGFLAGS)
32
33 web-coverage:
34         rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
35         cp -rv $(COVERAGE_OUT)/* $(htmldir)/coverage/
36
37 upload-web-coverage:
38         cd $(htmldir) && \
39                 cvs commit -m "Update." coverage
40
41 W32ROOT ?= $(HOME)/gnutls4win/inst
42
43 mingw32: autoreconf 
44         ./configure --enable-gtk-doc --host=i586-mingw32msvc --build=`./config.guess` --prefix=$(W32ROOT)
45
46 ChangeLog:
47         git2cl > ChangeLog
48         cat .clcopying >> ChangeLog
49
50 htmldir = ../www-$(PACKAGE)
51 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
52
53 release: prepare upload web upload-web
54
55 prepare:
56         ! git-tag -l $(tag) | grep $(PACKAGE) > /dev/null
57         rm -f ChangeLog
58         $(MAKE) ChangeLog distcheck
59         git commit -m Generated. ChangeLog
60         git-tag -u b565716f! -m $(VERSION) $(tag)
61
62 upload:
63         git-push
64         git-push --tags
65         gnupload --to ftp.gnu.org:gnutls $(distdir).tar.gz
66         scp $(distdir).tar.gz $(distdir).tar.gz.sig igloo.linux.gr:~ftp/pub/gnutls/libtasn1/
67         ssh igloo.linux.gr 'cd ~ftp/pub/gnutls/libtasn1/ && sha1sum *.tar.gz > CHECKSUMS'
68         cp $(distdir).tar.gz $(distdir).tar.gz.sig ../releases/gnutls/$(PACKAGE)/
69
70 web:
71         cd doc && ../build-aux/gendocs.sh --html "--css-include=texinfo.css" \
72                 -o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
73         cp -v doc/reference/html/*.html doc/reference/html/*.png doc/reference/html/*.devhelp doc/reference/html/*.css $(htmldir)/reference/
74         cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/index.html
75
76 upload-web:
77         cd $(htmldir) && cvs commit -m "Update." manual/ reference/