Imported Upstream version 2.0.28
[platform/upstream/gpg2.git] / Makefile.am
1 # Makefile.am - Top level makefile for GnuPG
2 #       Copyright (C) 2001, 2004, 2012 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 <http://www.gnu.org/licenses/>.
18
19 ## Process this file with automake to produce Makefile.in
20
21 ACLOCAL_AMFLAGS = -I m4 -I gl/m4
22 DISTCHECK_CONFIGURE_FLAGS = --enable-symcryptrun --enable-mailto --enable-gpgtar
23
24 GITLOG_TO_CHANGELOG=gitlog-to-changelog
25
26 EXTRA_DIST = scripts/config.rpath autogen.sh README.GIT              \
27              ChangeLog-2011 po/ChangeLog-2011 scripts/ChangeLog-2011
28
29 DISTCLEANFILES = g10defs.h
30
31 if BUILD_GPGSM
32 kbx = kbx
33 else
34 kbx =
35 endif
36
37
38 if BUILD_GPG
39 gpg = g10
40 keyserver = keyserver
41 else
42 gpg =
43 keyserver =
44 endif
45 if BUILD_GPGSM
46 sm = sm
47 else
48 sm =
49 endif
50 if BUILD_AGENT
51 agent = agent
52 else
53 agent =
54 endif
55 if BUILD_SCDAEMON
56 scd = scd
57 else
58 scd =
59 endif
60 if BUILD_TOOLS
61 tools = tools
62 else
63 tools =
64 endif
65 if BUILD_DOC
66 doc = doc
67 else
68 doc =
69 endif
70
71 if HAVE_W32_SYSTEM
72 tests =
73 else
74 tests = tests
75 endif
76
77 SUBDIRS = m4 gl include jnlib common ${kbx} \
78  ${gpg} ${keyserver} ${sm} ${agent} ${scd} ${tools} po ${doc} ${tests}
79
80 dist_doc_DATA = README
81
82
83 dist-hook: gen-ChangeLog
84         echo "$(VERSION)" > $(distdir)/VERSION
85
86
87 gen_start_date = 2011-12-01T06:00:00
88 .PHONY: gen-ChangeLog
89 gen-ChangeLog:
90         set -e;                                                         \
91         if test -d $(top_srcdir)/.git; then                             \
92           (cd $(top_srcdir) &&                                          \
93             $(GITLOG_TO_CHANGELOG) --append-dot --tear-off              \
94             --amend=scripts/git-log-fix                                 \
95             --since=$(gen_start_date) ) > $(distdir)/cl-t;              \
96           cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t;  \
97           rm -f $(distdir)/ChangeLog;                                   \
98           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
99         fi
100
101
102 stowinstall:
103         $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg