Imported Upstream version 1.10
[platform/upstream/libgpg-error.git] / Makefile.am
1 # Makefile.am for libgpg-error.
2 # Copyright (C) 2003, 2006, 2007 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, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
20 ACLOCAL_AMFLAGS = -I m4
21 AUTOMAKE_OPTIONS = dist-bzip2
22
23 EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in COPYING COPYING.LIB \
24              potomo
25
26 if LANGUAGES_SOME
27 lang_subdirs = lang
28 else
29 lang_subdirs =
30 endif
31
32 SUBDIRS = m4 src tests po $(lang_subdirs)
33
34
35 dist-hook:
36         sed -e 's/@pkg_version@/$(VERSION)/g' \
37             $(top_srcdir)/libgpg-error.spec.in  > $(distdir)/libgpg-error.spec
38         @set -e; echo "$(VERSION)" > $(distdir)/VERSION
39
40 if HAVE_W32_SYSTEM
41 install-data-hook:
42         set -e; \
43         for i in $$($(top_srcdir)/potomo --get-linguas $(top_srcdir)/po); do \
44            $(MKDIR_P) "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES" || true; \
45            rm -f "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/libgpg-error.mo" \
46                                                  2>/dev/null || true; \
47            $(top_srcdir)/potomo $(top_srcdir)/po/$$i.po \
48               "$(DESTDIR)$(localedir)/$$i/LC_MESSAGES/libgpg-error.mo" ; \
49         done
50 endif
51
52 stowinstall: 
53         $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgpg-error
54