Fix.
[gnutls:gnutls.git] / cfg.mk
1 # Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation
2 #
3 # Author: Simon Josefsson
4 #
5 # This file is part of GNUTLS.
6 #
7 # This file is free software; you can redistribute it and/or modify it
8 # 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 file is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this file; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
21 CFGFLAGS ?= --enable-gtk-doc
22
23 INDENT_SOURCES = `find . -name \*.c|grep -v -e ^./lgl -e ^./gl -e ^./src/cfg -e -gaa.c -e asn1_tab.c`
24
25 ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
26 .DEFAULT_GOAL := bootstrap
27 endif
28
29 PODIR := lib/po
30 PO_DOMAIN := libgnutls
31
32 local-checks-to-skip = sc_prohibit_strcmp
33
34 autoreconf:
35         for f in $(PODIR)/*.po.in; do \
36                 cp $$f `echo $$f | sed 's/.in//'`; \
37         done
38         mv lib/build-aux/config.rpath lib/build-aux/config.rpath-
39         test -f ./configure || autoreconf --install
40         mv lib/build-aux/config.rpath- lib/build-aux/config.rpath
41
42 update-po: refresh-po
43         for f in `ls $(PODIR)/*.po | grep -v quot.po`; do \
44                 cp $$f $$f.in; \
45         done
46         git-add $(PODIR)/*.po.in
47         git-commit -m "Sync with TP." $(PODIR)/LINGUAS $(PODIR)/*.po.in
48
49 bootstrap: autoreconf
50         WARN_CFLAGS=-Werror ./configure $(CFGFLAGS)
51
52 # Code Coverage
53
54 pre-coverage:
55         ln -sf /usr/local/share/gaa/gaa.skel src/gaa.skel
56
57 web-coverage:
58         rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
59         cp -rv doc/coverage/* $(htmldir)/coverage/
60
61 upload-web-coverage:
62         cd $(htmldir) && \
63                 cvs commit -m "Update." coverage
64
65 # Mingw32
66
67 W32ROOT ?= $(HOME)/gnutls4win/inst
68
69 mingw32: autoreconf 
70         ./configure $(CFGFLAGS) --host=i586-mingw32msvc --build=`build-aux/config.guess` --with-libtasn1-prefix=$(W32ROOT) --with-libgcrypt-prefix=$(W32ROOT) --prefix $(W32ROOT)
71
72 .PHONY: bootstrap autoreconf mingw32
73
74 # Release
75
76 ChangeLog:
77         git log --pretty --numstat --summary --since="2005 November 07" -- | git2cl > ChangeLog
78         cat .clcopying >> ChangeLog
79
80 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
81 htmldir = ../www-$(PACKAGE)
82
83 release: prepare upload web upload-web
84
85 prepare:
86         ! git-tag -l $(tag) | grep $(PACKAGE) > /dev/null
87         rm -f ChangeLog
88         $(MAKE) ChangeLog distcheck
89         git commit -m Generated. ChangeLog
90         git-tag -u b565716f! -m $(VERSION) $(tag)
91
92 upload:
93         git-push
94         git-push --tags
95         build-aux/gnupload --to alpha.gnu.org:$(PACKAGE) $(distdir).tar.bz2
96         scp $(distdir).tar.bz2 $(distdir).tar.bz2.sig igloo.linux.gr:~ftp/pub/gnutls/devel/
97         ssh igloo.linux.gr 'cd ~ftp/pub/gnutls/devel/ && sha1sum *.tar.bz2 > CHECKSUMS'
98         cp $(distdir).tar.bz2 $(distdir).tar.bz2.sig ../releases/$(PACKAGE)/
99
100 web:
101         cd doc && ../build-aux/gendocs.sh --html "--css-include=texinfo.css" \
102                 -o ../$(htmldir)/manual/ $(PACKAGE) $(PACKAGE_NAME)
103         cd doc/doxygen && doxygen && cd ../.. && cp -v doc/doxygen/html/* $(htmldir)/doxygen/ && cd doc/doxygen/latex && make refman.pdf && cd ../../../ && cp doc/doxygen/latex/refman.pdf $(htmldir)/doxygen/$(PACKAGE).pdf
104         cp -v doc/reference/html/*.html doc/reference/html/*.png doc/reference/html/*.devhelp doc/reference/html/*.css $(htmldir)/reference/
105
106 upload-web:
107         cd $(htmldir) && cvs commit -m "Update." manual/ reference/ doxygen/