Makefile.am 1.69 KB
Newer Older
1
2
3
4
## Process this file with automake to produce Makefile.in

tipsdatadir = $(gimpdatadir)/tips

5
6
7
8
tips_in_files = gimp-tips.xml.in

tipsdata_DATA = $(tips_in_files:.xml.in=.xml)

9
10
11
tips_POFILES = \
	da.po	\
	de.po	\
12
	ja.po	\
13
	pl.po	\
14
	pt.po	\
Stanislav Visnovsky's avatar
Stanislav Visnovsky committed
15
	sk.po	\
16
17
	sv.po	\
	zh_CN.po
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

EXTRA_DIST = \
	ChangeLog			\
	POTFILES.in			\
	$(GETTEXT_PACKAGE)-tips.pot	\
	$(tips_POFILES)			\
	$(tipsdata_DATA)		\
	$(tips_in_files)		\
	gimp-tips.dtd			\
	update.sh

CLEANFILES = $(GETTEXT_PACKAGE)-tips.po

MAINTAINERCLEANFILES = $(tipsdata_DATA)


Sven Neumann's avatar
Sven Neumann committed
34
%.xml: %.xml.in $(srcdir)/$(GETTEXT_PACKAGE)-tips.pot  $(wildcard $(srcdir)/*.po)
35
36
	$(INTLTOOL_MERGE) $(srcdir) $< $(@) -x -u -c .intltool-merge-cache

Sven Neumann's avatar
Sven Neumann committed
37
38
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE)-tips --pot

39
40
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE)-tips --dist

Sven Neumann's avatar
Sven Neumann committed
41
$(srcdir)/$(GETTEXT_PACKAGE)-tips.pot: POTFILES.in
Sven Neumann's avatar
Sven Neumann committed
42
43
	$(GENPOT)

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
update-po: $(srcdir)/$(GETTEXT_PACKAGE)-tips.pot
	PATH=`pwd`/../src:$$PATH; \
	cd $(srcdir); \
	pofiles='$(tips_POFILES)'; \
	for po in $$pofiles; do \
	  lang=`basename $$po .po`; \
	  cp $$lang.po $$lang.old.po; \
	  echo "$$lang:"; \
	  if $(MSGMERGE) $$lang; then \
	    rm -f $$lang.old.po; \
	  else \
	    echo "msgmerge for $$cat failed!"; \
	    rm -f $$lang.po; \
	    mv $$lang.old.po $$lang.po; \
	  fi; \
	done
60

61
dist-hook: update-po gimp-tips.xml
Sven Neumann's avatar
Sven Neumann committed
62
63
64
65
66
67
68
	( xmllint=`which xmllint`; \
	  if test x$$xmllint != x && test -x $$xmllint; then \
	    $$xmllint --noout --valid gimp-tips.xml || \
	      ( echo "* gimp-tips.xml INVALID *"; exit 1; ) \
	  else \
	    echo "Can't find xmllint to validate gimp-tips.xml; proceed with fingers crossed..."; \
	  fi )