Various smaller fixes to the Makefile.
- Rename the %_tarball targets to %-zipfile (which they actually are) and use a dash instead of an underscore for easier typing - Use the short revision id in the file name (the file src/IDF/version.php contains the full ID) - Improve the English for some descriptions and break long lines into the next line
This commit is contained in:
parent
b7c0b40491
commit
0899ba8515
35
Makefile
35
Makefile
@ -26,20 +26,20 @@
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@printf "Rules for generate tarball :\n"
|
||||
@printf "Rules for generating distributable files :\n"
|
||||
@for b in `git branch | sed "s/^. //g"`; do \
|
||||
printf "\t"$$b"_tarball - Generate a zip archive of the "$$b" branch.\n"; \
|
||||
printf "\t"$$b"-zipfile - Generate a zip archive of the "$$b" branch.\n"; \
|
||||
done
|
||||
@printf "\nRules for internationnalization :\n";
|
||||
@printf "\tpot-update - Update the POT file from HTML template and PHP source, then merge it with PO file.\n"
|
||||
@printf "\tpot-push - Send the POT file on transifex server.\n"
|
||||
@printf "\tpo-update - Merge POT file into PO file. POT is not regenerated.\n"
|
||||
@printf "\tpo-push - Send the all PO file on transifex server.\n"
|
||||
@printf "\tpo-pull - Get all PO file from transifex server.\n"
|
||||
@printf "\tpo-stats - Show statistics about translation on each PO file .\n"
|
||||
@printf "\nRules for internationalization :\n";
|
||||
@printf "\tpot-update - Update the POT file from HTML templates and PHP sources, then merge it with PO file.\n"
|
||||
@printf "\tpot-push - Send the POT file to the transifex server.\n"
|
||||
@printf "\tpo-update - Merge the POT file into the PO file. The POT is not regenerated.\n"
|
||||
@printf "\tpo-push - Send the all PO files to the transifex server.\n"
|
||||
@printf "\tpo-pull - Get all PO files from the transifex server.\n"
|
||||
@printf "\tpo-stats - Show translation statistics of all PO files.\n"
|
||||
|
||||
#
|
||||
# Internationnalization rule, POT & PO file manipulation
|
||||
# Internationalization rule, POT & PO file manipulation
|
||||
#
|
||||
.PHONY: pluf_path
|
||||
pluf_path:
|
||||
@ -61,7 +61,8 @@ pot-update: pluf_path
|
||||
@cd src; php $(PLUF_PATH)/extracttemplates.php IDF/conf/idf.php IDF/gettexttemplates
|
||||
@cd src; for phpfile in `find . -iname "*.php"`; do \
|
||||
printf "Parsing file : "$$phpfile"\n"; \
|
||||
xgettext -o idf.pot -p ./IDF/locale/ --from-code=UTF-8 -j --keyword --keyword=__ --keyword=_n:1,2 -L PHP $$phpfile ; \
|
||||
xgettext -o idf.pot -p ./IDF/locale/ --from-code=UTF-8 -j \
|
||||
--keyword --keyword=__ --keyword=_n:1,2 -L PHP $$phpfile ; \
|
||||
done
|
||||
# Remove tmp folder
|
||||
rm -Rf src/IDF/gettexttemplates
|
||||
@ -129,10 +130,12 @@ po-stats:
|
||||
done
|
||||
|
||||
#
|
||||
# Generic rule to build a tarball of indefero for a specified branch
|
||||
# ex: make master_tarball
|
||||
# make dev_tarball
|
||||
# Generic rule to build a zipfile of indefero for a specified branch
|
||||
# ex: make master_zipfile
|
||||
# make develop_zipfile
|
||||
#
|
||||
%_tarball:
|
||||
@git archive --format=zip --prefix="indefero/" $(@:_tarball=) > indefero-$(@:_tarball=)-`git log $(@:_tarball=) -n 1 --pretty=format:%H`.zip
|
||||
%-zipfile:
|
||||
@git archive --format=zip --prefix="indefero/" $(@:-zipfile=) \
|
||||
> indefero-$(@:-zipfile=)-`git log $(@:-zipfile=) -n 1 \
|
||||
--pretty=format:%h`.zip
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user