~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@
1667.4.7 by Monty Taylor
Use gnu xgettext on solaris.
52
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) XGETTEXT=$(XGETTEXT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
53
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.
54
55
ALL_LINGUAS = @ALL_LINGUAS@
56
57
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
58
59
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)
60
61
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)
62
63
POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
64
65
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
66
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
67
68
POTFILES = \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
69
# This comment gets stripped out
70
71
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.
72
73
.SUFFIXES:
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
74
.SUFFIXES: .po .pox .gmo .mo .msg .cat
75
76
.po.pox:
77
	$(MAKE) $(GETTEXT_PACKAGE).pot
78
	$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
79
80
.po.mo:
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
81
	$(MSGFMT) -o $@ $<
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
82
83
.po.gmo:
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
84
	file=`echo $* | sed 's,.*/,,'`.gmo \
85
	  && rm -f $$file && $(GMSGFMT) -o $$file $<
86
87
.po.cat:
88
	sed -f ../intl/po2msg.sed < $< > $*.msg \
89
	  && rm -f $@ && gencat $@ $*.msg
90
91
92
all: all-@USE_NLS@
93
94
all-yes: $(CATALOGS)
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
95
all-no:
96
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
97
$(GETTEXT_PACKAGE).pot: $(POTFILES)
98
	$(GENPOT)
99
100
install: install-data
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
101
install-data: install-data-@USE_NLS@
102
install-data-no: all
103
install-data-yes: all
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
104
	linguas="$(USE_LINGUAS)"; \
105
	for lang in $$linguas; do \
106
	  dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
107
	  $(mkdir_p) $$dir; \
108
	  if test -r $$lang.gmo; then \
109
	    $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
110
	    echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
111
	  else \
112
	    $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
113
	    echo "installing $(srcdir)/$$lang.gmo as" \
114
		 "$$dir/$(GETTEXT_PACKAGE).mo"; \
115
	  fi; \
116
	  if test -r $$lang.gmo.m; then \
117
	    $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
118
	    echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
119
	  else \
120
	    if test -r $(srcdir)/$$lang.gmo.m ; then \
121
	      $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
122
		$$dir/$(GETTEXT_PACKAGE).mo.m; \
123
	      echo "installing $(srcdir)/$$lang.gmo.m as" \
124
		   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
125
	    else \
126
	      true; \
127
	    fi; \
128
	  fi; \
129
	done
130
131
# Empty stubs to satisfy archaic automake needs
132
dvi info ctags tags CTAGS TAGS ID:
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
133
134
# 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.
135
install-exec installcheck:
136
137
uninstall:
138
	linguas="$(USE_LINGUAS)"; \
139
	for lang in $$linguas; do \
140
	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
141
	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
142
	done
143
144
check: all $(GETTEXT_PACKAGE).pot
145
	rm -f missing notexist
146
	srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
147
	if [ -r missing -o -r notexist ]; then \
148
	  exit 1; \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
149
	fi
150
151
mostlyclean:
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
152
	rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
153
	rm -f .intltool-merge-cache
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
154
155
clean: mostlyclean
156
157
distclean: clean
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
158
	rm -f Makefile Makefile.in POTFILES stamp-it
159
	rm -f *.mo *.msg *.cat *.cat.m *.gmo
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
160
161
maintainer-clean: distclean
162
	@echo "This command is intended for maintainers to use;"
163
	@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.
164
	rm -f Makefile.in.in
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
165
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
166
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
167
dist distdir: $(DISTFILES)
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
168
	dists="$(DISTFILES)"; \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
169
	extra_dists="$(EXTRA_DISTFILES)"; \
170
	for file in $$extra_dists; do \
171
	  test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
172
	done; \
173
	for file in $$dists; do \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
174
	  test -f $$file || file="$(srcdir)/$$file"; \
175
	  ln $$file $(distdir) 2> /dev/null \
176
	    || cp -p $$file $(distdir); \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
177
	done
178
179
update-po: Makefile
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
180
	$(MAKE) $(GETTEXT_PACKAGE).pot
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
181
	tmpdir=`pwd`; \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
182
	linguas="$(USE_LINGUAS)"; \
183
	for lang in $$linguas; do \
184
	  echo "$$lang:"; \
185
	  result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
186
	  if $$result; then \
187
	    if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
188
	      rm -f $$tmpdir/$$lang.new.po; \
189
            else \
190
	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
191
	        :; \
192
	      else \
193
	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
194
	        rm -f $$tmpdir/$$lang.new.po; \
195
	        exit 1; \
196
	      fi; \
197
	    fi; \
198
	  else \
199
	    echo "msgmerge for $$lang.gmo failed!"; \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
200
	    rm -f $$tmpdir/$$lang.new.po; \
201
	  fi; \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
202
	done
203
204
Makefile POTFILES: stamp-it
205
	@if test ! -f $@; then \
206
	  rm -f stamp-it; \
207
	  $(MAKE) stamp-it; \
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
208
	fi
209
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
210
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
211
	cd $(top_builddir) \
1667.4.1 by Monty Taylor
Removed gettext - replaced with intltool. Dear god it's so much better.
212
	  && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
213
	       $(SHELL) ./config.status
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
214
1731.5.2 by Monty Taylor
Added sphinx to the build.
215
# We need one of these so we don't break if the html rule is used.
216
html:
217
202.3.1 by Monty Taylor
Added very initial gettextize stuff.
218
# Tell versions [3.59,3.63) of GNU make not to export all variables.
219
# Otherwise a system limit (for SysV at least) may be exceeded.
220
.NOEXPORT: