Update of /cvsroot/audacity/htdocs
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14626
Modified Files:
Makefile
Log Message:
Add comments to Makefile header, and create a new target to update the
potdates.inc file which enables the display of the .pot file modification dates
Index: Makefile
===================================================================
RCS file: /cvsroot/audacity/htdocs/Makefile,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- Makefile 11 Nov 2008 22:00:41 -0000 1.22
+++ Makefile 20 Feb 2009 21:34:29 -0000 1.23
@@ -1,19 +1,49 @@
+# Manually written makefile to create translations for the Audacity website.
+# Also used to provide simple ways to upload and download files to/from the
+# sourceforge web servers.
+
+# File names and locations
POT_FILE=locale/audacity_website.pot
+PROG_POT_FILE=locale/audacity.pot
+# the PHP include file that contains the includes to display the modification
+# dates of the .pot files
+INC_FILE=community/potdates.inc
+
+# The authoritative (CVS managed) set of .po files)
PO_FILES_ORIG := $(wildcard locale/*.po)
+# The set of po files copied out into the typical gettext file structure
+# (with a clever piece of make string mangling which produces names like
+# de/LC_MESSAGES/audacity_website.po relative to the locale directory)
PO_FILES := $(PO_FILES_ORIG:%.po=%/LC_MESSAGES/audacity_website.po)
+# The paths to the compiled .mo files, the same as PO_FILES but with a
+# different extension (more clever make patterns)
MO_FILES := $(PO_FILES:%.po=%.mo)
-all: $(MO_FILES)
-
-# Build the POT file (message catalog template).
+# Define the PHP files that are the "source code" for the website (relative to
+# this directory)
SOURCES := $(wildcard *.php */*.php)
+
+# This is what gets done if there isn't a target specified when make is run
+all: $(MO_FILES) $(INC_FILE)
+
XGETTEXT=xgettext
XGETTEXT_ARGS=-L php --add-comments="i18n-hint" --from-code="UTF-8"
+# Build the POT file (message catalog template) from the website sources.
$(POT_FILE): $(SOURCES)
find . -name '*.php' ! -path './old/*' \
| xargs $(XGETTEXT) $(XGETTEXT_ARGS) -o $@
- #chmod go+r $@
+
+# Update the include file with the dates of the .pot files.
+$(INC_FILE): $(POT_FILE) $(PROG_POT_FILE)
+ echo "<?php // This file is auto-generated by the Makefile. Don't edit
it because the changes will be lost" > $(INC_FILE)
+ echo "\$$web_year = $$(date +%Y);" >> $(INC_FILE)
+ echo "\$$web_month = $$(date +%m);" >> $(INC_FILE)
+ echo "\$$web_year = $$(date +%d);" >> $(INC_FILE)
+ echo "\$$prog_year = $$(date -r $(PROG_POT_FILE) +%Y);" >> $(INC_FILE)
+ echo "\$$prog_month = $$(date -r $(PROG_POT_FILE) +%m);" >> $(INC_FILE)
+ echo "\$$prog_year = $$(date -r $(PROG_POT_FILE) +%d);" >> $(INC_FILE)
+ echo "?>" >> $(INC_FILE)
# Update the PO files (translated message catalogs).
%/LC_MESSAGES/audacity_website.po: %.po $(POT_FILE)
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs