~drizzle-trunk/drizzle/development

1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
1
# Makefile for program source directory in GNU NLS utilities package.
2
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
3
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
4
#
5
# This file may be copied and used freely without restrictions.  It may
6
# be used in projects which are not available under a GNU Public License,
7
# but which still want to provide support for the GNU gettext functionality.
8
#
9
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
10
#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
11
#
12
# - Modified by jacob berkman <jacob@ximian.com> to install
13
#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
14
#
15
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
16
#
17
# We have the following line for use by intltoolize:
18
# INTLTOOL_MAKEFILE
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
19
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
20
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
21
PACKAGE = @PACKAGE@
22
VERSION = @VERSION@
23
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
24
SHELL = @SHELL@
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
25
26
srcdir = @srcdir@
27
top_srcdir = @top_srcdir@
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
28
top_builddir = @top_builddir@
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
29
VPATH = @srcdir@
30
31
prefix = @prefix@
32
exec_prefix = @exec_prefix@
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
33
datadir = @datadir@
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
34
datarootdir = @datarootdir@
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
35
libdir = @libdir@
36
DATADIRNAME = @DATADIRNAME@
37
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
38
subdir = po
39
install_sh = @install_sh@
40
# Automake >= 1.8 provides @mkdir_p@.
41
# Until it can be supposed, use the safe fallback:
42
mkdir_p = $(install_sh) -d
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
43
44
INSTALL = @INSTALL@
45
INSTALL_DATA = @INSTALL_DATA@
46
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
47
GMSGFMT = @GMSGFMT@
48
MSGFMT = @MSGFMT@
49
XGETTEXT = @XGETTEXT@
50
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
51
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
2167.2.5 by Monty Taylor
Let's not vomit on tarball builds on missing po mentions.
52
INTLTOOL_WARNINGS = @INTLTOOL_WARNINGS@
1667.4.7 by Monty Taylor
Use gnu xgettext on solaris.
53
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) XGETTEXT=$(XGETTEXT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
54
GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) XGETTEXT=$(XGETTEXT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
55
56
ALL_LINGUAS = @ALL_LINGUAS@
57
58
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
59
60
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
61
62
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
63
64
POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
65
66
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
67
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
68
69
POTFILES = \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
70
# This comment gets stripped out
71
72
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
73
74
.SUFFIXES:
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
75
.SUFFIXES: .po .pox .gmo .mo .msg .cat
76
77
.po.pox:
78
	$(MAKE) $(GETTEXT_PACKAGE).pot
79
	$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
80
81
.po.mo:
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
82
	$(MSGFMT) -o $@ $<
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
83
84
.po.gmo:
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
85
	file=`echo $* | sed 's,.*/,,'`.gmo \
86
	  && rm -f $$file && $(GMSGFMT) -o $$file $<
87
88
.po.cat:
89
	sed -f ../intl/po2msg.sed < $< > $*.msg \
90
	  && rm -f $@ && gencat $@ $*.msg
91
92
93
all: all-@USE_NLS@
94
95
all-yes: $(CATALOGS)
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
96
all-no:
97
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
98
$(GETTEXT_PACKAGE).pot: $(POTFILES)
99
	$(GENPOT)
100
101
install: install-data
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
102
install-data: install-data-@USE_NLS@
103
install-data-no: all
104
install-data-yes: all
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
105
	linguas="$(USE_LINGUAS)"; \
106
	for lang in $$linguas; do \
107
	  dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
108
	  $(mkdir_p) $$dir; \
109
	  if test -r $$lang.gmo; then \
110
	    $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
111
	    echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
112
	  else \
113
	    $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
114
	    echo "installing $(srcdir)/$$lang.gmo as" \
115
		 "$$dir/$(GETTEXT_PACKAGE).mo"; \
116
	  fi; \
117
	  if test -r $$lang.gmo.m; then \
118
	    $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
119
	    echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
120
	  else \
121
	    if test -r $(srcdir)/$$lang.gmo.m ; then \
122
	      $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
123
		$$dir/$(GETTEXT_PACKAGE).mo.m; \
124
	      echo "installing $(srcdir)/$$lang.gmo.m as" \
125
		   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
126
	    else \
127
	      true; \
128
	    fi; \
129
	  fi; \
130
	done
131
132
# Empty stubs to satisfy archaic automake needs
133
dvi info ctags tags CTAGS TAGS ID:
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
134
135
# Define this as empty until I found a useful application.
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
136
install-exec installcheck:
137
138
uninstall:
139
	linguas="$(USE_LINGUAS)"; \
140
	for lang in $$linguas; do \
141
	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
142
	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
143
	done
144
145
check: all $(GETTEXT_PACKAGE).pot
146
	rm -f missing notexist
147
	srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
2187.3.7 by Monty Taylor
Fixed two tiny things.
148
	if [ -r missing -o -r notexist -a "x${INTLTOOL_WARNINGS}" = "xyes" ]; then \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
149
	  exit 1; \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
150
	fi
151
152
mostlyclean:
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
153
	rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
154
	rm -f .intltool-merge-cache
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
155
156
clean: mostlyclean
157
158
distclean: clean
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
159
	rm -f Makefile Makefile.in POTFILES stamp-it
160
	rm -f *.mo *.msg *.cat *.cat.m *.gmo
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
161
162
maintainer-clean: distclean
163
	@echo "This command is intended for maintainers to use;"
164
	@echo "it deletes files that may require special tools to rebuild."
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
165
	rm -f Makefile.in.in
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
166
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
167
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
168
dist distdir: $(DISTFILES)
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
169
	dists="$(DISTFILES)"; \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
170
	extra_dists="$(EXTRA_DISTFILES)"; \
171
	for file in $$extra_dists; do \
172
	  test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
173
	done; \
174
	for file in $$dists; do \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
175
	  test -f $$file || file="$(srcdir)/$$file"; \
176
	  ln $$file $(distdir) 2> /dev/null \
177
	    || cp -p $$file $(distdir); \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
178
	done
179
180
update-po: Makefile
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
181
	$(MAKE) $(GETTEXT_PACKAGE).pot
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
182
	tmpdir=`pwd`; \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
183
	linguas="$(USE_LINGUAS)"; \
184
	for lang in $$linguas; do \
185
	  echo "$$lang:"; \
186
	  result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
187
	  if $$result; then \
188
	    if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
189
	      rm -f $$tmpdir/$$lang.new.po; \
190
            else \
191
	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
192
	        :; \
193
	      else \
194
	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
195
	        rm -f $$tmpdir/$$lang.new.po; \
196
	        exit 1; \
197
	      fi; \
198
	    fi; \
199
	  else \
200
	    echo "msgmerge for $$lang.gmo failed!"; \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
201
	    rm -f $$tmpdir/$$lang.new.po; \
202
	  fi; \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
203
	done
204
205
Makefile POTFILES: stamp-it
206
	@if test ! -f $@; then \
207
	  rm -f stamp-it; \
208
	  $(MAKE) stamp-it; \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
209
	fi
210
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
211
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
212
	cd $(top_builddir) \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
213
	  && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
214
	       $(SHELL) ./config.status
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
215
1731.5.2 by Monty Taylor
Added sphinx to the build.
216
# We need one of these so we don't break if the html rule is used.
217
html:
218
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
219
# Tell versions [3.59,3.63) of GNU make not to export all variables.
220
# Otherwise a system limit (for SysV at least) may be exceeded.
221
.NOEXPORT: