Updating to version 1.13. Libgcrypt depends on libgpg-error
[platform/upstream/libgpg-error.git] / Makefile.am
1 # Makefile.am for libgpg-error.
2 # Copyright (C) 2003, 2006, 2007, 2013 g10 Code GmbH
3 #
4 # This file is part of libgpg-error.
5 #
6 # libgpg-error is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation; either version 2.1 of the
9 # License, or (at your option) any later version.
10 #
11 # libgpg-error 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 Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
18
19 ACLOCAL_AMFLAGS = -I m4
20 AUTOMAKE_OPTIONS = dist-bzip2
21
22 # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
23 GITLOG_TO_CHANGELOG=gitlog-to-changelog
24
25 EXTRA_DIST = autogen.sh autogen.rc libgpg-error.spec.in                 \
26              COPYING COPYING.LIB potomo doc/HACKING ChangeLog-2011      \
27              po/ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 \
28              build-aux/git-log-footer  build-aux/git-log-fix
29
30 if LANGUAGES_SOME
31 lang_subdirs = lang
32 else
33 lang_subdirs =
34 endif
35
36 SUBDIRS = m4 src tests po $(lang_subdirs)
37
38
39 dist-hook: gen-ChangeLog
40         sed -e 's/@pkg_version@/$(VERSION)/g' \
41             $(top_srcdir)/libgpg-error.spec.in  > $(distdir)/libgpg-error.spec
42         @set -e; echo "$(VERSION)" > $(distdir)/VERSION
43
44
45 gen_start_date = 2011-12-01T00:00:00
46 .PHONY: gen-ChangeLog
47 gen-ChangeLog:
48         set -e;                                                         \
49         if test -d $(top_srcdir)/.git; then                             \
50           (cd $(top_srcdir) &&                                          \
51             $(GITLOG_TO_CHANGELOG) --append-dot --tear-off              \
52             --amend=build-aux/git-log-fix  --tear-off                   \
53             --since=$(gen_start_date) ) > $(distdir)/cl-t;              \
54           cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
55           rm -f $(distdir)/ChangeLog;                                   \
56           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
57         fi
58
59
60 if HAVE_W32_SYSTEM
61 install-data-hook:
62         set -e; \
63         for i in $$($(top_srcdir)/potomo --get-linguas $(top_srcdir)/po); do \
64            $(MKDIR_P) "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES" || true; \
65            rm -f "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/libgpg-error.mo" \
66                                                  2>/dev/null || true; \
67            $(top_srcdir)/potomo $(top_srcdir)/po/$$i.po \
68               "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/libgpg-error.mo" ; \
69         done
70 endif
71
72 stowinstall:
73         $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgpg-error