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
20ACLOCAL_AMFLAGS = -I m4
21AUTOMAKE_OPTIONS = dist-bzip2
22
23EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in COPYING COPYING.LIB \
24	     potomo
25
26if LANGUAGES_SOME
27lang_subdirs = lang
28else
29lang_subdirs =
30endif
31
32SUBDIRS = m4 src tests po $(lang_subdirs)
33
34
35dist-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
40if HAVE_W32_SYSTEM
41install-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
50endif
51
52stowinstall: 
53	$(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgpg-error
54
55