Use attribute __gnu_printf__ with our estream-printf functions.
[gnupg.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 <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 = build-aux/config.rpath build-aux/potomo autogen.sh autogen.rc
27              ChangeLog-2011 po/ChangeLog-2011 build-aux/ChangeLog-2011 \
28              build-aux/gitlog-to-changelog \
29              build-aux/git-log-fix build-aux/git-log-footer \
30              build-aux/speedo.mk README.GIT
31
32 DISTCLEANFILES = g10defs.h
33
34 if BUILD_GPGSM
35 kbx = kbx
36 else
37 kbx =
38 endif
39
40
41 if BUILD_GPG
42 gpg = g10
43 if !HAVE_W32CE_SYSTEM
44 keyserver =
45 endif
46 else
47 gpg =
48 keyserver =
49 endif
50 if BUILD_GPGSM
51 sm = sm
52 else
53 sm =
54 endif
55 if BUILD_AGENT
56 agent = agent
57 else
58 agent =
59 endif
60 if BUILD_SCDAEMON
61 scd = scd
62 else
63 scd =
64 endif
65 if BUILD_G13
66 g13 = g13
67 else
68 g13 =
69 endif
70 if BUILD_DIRMNGR
71 dirmngr = dirmngr
72 else
73 dirmngr =
74 endif
75 if BUILD_TOOLS
76 tools = tools
77 else
78 tools =
79 endif
80 if BUILD_DOC
81 doc = doc
82 else
83 doc =
84 endif
85
86 if RUN_TESTS
87 tests = tests
88 else
89 tests =
90 endif
91
92 SUBDIRS = m4 gl common ${kbx} \
93           ${gpg} ${keyserver} ${sm} ${agent} ${scd} ${g13} ${dirmngr} \
94           ${tools} po ${doc} ${tests}
95
96 dist_doc_DATA = README
97
98
99 dist-hook: gen-ChangeLog
100         echo "$(VERSION)" > $(distdir)/VERSION
101
102 if HAVE_W32_SYSTEM
103 install-data-hook:
104         set -e; \
105         for i in $$($(top_srcdir)/build-aux/potomo \
106                      --get-linguas $(top_srcdir)/po) ; do \
107            $(MKDIR_P) "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES" || true; \
108            rm -f "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" \
109                                                  2>/dev/null || true; \
110            $(top_srcdir)/build-aux/potomo $(top_srcdir)/po/$$i.po \
111               "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" ; \
112         done
113 endif
114
115
116 gen_start_date = 2011-12-01T06:00:00
117 .PHONY: gen-ChangeLog
118 gen-ChangeLog:
119         if test -d $(top_srcdir)/.git; then                             \
120           (cd $(top_srcdir) &&                                          \
121             $(GITLOG_TO_CHANGELOG) --append-dot --tear-off              \
122             --amend=build-aux/git-log-fix                               \
123             --since=$(gen_start_date) ) > $(distdir)/cl-t;              \
124           cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;  \
125           rm -f $(distdir)/ChangeLog;                                   \
126           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
127         fi
128
129
130 stowinstall:
131         $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg