• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/gettext-0.17/gettext-tools/libgettextpo/
1## Makefile for the gettext-tools/libgettextpo subdirectory of GNU gettext
2## Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
3##
4## This program is free software: you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 3 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17## Process this file with automake to produce Makefile.in.
18
19AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
20EXTRA_DIST =
21BUILT_SOURCES =
22MOSTLYCLEANFILES = core *.stackdump
23CLEANFILES =
24DISTCLEANFILES =
25MAINTAINERCLEANFILES =
26SUFFIXES =
27
28lib_LTLIBRARIES = libgettextpo.la
29
30nodist_include_HEADERS = gettext-po.h
31
32noinst_LTLIBRARIES =
33
34nodist_noinst_HEADERS = config.h
35
36AM_CPPFLAGS = \
37  -I. -I$(srcdir) \
38  -I.. -I$(top_srcdir) \
39  -I../src -I$(top_srcdir)/src \
40  -I../intl -I$(top_srcdir)/../gettext-runtime/intl
41
42# libgettextpo contains the public API for PO files.
43libgettextpo_la_SOURCES = \
44  gettext-po.c \
45  $(libgettextpo_la_AUXSOURCES)
46# These are auxiliary sources whose symbols should not be exported.
47libgettextpo_la_AUXSOURCES = \
48  ../src/str-list.c \
49  ../src/dir-list.c \
50  ../src/message.c \
51  ../src/msgl-ascii.c \
52  ../src/po-error.c \
53  ../src/po-xerror.c \
54  ../src/write-catalog.c \
55  ../src/write-po.c \
56  ../src/open-catalog.c \
57  ../src/po-charset.c \
58  ../src/po-lex.c \
59  ../src/po-gram-gen.c \
60  ../src/read-po.c \
61  ../src/read-catalog-abstract.c \
62  ../src/read-catalog.c \
63  ../src/plural-table.c \
64  ../src/format-c.c \
65  ../src/format-sh.c \
66  ../src/format-python.c \
67  ../src/format-lisp.c \
68  ../src/format-elisp.c \
69  ../src/format-librep.c \
70  ../src/format-scheme.c \
71  ../src/format-java.c \
72  ../src/format-csharp.c \
73  ../src/format-awk.c \
74  ../src/format-pascal.c \
75  ../src/format-ycp.c \
76  ../src/format-tcl.c \
77  ../src/format-perl.c \
78  ../src/format-perl-brace.c \
79  ../src/format-php.c \
80  ../src/format-gcc-internal.c \
81  ../src/format-qt.c \
82  ../src/format-kde.c \
83  ../src/format-boost.c \
84  ../src/format.c \
85  ../src/plural-exp.c \
86  ../src/plural-eval.c \
87  ../src/msgl-check.c
88
89# Libtool's library version information for libgettextpo.
90# See the libtool documentation, section "Library interface versions".
91LTV_CURRENT=4
92LTV_REVISION=0
93LTV_AGE=4
94
95# How to build libgettextpo.la.
96# Don't make it depend on libgettextsrc.la or libgettextlib.la, since they
97# define an uncontrolled amount of symbols.
98libgettextpo_la_LIBADD = libgnu.la $(WOE32_LDADD)
99libgettextpo_la_LDFLAGS = \
100  -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
101  -rpath $(libdir) \
102  @LTLIBINTL@ @LTLIBICONV@ -lc @LTNOUNDEF@
103
104# Tell the mingw or Cygwin linker which symbols to export.
105if WOE32DLL
106libgettextpo_la_SOURCES += ../woe32dll/gettextpo-exports.c
107libgettextpo_la_LDFLAGS += -Wl,--export-all-symbols
108endif
109
110# Version information according to Woe32 conventions.
111EXTRA_DIST += libgettextpo.rc
112if WOE32
113WOE32_LDADD = libgettextpo.res
114libgettextpo.res : $(srcdir)/libgettextpo.rc
115	$(WINDRES) `$(SHELL) $(top_srcdir)/../windows/windres-options --escape $(VERSION)` -i $(srcdir)/libgettextpo.rc -o libgettextpo.res --output-format=coff
116MOSTLYCLEANFILES += libgettextpo.res
117else
118WOE32_LDADD =
119endif
120
121# Hide symbols that are defined by libgettextpo_la_AUXSOURCES or libgnu.la
122# from the global namespace, by prefixing them with "libgettextpo_".
123all check install: config.h
124config.h: $(BUILT_SOURCES)
125	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
126	  : "Avoid double inclusion, to avoid a warning about redefinition of DLL_VARIABLE."; \
127	  echo '#ifndef GTPO_CONFIG_H'; \
128	  echo '#define GTPO_CONFIG_H'; \
129	  echo; \
130	  echo '#include "../config.h"'; \
131	  : "Turn all gettext() calls into dgettext() calls."; \
132	  echo '#define DEFAULT_TEXT_DOMAIN "gettext-tools"'; \
133	  : "All code is collected in a single library,"; \
134	  : "No references to variables in other libraries exist."; \
135	  echo '#undef DLL_VARIABLE'; \
136	  echo '#define DLL_VARIABLE'; \
137	  echo; \
138	  echo '#endif /* GTPO_CONFIG_H */'; \
139	} > config.h && \
140	if test -n "$(HAVE_GLOBAL_SYMBOL_PIPE)"; then \
141	  { \
142	    for f in $(libgettextpo_la_AUXSOURCES) $(libgnu_la_SOURCES) $(libgnu_la_LIBADD); do \
143	      case $$f in \
144	        *.c | *.$(OBJEXT) | *.lo ) \
145	          sf=`echo "$$f" | sed -e 's,\\.[^.]*$$,,'`.c; \
146	          test -f $$sf || sf=$(srcdir)/$$sf; \
147	          of=`echo "$$f" | sed -e 's,^.*/,,' -e 's,\\.[^.]*$$,,'`.$(OBJEXT); \
148	          $(COMPILE) -c $$sf || { rm -f config.h; exit 1; }; \
149	          sh ./exported.sh $$of 1>&5; \
150	          rm -f $$of `echo "$$of" | sed -e 's,\\.$(OBJEXT)$$,.lo,'`; \
151	          ;; \
152	      esac; \
153	    done; \
154	  } 5>&1 \
155	    | sed -e 's,.* ,,' | LC_ALL=C sort | LC_ALL=C uniq \
156	    | sed -e 's,^obstack_free$$,__obstack_free,' \
157	    | sed -e 's,^\(.*\)$$,#define \1 libgettextpo_\1,' > config.h-t && \
158	  if test -f config.h; then \
159	    cat config.h-t >> config.h; \
160	    rm -f config.h-t; \
161	  else \
162	    rm -f config.h-t; \
163	    exit 1; \
164	  fi \
165	fi
166MOSTLYCLEANFILES += config.h config.h-t
167
168# Special rules for installable include files that export variables.
169
170EXTRA_DIST += gettext-po.h.in
171BUILT_SOURCES += gettext-po.h
172CLEANFILES += gettext-po.h
173gettext-po.h: gettext-po.h.in
174if WOE32DLL
175	sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/' $(srcdir)/gettext-po.h.in > gettext-po.h-tmp
176else
177	cp $(srcdir)/gettext-po.h.in gettext-po.h-tmp
178endif
179	mv gettext-po.h-tmp gettext-po.h
180
181# A small set of gnulib modules is needed here as well.
182include Makefile.gnulib
183