From d90b3e4aa59ee6ea47bcab16e653f62f1c770481 Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Fri, 7 Jan 2005 19:12:48 +0000 Subject: [PATCH] be smart in makefile git-archimport-id: opensource@polytechnique.org--2005/banana--mainline--1.0--patch-5 --- po/Makefile | 55 ++++++++++++++----------------------------------------- po/banana.pot | 2 +- 2 files changed, 15 insertions(+), 42 deletions(-) diff --git a/po/Makefile b/po/Makefile index c17719f..8a9269a 100644 --- a/po/Makefile +++ b/po/Makefile @@ -10,47 +10,20 @@ LANGS:=$(shell ls *.po|sed -e s/\.po$$//) APPLICATION = banana all: banana.pot ${LANGS:=.lang} - if test "${OSTYPE}" = "solaris"; then \ - echo "You'll probably get some warnings on Solaris. This is normal."; \ - fi; - -banana.pot: ../banana/*.php - xgettext --from-code=iso-8859-15 -j -k_b_ -o banana.pot $< - -%.lang: ../locale/%/LC_MESSAGES/banana.mo %.po - @echo Updating for lang % +clean: + rm -f *.po~ *.lang -%.po: banana.pot - ${MSGMERGE} $@ $< - - +banana.pot: ../banana/*.php + @echo Parsing Tree for new messages + @echo + @xgettext --from-code=iso-8859-15 -j -k_b_ -o banana.pot $< + +%.lang: banana.pot ../banana/*.php %.po + @echo Generating $(@:.lang=) + @echo -n ' ' + @${MSGMERGE} $(@:.lang=) $< 2> /dev/null + @${MSGFMT} ../locale/$(@:.lang=)/LC_MESSAGES/banana.mo $(@:.lang=) + @echo + @touch $@ -build: *.po - for LOCALE in `ls *.po | sed 's/\.[^.]*$$//g'`; do \ - if test $${LOCALE}.po = "messages.po"; then \ - continue; \ - fi; \ - echo "Compiling locale $${LOCALE}:"; \ - if ./shtool mkdir -p ../locale/$${LOCALE}/LC_MESSAGES; then \ - if test "${OSTYPE}" = "solaris"; then \ - if ${MSGFMTSOL} ../locale/$${LOCALE}/LC_MESSAGES/${APPLICATION}.mo $${LOCALE}.po; then \ - echo " ... done"; \ - echo; \ - else \ - echo " ... FAILED"; \ - echo; \ - fi \ - else \ - if ${MSGFMT} ../locale/$${LOCALE}/LC_MESSAGES/${APPLICATION}.mo $${LOCALE}.po; then \ - echo " ... done"; \ - echo; \ - else \ - echo " ... FAILED"; \ - echo; \ - fi \ - fi; \ - else \ - echo "Could not create locale directory for $${LOCALE}."; \ - fi \ - done; diff --git a/po/banana.pot b/po/banana.pot index b59e705..af7e9c6 100644 --- a/po/banana.pot +++ b/po/banana.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-01-07 19:47+0100\n" +"POT-Creation-Date: 2005-01-07 20:09+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- 2.1.4