Revert last change, add comment about link() return values.
[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 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
23 DISTCHECK_CONFIGURE_FLAGS = --enable-symcryptrun --enable-mailto --enable-gpgtar
24
25 EXTRA_DIST = scripts/config.rpath scripts/potomo autogen.sh README.GIT \
26              ChangeLog-2011 po/ChangeLog-2011 scripts/ChangeLog-2011 \
27              scripts/gitlog-to-changelog \
28              scripts/git-log-fix scripts/git-log-footer
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 if !HAVE_W32CE_SYSTEM
41 keyserver =
42 endif
43 else
44 gpg =
45 keyserver =
46 endif
47 if BUILD_GPGSM
48 sm = sm
49 else
50 sm =
51 endif
52 if BUILD_AGENT
53 agent = agent
54 else
55 agent =
56 endif
57 if BUILD_SCDAEMON
58 scd = scd
59 else
60 scd =
61 endif
62 if BUILD_G13
63 g13 = g13
64 else
65 g13 =
66 endif
67 if BUILD_DIRMNGR
68 dirmngr = dirmngr
69 else
70 dirmngr =
71 endif
72 if BUILD_TOOLS
73 tools = tools
74 else
75 tools =
76 endif
77 if BUILD_DOC
78 doc = doc
79 else
80 doc =
81 endif
82
83 if HAVE_W32_SYSTEM
84 tests =
85 else
86 tests = tests
87 endif
88
89 SUBDIRS = m4 gl include common ${kbx} \
90           ${gpg} ${keyserver} ${sm} ${agent} ${scd} ${g13} ${dirmngr} \
91           ${tools} po ${doc} ${tests}
92
93 dist_doc_DATA = README
94
95
96 dist-hook: gen-ChangeLog
97         echo "$(VERSION)" > $(distdir)/VERSION
98
99 if HAVE_W32_SYSTEM
100 install-data-hook:
101         set -e; \
102         for i in $$($(top_srcdir)/scripts/potomo \
103                      --get-linguas $(top_srcdir)/po) ; do \
104            $(MKDIR_P) "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES" || true; \
105            rm -f "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" \
106                                                  2>/dev/null || true; \
107            $(top_srcdir)/scripts/potomo $(top_srcdir)/po/$$i.po \
108               "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/gnupg2.mo" ; \
109         done
110 endif
111
112
113 gen_start_date = 2011-12-01T06:00:00
114 .PHONY: gen-ChangeLog
115 gen-ChangeLog:
116         if test -d $(top_srcdir)/.git; then                             \
117           (cd $(top_srcdir) &&                                          \
118             ./scripts/gitlog-to-changelog                               \
119             --append-dot --tear-off                                     \
120             --amend=scripts/git-log-fix                                 \
121             --since=$(gen_start_date) ) > $(distdir)/cl-t;              \
122           cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t;  \
123           rm -f $(distdir)/ChangeLog;                                   \
124           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
125         fi
126
127
128 stowinstall:
129         $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg