1 # Makefile.am - main makefile for GnuPG
2 # Copyright (C) 2001, 2004, 2010 Free Software Foundation, Inc.
4 # This file is part of GnuPG.
6 # GnuPG 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.
11 # GnuPG 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.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <https://www.gnu.org/licenses/>.
19 ## Process this file with automake to produce Makefile.in
21 # Location of the released tarball archives. Note that this is an
22 # internal archive and before uploading this to the public server,
23 # manual tests should be run and the git release tat set and pushed.
25 RELEASE_ARCHIVE_DIR = wk@vigenere:tarballs/gnupg/v2.2
27 # The key used to sign the released sources. Adjust as needed.
28 RELEASE_SIGNING_KEY = D8692123C4065DEA5E0F3AB5249B39D24F25E3B6
32 ACLOCAL_AMFLAGS = -I m4
33 AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gnupg-builddir-envvar \
34 --enable-all-tests --enable-symcryptrun --enable-g13 \
35 --enable-gpgtar --enable-wks-tools --disable-ntbtls
37 GITLOG_TO_CHANGELOG=gitlog-to-changelog
39 EXTRA_DIST = build-aux/config.rpath build-aux/potomo autogen.sh autogen.rc \
40 ChangeLog-2011 po/ChangeLog-2011 build-aux/ChangeLog-2011 \
41 VERSION README.GIT build-aux/gitlog-to-changelog \
42 COPYING.GPL2 COPYING.LGPL21 COPYING.LGPL3 \
43 COPYING.CC0 COPYING.other \
44 build-aux/git-log-fix build-aux/git-log-footer \
45 build-aux/getswdb.sh \
47 build-aux/speedo/zlib.pc \
48 build-aux/speedo/w32/inst-options.ini \
49 build-aux/speedo/w32/inst.nsi \
50 build-aux/speedo/w32/pkg-copyright.txt \
51 build-aux/speedo/w32/g4wihelp.c \
52 build-aux/speedo/w32/pango.modules \
53 build-aux/speedo/w32/gdk-pixbuf-loaders.cache \
54 build-aux/speedo/w32/exdll.h \
55 build-aux/speedo/w32/README.txt \
56 build-aux/speedo/w32/gnupg-logo-150x57.bmp \
57 build-aux/speedo/w32/gnupg-logo-164x314.bmp \
58 build-aux/speedo/patches/atk-1.32.0.patch \
59 build-aux/speedo/patches/libiconv-1.14.patch \
60 build-aux/speedo/patches/pango-1.29.4.patch \
61 build-aux/speedo/patches/gpgme-1.12.0.patch \
62 build-aux/speedo/patches/sqlite.patch
65 DISTCLEANFILES = g10defs.h
103 SUBDIRS = m4 common kbx \
104 ${gpg} ${sm} ${agent} ${scd} ${g13} ${dirmngr} \
105 tools po ${doc} tests
107 dist_doc_DATA = README
110 dist-hook: gen-ChangeLog
114 pref="#+macro: gnupg22_" ;\
115 reldate="$$(date -u +%Y-%m-%d)" ;\
116 echo "$${pref}ver $(PACKAGE_VERSION)" ;\
117 echo "$${pref}date $${reldate}" ;\
118 list='$(DIST_ARCHIVES)'; for i in $$list; do \
119 case "$$i" in *.tar.bz2) \
120 echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
121 echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
122 echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
124 done ) | tee $(distdir).swdb
130 for i in $$($(top_srcdir)/build-aux/potomo \
131 --get-linguas $(top_srcdir)/po) ; do \
132 $(MKDIR_P) "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES" || true; \
133 rm -f "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" \
134 2>/dev/null || true; \
135 $(top_srcdir)/build-aux/potomo $(top_srcdir)/po/$$i.po \
136 "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" ; \
141 gen_start_date = 2011-12-01T06:00:00
142 .PHONY: gen-ChangeLog
144 if test -e $(top_srcdir)/.git; then \
145 (cd $(top_srcdir) && \
146 $(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
147 --amend=build-aux/git-log-fix \
148 --since=$(gen_start_date) ) > $(distdir)/cl-t; \
149 cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t; \
150 rm -f $(distdir)/ChangeLog; \
151 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
156 $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg
158 TESTS_ENVIRONMENT = \
161 PATH=$(abs_top_builddir)/tests/gpgscm:$(PATH) \
162 abs_top_srcdir=$(abs_top_srcdir) \
163 objdir=$(abs_top_builddir) \
164 GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm
166 .PHONY: check-all release sign-release
168 $(TESTS_ENVIRONMENT) \
169 $(abs_top_builddir)/tests/gpgscm/gpgscm \
170 $(abs_srcdir)/tests/run-tests.scm $(TESTFLAGS) $(TESTS)
172 # Names of to help the release target.
173 RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
174 RELEASE_W32_STEM_NAME = $(PACKAGE_TARNAME)-w32-$(PACKAGE_VERSION)
178 if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \
179 echo "error: build directory must not be the source directory" >&2;\
182 echo "/* Build started at $$(date -uIseconds) */" ;\
184 ./autogen.sh --force; \
185 cd $(abs_top_builddir); \
186 rm -rf dist; mkdir dist ; cd dist ; \
187 $(abs_top_srcdir)/configure --enable-maintainer-mode; \
188 $(MAKE) distcheck TESTFLAGS=--parallel; \
189 $(TAR) xjf $(RELEASE_NAME).tar.bz2 ;\
190 $(MAKE) -f $(RELEASE_NAME)/build-aux/speedo.mk w32-release ;\
191 echo "/* Build finished at $$(date -uIseconds) */" ;\
193 echo " * Please run the final step interactivly:" ;\
194 echo " * make sign-release" ;\
196 ) 2>&1 | tee "$(RELEASE_NAME).buildlog"
201 release_w32_name="$(RELEASE_W32_STEM_NAME)_$$(date -u +%Y%m%d)" ;\
202 files1="$(RELEASE_NAME).tar.bz2 \
203 $${release_w32_name}.tar.xz \
204 $${release_w32_name}.exe" ;\
205 files2="$(RELEASE_NAME).tar.bz2.sig \
206 $(RELEASE_NAME).swdb \
207 $(RELEASE_NAME).buildlog \
208 $${release_w32_name}.tar.xz.sig \
209 $${release_w32_name}.exe.sig \
210 $${release_w32_name}.exe.swdb" ;\
211 $(MAKE) -f $(RELEASE_NAME)/build-aux/speedo.mk w32-sign-installer ;\
212 echo "/* Signing the source tarball ..." ;\
213 gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.bz2 ;\
214 echo "/* Signing the W32 source tarball ..." ;\
215 gpg -sbu $(RELEASE_SIGNING_KEY) $${release_w32_name}.tar.xz ;\
216 echo "/* Signing the W32 installer ..." ;\
217 gpg -sbu $(RELEASE_SIGNING_KEY) $${release_w32_name}.exe ;\
218 cat $(RELEASE_NAME).swdb >swdb.snippet;\
219 echo '#+macro: gnupg22_branch STABLE-BRANCH-2-2' >>swdb.snippet;\
220 cat $${release_w32_name}.exe.swdb >>swdb.snippet;\
221 echo >>swdb.snippet ;\
222 sha1sum $${files1} >>swdb.snippet ;\
223 cat "../$(RELEASE_NAME).buildlog" swdb.snippet \
224 | gzip >$(RELEASE_NAME).buildlog ;\
225 echo "Release created - copying it to the local archive ..." ;\
226 scp -p $${files1} $${files2} $(RELEASE_ARCHIVE_DIR)/ || true;\
228 echo ' * All done; for checksums see dist/swdb.snippet' ;\