source: projects/vine-notify-update/po/Makefile @ 9642

Revision 9642, 7.1 KB checked in by daisuke, 9 years ago (diff)

add initial version of vine-notify-update

Line 
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
19
20GETTEXT_PACKAGE = vine-notify-update
21PACKAGE = vine-notify-update
22VERSION = 0.5
23
24SHELL = /bin/sh
25
26srcdir = .
27top_srcdir = ..
28top_builddir = ..
29
30
31prefix = /usr/local
32exec_prefix = ${prefix}
33datadir = ${datarootdir}
34datarootdir = ${prefix}/share
35libdir = ${exec_prefix}/lib
36DATADIRNAME = share
37itlocaledir = $(prefix)/$(DATADIRNAME)/locale
38subdir = po
39install_sh = ${SHELL} /home/tomop/data/src/vine-notify-update/install-sh
40# Automake >= 1.8 provides /bin/mkdir -p.
41# Until it can be supposed, use the safe fallback:
42mkdir_p = $(install_sh) -d
43
44INSTALL = /usr/bin/install -c
45INSTALL_DATA = ${INSTALL} -m 644
46
47GMSGFMT = /usr/bin/msgfmt
48MSGFMT = /usr/bin/msgfmt
49XGETTEXT = /usr/bin/xgettext
50INTLTOOL_UPDATE = /usr/bin/intltool-update
51INTLTOOL_EXTRACT = /usr/bin/intltool-extract
52MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
53GENPOT   = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
54
55ALL_LINGUAS = 
56
57PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
58
59USER_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
61USE_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
63POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
64
65DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
66EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
67
68POTFILES = \
69        ../src/vine-notify-update.vala \
70        ../data/vine-notify-update.glade
71
72CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
73
74.SUFFIXES:
75.SUFFIXES: .po .pox .gmo .mo .msg .cat
76
77AM_DEFAULT_VERBOSITY = 0
78INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
79INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
80INTLTOOL__v_MSGFMT_0 = @echo "  MSGFMT" $@;
81
82.po.pox:
83        $(MAKE) $(GETTEXT_PACKAGE).pot
84        $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
85
86.po.mo:
87        $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
88
89.po.gmo:
90        $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
91          && rm -f $$file && $(GMSGFMT) -o $$file $<
92
93.po.cat:
94        sed -f ../intl/po2msg.sed < $< > $*.msg \
95          && rm -f $@ && gencat $@ $*.msg
96
97
98all: all-yes
99
100all-yes: $(CATALOGS)
101all-no:
102
103$(GETTEXT_PACKAGE).pot: $(POTFILES)
104        $(GENPOT)
105
106install: install-data
107install-data: install-data-yes
108install-data-no: all
109install-data-yes: all
110        linguas="$(USE_LINGUAS)"; \
111        for lang in $$linguas; do \
112          dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
113          $(mkdir_p) $$dir; \
114          if test -r $$lang.gmo; then \
115            $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
116            echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
117          else \
118            $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
119            echo "installing $(srcdir)/$$lang.gmo as" \
120                 "$$dir/$(GETTEXT_PACKAGE).mo"; \
121          fi; \
122          if test -r $$lang.gmo.m; then \
123            $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
124            echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
125          else \
126            if test -r $(srcdir)/$$lang.gmo.m ; then \
127              $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
128                $$dir/$(GETTEXT_PACKAGE).mo.m; \
129              echo "installing $(srcdir)/$$lang.gmo.m as" \
130                   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
131            else \
132              true; \
133            fi; \
134          fi; \
135        done
136
137# Empty stubs to satisfy archaic automake needs
138dvi info ctags tags CTAGS TAGS ID:
139
140# Define this as empty until I found a useful application.
141install-exec installcheck:
142
143uninstall:
144        linguas="$(USE_LINGUAS)"; \
145        for lang in $$linguas; do \
146          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
147          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
148        done
149
150check: all $(GETTEXT_PACKAGE).pot
151        rm -f missing notexist
152        srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
153        if [ -r missing -o -r notexist ]; then \
154          exit 1; \
155        fi
156
157mostlyclean:
158        rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
159        rm -f .intltool-merge-cache
160
161clean: mostlyclean
162
163distclean: clean
164        rm -f Makefile Makefile.in POTFILES stamp-it
165        rm -f *.mo *.msg *.cat *.cat.m *.gmo
166
167maintainer-clean: distclean
168        @echo "This command is intended for maintainers to use;"
169        @echo "it deletes files that may require special tools to rebuild."
170        rm -f Makefile.in.in
171
172distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
173dist distdir: $(DISTFILES)
174        dists="$(DISTFILES)"; \
175        extra_dists="$(EXTRA_DISTFILES)"; \
176        for file in $$extra_dists; do \
177          test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
178        done; \
179        for file in $$dists; do \
180          test -f $$file || file="$(srcdir)/$$file"; \
181          ln $$file $(distdir) 2> /dev/null \
182            || cp -p $$file $(distdir); \
183        done
184
185update-po: Makefile
186        $(MAKE) $(GETTEXT_PACKAGE).pot
187        tmpdir=`pwd`; \
188        linguas="$(USE_LINGUAS)"; \
189        for lang in $$linguas; do \
190          echo "$$lang:"; \
191          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
192          if $$result; then \
193            if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
194              rm -f $$tmpdir/$$lang.new.po; \
195            else \
196              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
197                :; \
198              else \
199                echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
200                rm -f $$tmpdir/$$lang.new.po; \
201                exit 1; \
202              fi; \
203            fi; \
204          else \
205            echo "msgmerge for $$lang.gmo failed!"; \
206            rm -f $$tmpdir/$$lang.new.po; \
207          fi; \
208        done
209
210Makefile POTFILES: stamp-it
211        @if test ! -f $@; then \
212          rm -f stamp-it; \
213          $(MAKE) stamp-it; \
214        fi
215
216stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
217        cd $(top_builddir) \
218          && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
219               $(SHELL) ./config.status
220
221# Tell versions [3.59,3.63) of GNU make not to export all variables.
222# Otherwise a system limit (for SysV at least) may be exceeded.
223.NOEXPORT:
Note: See TracBrowser for help on using the repository browser.