Skip to content

Commit

Permalink
Makefile: define grouped target rule correctly
Browse files Browse the repository at this point in the history
A po4a command will generate all the $(PO_FILES) or $(MXML_FILES),
instead of generating them one by one.  Use '&:' provided by GNU Make >=
4.3 to define the grouped target correctly.

I don't want to spend too much time to find a "portable" solution.
  • Loading branch information
xry111 committed Sep 17, 2022
1 parent 4121238 commit 1e9e16e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PO_FILES = $(patsubst $(LFS_EN)/%.xml, $(MLANG)/%.po, $(XML_FILES))

-include local.mk

$(PO_FILES): $(XML_FILES) mkpo4acfg.py changelogtranslator.py
$(PO_FILES) &: $(XML_FILES) mkpo4acfg.py changelogtranslator.py
mkdir -pv $(POT_DIRS)
$(CMD_FIND_XML) | ./mkpo4acfg.py > po4a.cfg
po4a --no-translations po4a.cfg
Expand Down Expand Up @@ -49,7 +49,7 @@ ORIG_FILES = $(MLANG)/book/general.ent.orig \
booksrc: $(MBOOK_FILES) $(ORIG_FILES)
[ ! -e $(MLANG)/fix.sh ] || (pushd $(MLANG)/book; sh ../fix.sh; popd)

$(MXML_FILES): $(XML_FILES) $(PO_FILES) mkpo4acfg.py
$(MXML_FILES) &: $(XML_FILES) $(PO_FILES) mkpo4acfg.py
mkdir -pv $(POT_DIRS)
$(CMD_FIND_XML) | ./mkpo4acfg.py > po4a.cfg
po4a po4a.cfg
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ contribute other translations, please mail to `[email protected]`

首先安装依赖项:

* GNU Make (>= 4.3)
* [po4a](https://po4a.org/) (>= 0.62)
* [polib](https://pypi.org/project/polib/)
* [libxml2](https://www.linuxfromscratch.org/blfs/view/svn/general/libxml2.html)
Expand Down

0 comments on commit 1e9e16e

Please sign in to comment.