Fix LZO-enabled builds.
[gnutls.git] / cfg.mk
blob7fea00e2e953b1099f4c9e244865360c47ebc843
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)
26 INDENT_SOURCES = `find . -name \*.[ch] -o -name gnutls.h.in | grep -v -e ^./build-aux/ -e ^./lib/minitasn1/ -e ^./lib/build-aux/ -e ^./lib/gl/ -e ^./gl/ -e ^./libextra/gl/ -e ^./src/cfg/ -e -gaa.[ch] -e asn1_tab.c -e ^./tests/suite/`
28 ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
29 .DEFAULT_GOAL := bootstrap
30 endif
32 PODIR := lib/po
33 PO_DOMAIN := libgnutls
35 local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_atoi_atof \
36 sc_error_message_uppercase sc_prohibit_have_config_h \
37 sc_require_config_h sc_require_config_h_first \
38 sc_trailing_blank sc_unmarked_diagnostics sc_immutable_NEWS \
39 sc_prohibit_magic_number_exit sc_texinfo_acronym
40 VC_LIST_ALWAYS_EXCLUDE_REGEX = \
41 ^(((lib/|libextra/)?(gl|build-aux))|tests/suite)/.*
43 autoreconf:
44 for f in $(PODIR)/*.po.in; do \
45 cp $$f `echo $$f | sed 's/.in//'`; \
46 done
47 mv lib/build-aux/config.rpath lib/build-aux/config.rpath-
48 test -f ./configure || autoreconf --install
49 test `hostname` = "gaggia" && cp lib/gl/m4/size_max.m4 lib/m4/ || true
50 mv lib/build-aux/config.rpath- lib/build-aux/config.rpath
52 update-po: refresh-po
53 for f in `ls $(PODIR)/*.po | grep -v quot.po`; do \
54 cp $$f $$f.in; \
55 done
56 git add $(PODIR)/*.po.in
57 git commit -m "Sync with TP." $(PODIR)/LINGUAS $(PODIR)/*.po.in
59 bootstrap: autoreconf
60 ./configure $(CFGFLAGS)
62 glimport:
63 gnulib-tool --m4-base gl/m4 --add-import
64 cd lib && gnulib-tool --m4-base gl/m4 --add-import
65 cd libextra && gnulib-tool --m4-base gl/m4 --add-import
67 # Code Coverage
69 pre-coverage:
70 ln -sf /usr/local/share/gaa/gaa.skel src/gaa.skel
72 web-coverage:
73 rm -fv `find $(htmldir)/coverage -type f | grep -v CVS`
74 cp -rv doc/coverage/* $(htmldir)/coverage/
76 upload-web-coverage:
77 cd $(htmldir) && \
78 cvs commit -m "Update." coverage
80 # Mingw32
82 W32ROOT ?= $(HOME)/gnutls4win/inst
84 mingw32: autoreconf
85 ./configure $(CFGFLAGS) --host=i586-mingw32msvc --build=`build-aux/config.guess` --with-libtasn1-prefix=$(W32ROOT) --with-libgcrypt-prefix=$(W32ROOT) --prefix $(W32ROOT)
87 .PHONY: bootstrap autoreconf mingw32
89 # Release
91 ChangeLog:
92 git log --pretty --numstat --summary --since="2005 November 07" -- | git2cl > ChangeLog
93 cat .clcopying >> ChangeLog
95 tag = $(PACKAGE)_`echo $(VERSION) | sed 's/\./_/g'`
96 htmldir = ../www-$(PACKAGE)
98 release: prepare upload web upload-web
100 prepare:
101 ! git tag -l $(tag) | grep $(PACKAGE) > /dev/null
102 rm -f ChangeLog
103 $(MAKE) ChangeLog distcheck
104 git commit -m Generated. ChangeLog
105 git tag -u b565716f! -m $(VERSION) $(tag)
107 upload:
108 git push
109 git push --tags
110 build-aux/gnupload --to alpha.gnu.org:$(PACKAGE) $(distdir).tar.bz2
111 scp $(distdir).tar.bz2 $(distdir).tar.bz2.sig igloo.linux.gr:~ftp/pub/gnutls/devel/
112 ssh igloo.linux.gr 'cd ~ftp/pub/gnutls/devel/ && sha1sum *.tar.bz2 > CHECKSUMS'
113 cp $(distdir).tar.bz2 $(distdir).tar.bz2.sig ../releases/$(PACKAGE)/
115 web:
116 cd doc && $(SHELL) ../build-aux/gendocs.sh \
117 --html "--css-include=texinfo.css" \
118 -o ../$(htmldir)/devel/manual/ $(PACKAGE) "$(PACKAGE_NAME)"
119 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
120 cp -v doc/reference/$(PACKAGE).pdf doc/reference/html/*.html doc/reference/html/*.png doc/reference/html/*.devhelp doc/reference/html/*.css $(htmldir)/devel/reference/
121 cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/
123 upload-web:
124 cd $(htmldir) && \
125 cvs commit -m "Update." manual/ reference/ \
126 doxygen/ devel/ cyclo/