Merge branch 'gpg4win-2'
[gpg4win.git] / Makefile.am
1 # Makefile.am - Installer for GnuPG 4 Windows Makefile.
2 # Copyright (C) 2005, 2008, 2012 g10 Code GmbH
3 #
4 # This file is part of GPG4Win.
5 #
6 # GPG4Win 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 2 of the License, or
9 # (at your option) any later version.
10 #
11 # GPG4Win 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 ACLOCAL_AMFLAGS = -I m4
20 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
21 DISTCHECK_CONFIGURE_FLAGS = --host=i686-w64-mingw32
22
23 SUBDIRS = po packages doc src
24
25 # find patches -type f | sort | sed 's/$/ \\/' | sed 's/^/             /'
26
27 EXTRA_DIST = autogen.sh README.GIT ONEWS \
28         doc/license-page doc/GPLv3 \
29         build-aux/git-log-footer build-aux/git-log-fix \
30         patches/glib-2.41.5/01-socket.patch \
31         patches/w32pth-2.0.5/workaround-broken-libtool.patch
32
33 copy-news:
34         cp NEWS doc/website/NEWS.last
35
36
37 copy-release: gpg4win-$(VERSION).tar.bz2 src/gpg4win-$(VERSION).exe \
38               src/gpg4win-light-$(VERSION).exe \
39               src/gpg4win-vanilla-$(VERSION).exe
40         @echo Copying $(VERSION) to $(RELEASEHOST) >&2
41         @set -e;\
42         if ssh "$$(echo $(RELEASEHOST)|cut -d: -f -1)" \
43         test -f "$$(echo $(RELEASEHOST)/gpg4win-$(VERSION).exe|cut -d: -f2-)";\
44         then echo "This release has already been copied to the server" >&2 ;\
45         else scp gpg4win-$(VERSION).tar.bz2 \
46                  src/gpg4win-$(VERSION).exe \
47                  src/gpg4win-light-$(VERSION).exe \
48                  src/gpg4win-vanilla-$(VERSION).exe \
49                  src/gpg4win-src-$(VERSION).exe  $(RELEASEHOST)/ ;\
50              for f in en de ; do \
51                scp src/README.$$f.txt \
52                      $(RELEASEHOST)/README-$(VERSION).$$f.txt; \
53              done;\
54         fi
55
56 dist-hook: gen-ChangeLog
57
58 gen_start_date = 2012-03-26T00:00:00
59 .PHONY: gen-ChangeLog
60 gen-ChangeLog:
61         set -e;                                                         \
62         if test -d $(top_srcdir)/.git; then                             \
63           (cd $(top_srcdir) &&                                          \
64             $(GITLOG_TO_CHANGELOG) --append-dot --tear-off              \
65             --amend=build-aux/git-log-fix                               \
66             --since=$(gen_start_date) ) > $(distdir)/cl-t;              \
67           cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
68           rm -f $(distdir)/ChangeLog;                                   \
69           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
70         fi