document fixes.
[gnutls.git] / cfg.mk
blob2c9d101c4c8f95ad34949b271c183eb79a274891
1 # Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2 # Inc.
4 # Author: Simon Josefsson
6 # This file is part of GnuTLS.
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
13 # This file is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this file; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 WFLAGS ?= --enable-gcc-warnings
23 ADDFLAGS ?=
24 CFGFLAGS ?= --enable-gtk-doc --enable-gtk-doc-pdf $(ADDFLAGS) $(WFLAGS)
25 PACKAGE ?= gnutls
27 INDENT_SOURCES = `find . -name \*.[ch] -o -name gnutls.h.in | grep -v -e ^./build-aux/ -e ^./lib/minitasn1/ -e ^./lib/build-aux/ -e ^./gl/ -e ^./src/cfg/ -e -gaa.[ch] -e asn1_tab.c -e ^./tests/suite/`
29 ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
30 .DEFAULT_GOAL := bootstrap
31 endif
33 PODIR := lib/po
34 PO_DOMAIN := libgnutls
36 local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_atoi_atof \
37 sc_error_message_uppercase sc_prohibit_have_config_h \
38 sc_require_config_h sc_require_config_h_first \
39 sc_trailing_blank sc_unmarked_diagnostics sc_immutable_NEWS \
40 sc_prohibit_magic_number_exit sc_texinfo_acronym
41 VC_LIST_ALWAYS_EXCLUDE_REGEX = \
42 ^(((lib/|libextra/)?(gl|build-aux))|tests/suite)/.*
44 autoreconf:
45 for f in $(PODIR)/*.po.in; do \
46 cp $$f `echo $$f | sed 's/.in//'`; \
47 done
48 mv lib/build-aux/config.rpath lib/build-aux/config.rpath-
49 test -f ./configure || autoreconf --install
50 test `hostname` = "gaggia" && cp gl/m4/size_max.m4 m4/ || true
51 mv lib/build-aux/config.rpath- lib/build-aux/config.rpath
53 update-po: refresh-po
54 for f in `ls $(PODIR)/*.po | grep -v quot.po`; do \
55 cp $$f $$f.in; \
56 done
57 git add $(PODIR)/*.po.in
58 git commit -m "Sync with TP." $(PODIR)/LINGUAS $(PODIR)/*.po.in
60 bootstrap: autoreconf
61 ./configure $(CFGFLAGS)
63 #Two runs the first should add the LGPL components and the
64 #second the components used by src/ files.
65 glimport:
66 gnulib-tool --m4-base gl/m4 --tests-base=gl/tests --libtool \
67 --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl \
68 --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests \
69 --import crypto/hmac-md5 crypto/md5 extensions havelib lib-msvc-compat lib-symbol-versions \
70 byteswap c-ctype func gettext lib-msvc-compat lib-symbol-versions memmem-simple minmax \
71 netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd \
72 vasprintf vsnprintf manywarnings warnings netinet_in alloca getpass u64
73 gnulib-tool --m4-base gl/m4 --tests-base=gl/tests --libtool \
74 --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl \
75 --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lseek-tests \
76 --add-import progname version-etc timespec version-etc-fsf gettime valgrind-tests
78 # Code Coverage
80 pre-coverage:
81 ln -sf /usr/local/share/gaa/gaa.skel src/gaa.skel
83 web-coverage:
84 rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
85 cp -rv doc/coverage/* $(htmldir)/coverage/
87 upload-web-coverage:
88 cd $(htmldir) && \
89 cvs commit -m "Update." coverage
91 # Mingw32
93 W32ROOT ?= $(HOME)/gnutls4win/inst
95 mingw32: autoreconf
96 ./configure $(CFGFLAGS) --host=i586-mingw32msvc --build=`build-aux/config.guess` --with-libtasn1-prefix=$(W32ROOT) --with-libgcrypt-prefix=$(W32ROOT) --prefix $(W32ROOT)
98 .PHONY: bootstrap autoreconf mingw32
100 # Release
102 ChangeLog:
103 git log --pretty --numstat --summary --since="2005 November 07" -- | git2cl > ChangeLog
104 cat .clcopying >> ChangeLog
106 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
107 htmldir = ../www-$(PACKAGE)
109 release: prepare upload web upload-web
111 prepare:
112 ! git tag -l $(tag) | grep $(PACKAGE) > /dev/null
113 rm -f ChangeLog
114 $(MAKE) ChangeLog distcheck
115 git commit -m Generated. ChangeLog
116 git tag -u b565716f! -m $(VERSION) $(tag)
118 upload:
119 git push
120 git push --tags
121 build-aux/gnupload --to alpha.gnu.org:$(PACKAGE) $(distdir).tar.bz2
122 scp $(distdir).tar.bz2 $(distdir).tar.bz2.sig igloo.linux.gr:~ftp/pub/gnutls/devel/
123 ssh igloo.linux.gr 'cd ~ftp/pub/gnutls/devel/ && sha1sum *.tar.bz2 > CHECKSUMS'
124 cp $(distdir).tar.bz2 $(distdir).tar.bz2.sig ../releases/$(PACKAGE)/
126 web:
127 echo generating documentation for $(PACKAGE)
128 cd doc && $(SHELL) ../build-aux/gendocs.sh \
129 --html "--css-include=texinfo.css" \
130 -o ../$(htmldir)/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
131 #cd doc/doxygen && doxygen && cd ../.. && cp -v doc/doxygen/html/* $(htmldir)/devel/doxygen/ && cd doc/doxygen/latex && make refman.pdf && cd ../../../ && cp doc/doxygen/latex/refman.pdf $(htmldir)/devel/doxygen/$(PACKAGE).pdf
132 cp -v doc/reference/html/*.html doc/reference/html/*.png doc/reference/html/*.devhelp doc/reference/html/*.css $(htmldir)/reference/
133 #cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/
135 upload-web:
136 cd $(htmldir) && \
137 cvs commit -m "Update." manual/ reference/ \
138 doxygen/ devel/ cyclo/