1 INSTALL
= /usr
/bin
/install -c
2 INSTALL_PROGRAM
= ${INSTALL}
3 INSTALL_DATA
= ${INSTALL} -m
644
4 INSTALLNLSDIR
=$(DESTDIR
)/usr
/share
/locale
8 MSGMERGE
= intltool-update
-x
--gettext-package
=$(NLSPACKAGE
) --dist
12 CATALOGS
= $(shell ls
*.po
)
13 FMTCATALOGS
= $(patsubst %.po
,%.mo
,$(CATALOGS
))
15 PYFILES
= $(wildcard ..
/src
/*.py
) $(wildcard ..
/src
/yumex
/*.py
) $(wildcard ..
/src
/yumgui
/*.py
)
16 GLADEFILES
= $(wildcard ..
/src
/*.glade
)
17 POTFILES
= $(PYFILES
) $(GLADEFILES
)
19 all: $(NLSPACKAGE
).pot
$(FMTCATALOGS
)
22 for file in
$(POTFILES
); do \
23 echo
"$${file#../}" ; \
26 $(NLSPACKAGE
).pot
: $(POTFILES
) POTFILES.in
27 intltool-update
--gettext-package
=$(NLSPACKAGE
) --pot
29 update-po
: Makefile
$(NLSPACKAGE
).pot refresh-po
31 refresh-po
: Makefile POTFILES.in
32 catalogs
='$(CATALOGS)'; \
33 for cat in
$$catalogs; do \
34 lang
=`basename $$cat .po`; \
35 cp
$$lang.po
$$lang.old.po
; \
36 if
$(MSGMERGE
) $$lang ; then \
37 rm -f
$$lang.old.po
; \
38 echo
"$(MSGMERGE) of $$lang succeeded" ; \
40 echo
"$(MSGMERGE) of $$lang failed" ; \
41 mv
$$lang.old.po
$$lang.po
; \
46 @for cat in
*.po
; do \
48 msgfmt
--statistics
-o
/dev
/null
$$cat; \
52 @
rm -fv
*mo
*~ .depend
*.autosave
55 rm -f
*mo .depend Makefile
$(NLSPACKAGE
).pot POTFILES.in
60 mkdir
-p
$(PREFIX
)/$(INSTALLNLSDIR
)
61 for n in
$(CATALOGS
); do \
62 l
=`basename $$n .po`; \
64 if
[ ! -f
$$mo ]; then continue
; fi
; \
65 $(INSTALL
) -m
755 -d
$(PREFIX
)/$(INSTALLNLSDIR
)/$$l; \
66 $(INSTALL
) -m
755 -d
$(PREFIX
)/$(INSTALLNLSDIR
)/$$l/LC_MESSAGES
; \
67 $(INSTALL
) -m
644 $$mo \
68 $(PREFIX
)/$(INSTALLNLSDIR
)/$$l/LC_MESSAGES
/$(NLSPACKAGE
).mo
; \