Kalle Olavi Niemitalo <[EMAIL PROTECTED]> writes: > OK; I'll post one patch to remove the SUFFIXES, another to fix > po/Makefile for builddir!=srcdir while keeping po/*.gmo in builddir, > a third one for other po/Makefile changes, and then we can keep > discussing (arguing?) where po/*.gmo should be.
Here is the third one. Unlike the others, this doesn't normally
affect the visible behaviour, so I won't be shocked if you choose
not to apply this. (But please tell me if you do, so that I can
revert these changes from my repository and avoid future conflicts.)
Use $@ to simplify a rule, and try to nullify metacharacters.
I changed the %.gmo rule in po/Makefile to use $@ instead of a shell
variable, and made various tweaks in it to better support strange file
names, e.g. spaces in $(srcdir). I suppose other makefiles in ELinks
and other rules in po/Makefile do not support those, but one must
start somewhere. I don't think it will ever be feasible to support
backslashes and quotes without horrible contortions, but spaces and
dashes should be doable.
I also quoted the ~ in --check-accelerators=~ in case some shell
might want to expand it as the home directory. Bash 3.00.16(1)
doesn't because the word contains dashes.
---
commit dd5511649f0224bc03c3f1b17d7499885bed33e1
tree 8f164bfaaeb3f153884b4d413ab66524915551a9
parent 18a69857be001bbbcfb388d93a42e3344f30585d
author Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Tue, 06 Dec 2005 19:12:49 +0200
committer Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Tue, 06 Dec 2005 19:12:49
+0200
po/Makefile | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/po/Makefile b/po/Makefile
index 57b2bdd..be41774 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -17,9 +17,8 @@ POTFILES_ABS_LIST = potfiles.list
# However, if srcdir != builddir, then this Makefile ignores the *.gmo
# files in the srcdir and builds new ones in the builddir.
%.gmo: $(srcdir)/%.po
- @file=`echo $* | sed 's,.*/,,'`.gmo \
- && rm -f $$file && echo -n $*": " \
- && $(GMSGFMT) --statistics -o $$file $<
+ @rm -f -- "$@" && printf "%s: " "$*" \
+ && $(GMSGFMT) --statistics -o "$@" -- "$<"
### The default rule
@@ -88,7 +87,7 @@ update-gmo: Makefile $(GMOFILES)
check-po:
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
echo -n "$(lang): "; \
- $(GMSGFMT) --check --check-accelerators=~ --verbose --statistics -o
/dev/null $(srcdir)/$(lang).po; \
+ $(GMSGFMT) --check --check-accelerators="~" --verbose --statistics -o
/dev/null $(srcdir)/$(lang).po; \
)
### Installation and distribution
pgpcH6YOiNrxP.pgp
Description: PGP signature
_______________________________________________ elinks-dev mailing list [email protected] http://linuxfromscratch.org/mailman/listinfo/elinks-dev
