Imported Upstream version 2.1.21
[platform/upstream/gpg2.git] / Makefile.am
1 # Makefile.am - main makefile for GnuPG
2 #       Copyright (C) 2001, 2004, 2010 Free Software Foundation, Inc.
3 #
4 # This file is part of GnuPG.
5 #
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.
10 #
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.
15 #
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/>.
18
19 ## Process this file with automake to produce Makefile.in
20
21 ACLOCAL_AMFLAGS = -I m4
22 AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gnupg-builddir-envvar \
23   --enable-symcryptrun --enable-g13 \
24   --enable-gpg2-is-gpg --enable-gpgtar --enable-wks-tools --disable-ntbtls
25
26 GITLOG_TO_CHANGELOG=gitlog-to-changelog
27
28 EXTRA_DIST = build-aux/config.rpath build-aux/potomo autogen.sh autogen.rc \
29              ChangeLog-2011 po/ChangeLog-2011 build-aux/ChangeLog-2011     \
30              VERSION README.GIT build-aux/gitlog-to-changelog              \
31              COPYING.CC0 COPYING.other                      \
32              build-aux/git-log-fix build-aux/git-log-footer \
33              build-aux/getswdb.sh                           \
34              build-aux/speedo.mk                            \
35              build-aux/speedo/zlib.pc                       \
36              build-aux/speedo/w32/inst-options.ini          \
37              build-aux/speedo/w32/inst.nsi                  \
38              build-aux/speedo/w32/pkg-copyright.txt         \
39              build-aux/speedo/w32/g4wihelp.c                \
40              build-aux/speedo/w32/pango.modules             \
41              build-aux/speedo/w32/gdk-pixbuf-loaders.cache  \
42              build-aux/speedo/w32/exdll.h                   \
43              build-aux/speedo/w32/README.txt                \
44              build-aux/speedo/w32/gnupg-logo-150x57.bmp     \
45              build-aux/speedo/w32/gnupg-logo-164x314.bmp    \
46              build-aux/speedo/patches/atk-1.32.0.patch      \
47              build-aux/speedo/patches/libiconv-1.14.patch   \
48              build-aux/speedo/patches/pango-1.29.4.patch    \
49              build-aux/speedo/patches/sqlite.patch
50
51
52 DISTCLEANFILES = g10defs.h
53
54 if BUILD_GPG
55 gpg = g10
56 else
57 gpg =
58 endif
59 if BUILD_GPGSM
60 sm = sm
61 else
62 sm =
63 endif
64 if BUILD_AGENT
65 agent = agent
66 else
67 agent =
68 endif
69 if BUILD_SCDAEMON
70 scd = scd
71 else
72 scd =
73 endif
74 if BUILD_G13
75 g13 = g13
76 else
77 g13 =
78 endif
79 if BUILD_DIRMNGR
80 dirmngr = dirmngr
81 else
82 dirmngr =
83 endif
84 if BUILD_DOC
85 doc = doc
86 else
87 doc =
88 endif
89
90 SUBDIRS = m4 common kbx \
91           ${gpg} ${sm} ${agent} ${scd} ${g13} ${dirmngr} \
92           tools po ${doc} tests
93
94 dist_doc_DATA = README
95
96
97 dist-hook: gen-ChangeLog
98
99 distcheck-hook:
100         set -e; ( \
101         pref="#+macro: gnupg21_" ;\
102         reldate="$$(date -u +%Y-%m-%d)" ;\
103         echo "$${pref}ver  $(PACKAGE_VERSION)"  ;\
104         echo "$${pref}date $${reldate}" ;\
105         list='$(DIST_ARCHIVES)'; for i in $$list; do \
106           case "$$i" in *.tar.bz2) \
107             echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
108             echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
109             echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
110           esac;\
111         done ) | tee $(distdir).swdb
112
113
114 if HAVE_W32_SYSTEM
115 install-data-hook:
116         set -e; \
117         for i in $$($(top_srcdir)/build-aux/potomo \
118                      --get-linguas $(top_srcdir)/po) ; do \
119            $(MKDIR_P) "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES" || true; \
120            rm -f "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" \
121                                                  2>/dev/null || true; \
122            $(top_srcdir)/build-aux/potomo $(top_srcdir)/po/$$i.po \
123               "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" ; \
124         done
125 endif
126
127
128 gen_start_date = 2011-12-01T06:00:00
129 .PHONY: gen-ChangeLog
130 gen-ChangeLog:
131         if test -e $(top_srcdir)/.git; then                             \
132           (cd $(top_srcdir) &&                                          \
133             $(GITLOG_TO_CHANGELOG) --append-dot --tear-off              \
134             --amend=build-aux/git-log-fix                               \
135             --since=$(gen_start_date) ) > $(distdir)/cl-t;              \
136           cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;  \
137           rm -f $(distdir)/ChangeLog;                                   \
138           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
139         fi
140
141
142 stowinstall:
143         $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg
144
145 TESTS_ENVIRONMENT = \
146         LC_ALL=C \
147         EXEEXT=$(EXEEXT) \
148         PATH=$(abs_top_builddir)/tests/gpgscm:$(PATH) \
149         abs_top_srcdir=$(abs_top_srcdir) \
150         objdir=$(abs_top_builddir) \
151         GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm
152
153 .PHONY: check-all
154 check-all:
155         $(TESTS_ENVIRONMENT) \
156           $(abs_top_builddir)/tests/gpgscm/gpgscm \
157           $(abs_srcdir)/tests/run-tests.scm $(TESTFLAGS) $(TESTS)