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/w32/wixlib.wxs \
59 build-aux/speedo/patches/atk-1.32.0.patch \
60 build-aux/speedo/patches/libiconv-1.14.patch \
61 build-aux/speedo/patches/pango-1.29.4.patch \
62 build-aux/speedo/patches/gpgme-1.12.0.patch \
63 build-aux/speedo/patches/sqlite.patch
66 DISTCLEANFILES = g10defs.h
104 SUBDIRS = m4 common kbx \
105 ${gpg} ${sm} ${agent} ${scd} ${g13} ${dirmngr} \
106 tools po ${doc} tests
108 dist_doc_DATA = README
111 dist-hook: gen-ChangeLog
115 pref="#+macro: gnupg22_" ;\
116 reldate="$$(date -u +%Y-%m-%d)" ;\
117 echo "$${pref}ver $(PACKAGE_VERSION)" ;\
118 echo "$${pref}date $${reldate}" ;\
119 list='$(DIST_ARCHIVES)'; for i in $$list; do \
120 case "$$i" in *.tar.bz2) \
121 echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
122 echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
123 echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
125 done ) | tee $(distdir).swdb
131 for i in $$($(top_srcdir)/build-aux/potomo \
132 --get-linguas $(top_srcdir)/po) ; do \
133 $(MKDIR_P) "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES" || true; \
134 rm -f "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" \
135 2>/dev/null || true; \
136 $(top_srcdir)/build-aux/potomo $(top_srcdir)/po/$$i.po \
137 "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" ; \
142 gen_start_date = 2011-12-01T06:00:00
143 .PHONY: gen-ChangeLog
145 if test -e $(top_srcdir)/.git; then \
146 (cd $(top_srcdir) && \
147 $(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
148 --amend=build-aux/git-log-fix \
149 --since=$(gen_start_date) ) > $(distdir)/cl-t; \
150 cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t; \
151 rm -f $(distdir)/ChangeLog; \
152 mv $(distdir)/cl-t $(distdir)/ChangeLog; \
157 $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg
159 TESTS_ENVIRONMENT = \
162 PATH=$(abs_top_builddir)/tests/gpgscm:$(PATH) \
163 abs_top_srcdir=$(abs_top_srcdir) \
164 objdir=$(abs_top_builddir) \
165 GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm
167 .PHONY: check-all release sign-release
169 $(TESTS_ENVIRONMENT) \
170 $(abs_top_builddir)/tests/gpgscm/gpgscm \
171 $(abs_srcdir)/tests/run-tests.scm $(TESTFLAGS) $(TESTS)
173 # Names of to help the release target.
174 RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
175 RELEASE_W32_STEM_NAME = $(PACKAGE_TARNAME)-w32-$(PACKAGE_VERSION)
179 if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \
180 echo "error: build directory must not be the source directory" >&2;\
183 echo "/* Build started at $$(date -uIseconds) */" ;\
185 ./autogen.sh --force; \
186 cd $(abs_top_builddir); \
187 rm -rf dist; mkdir dist ; cd dist ; \
188 $(abs_top_srcdir)/configure --enable-maintainer-mode; \
189 $(MAKE) distcheck TESTFLAGS=--parallel; \
190 $(TAR) xjf $(RELEASE_NAME).tar.bz2 ;\
191 $(MAKE) -f $(RELEASE_NAME)/build-aux/speedo.mk w32-release ;\
192 echo "/* Build finished at $$(date -uIseconds) */" ;\
194 echo " * Please run the final step interactivly:" ;\
195 echo " * make sign-release" ;\
197 ) 2>&1 | tee "$(RELEASE_NAME).buildlog"
202 release_w32_name="$(RELEASE_W32_STEM_NAME)_$$(date -u +%Y%m%d)" ;\
203 files1="$(RELEASE_NAME).tar.bz2 \
204 $${release_w32_name}.tar.xz \
205 $${release_w32_name}.exe" ;\
206 files2="$(RELEASE_NAME).tar.bz2.sig \
207 $(RELEASE_NAME).swdb \
208 $(RELEASE_NAME).buildlog \
209 $${release_w32_name}.tar.xz.sig \
210 $${release_w32_name}.exe.sig \
211 $${release_w32_name}.exe.swdb" ;\
212 files3="$${release_w32_name}.wixlib"; \
213 $(MAKE) -f $(RELEASE_NAME)/build-aux/speedo.mk w32-sign-installer ;\
214 echo "/* Signing the source tarball ..." ;\
215 gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.bz2 ;\
216 echo "/* Signing the W32 source tarball ..." ;\
217 gpg -sbu $(RELEASE_SIGNING_KEY) $${release_w32_name}.tar.xz ;\
218 echo "/* Signing the W32 installer ..." ;\
219 gpg -sbu $(RELEASE_SIGNING_KEY) $${release_w32_name}.exe ;\
220 cat $(RELEASE_NAME).swdb >swdb.snippet;\
221 echo '#+macro: gnupg22_branch STABLE-BRANCH-2-2' >>swdb.snippet;\
222 cat $${release_w32_name}.exe.swdb >>swdb.snippet;\
223 echo >>swdb.snippet ;\
224 sha1sum $${files1} >>swdb.snippet ;\
225 cat "../$(RELEASE_NAME).buildlog" swdb.snippet \
226 | gzip >$(RELEASE_NAME).buildlog ;\
227 echo "Release created - copying it to the local archive ..." ;\
228 scp -p $${files1} $${files2} $${files3} $(RELEASE_ARCHIVE_DIR)/ || true;\
230 echo ' * All done; for checksums see dist/swdb.snippet' ;\