better makefiles
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Fri, 7 Jan 2005 19:21:50 +0000 (19:21 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:34:22 +0000 (00:34 +0100)
git-archimport-id: opensource@polytechnique.org--2005/banana--mainline--1.0--patch-7

Makefile
po/Makefile
po/banana.pot

index b12a8ce..af7b7ed 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@ dist: clean pkg-dist
 
 clean:
        rm -rf locale banana/include/banana.inc.php
+       make -C po clean
 
 %: %.in Makefile
        sed -e 's,@VERSION@,$(VERSION),g' $< > $@
index 8a9269a..00fc268 100644 (file)
@@ -3,11 +3,7 @@
 # $Horde: horde/po/Makefile,v 1.2.2.3 2002/05/20 17:36:22 jan Exp $
 #
 
-MSGFMT = msgfmt --statistics -c -v -o
-MSGFMTSOL = msgfmt -v -o
-MSGMERGE = msgmerge -U
 LANGS:=$(shell ls *.po|sed -e s/\.po$$//)
-APPLICATION = banana
 
 all: banana.pot ${LANGS:=.lang}
 
@@ -22,8 +18,10 @@ banana.pot: ../banana/*.php
 %.lang: banana.pot ../banana/*.php %.po
        @echo Generating $(@:.lang=)
        @echo -n '    '
-       @${MSGMERGE} $(@:.lang=) $< 2> /dev/null
-       @${MSGFMT} ../locale/$(@:.lang=)/LC_MESSAGES/banana.mo $(@:.lang=)
+       @mkdir -p ../locale/$(@:.lang=)/LC_MESSAGES/ 
+       @msgmerge -U $(@:.lang=).po $< 2> /dev/null
+       @msgfmt --statistics -c -v -o ../locale/$(@:.lang=)/LC_MESSAGES/banana.mo $(@:.lang=).po
        @echo
        @touch $@
 
+
index af7e9c6..36862c0 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-01-07 20:09+0100\n"
+"POT-Creation-Date: 2005-01-07 20:20+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"