[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: makefile rule for running msgmerge
From: |
John Darrington |
Subject: |
Re: makefile rule for running msgmerge |
Date: |
Sat, 10 Oct 2009 07:46:00 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
I pushed a fix which avoids the use of $*
On Thu, Oct 08, 2009 at 08:31:04PM -0700, Ben Pfaff wrote:
The rule in po/automake.mk for running msgmerge looks like this:
$(POFILES): $(POTFILE)
$(MSGMERGE) $(top_srcdir)/$* $< -o $@
I don't think this makes sense. This expands to:
po/en_GB.po po/nl.po po/pt_BR.po: po/pspp.pot
$(MSGMERGE) $(top_srcdir)/$* $< -o $@
which is an explicit rule, not an implicit rule. According to
the GNU make manual, $* expands like this in an explicit rule:
In an explicit rule, there is no stem; so `$*' cannot be determined
in that way. Instead, if the target name ends with a recognized
suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), `$*' is
set to the target name minus the suffix. For example, if the
target name is `foo.c', then `$*' is set to `foo', since `.c' is a
suffix. GNU `make' does this bizarre thing only for compatibility
with other implementations of `make'. You should generally avoid
using `$*' except in implicit rules or static pattern rules.
If the target name in an explicit rule does not end with a
recognized suffix, `$*' is set to the empty string for that rule.
so $* will either be something like po/en_GB or even the empty
string here. I've seen the former in some runs; I'm not sure
I've seen the latter. But neither one makes sense to me.
Also, POSIX says $< and $@ are defined only for implicit rules,
but I don't think that's the problem, since I think I've seen
problems here even with GNU make.
--
Regarding a Microsoft/Xerox agreement:
"This is a match made in heaven.
Both companies excel at copying other people's work."
address@hidden <URL:http://slashdot.org/article.pl?sid=99/05/16/2211252>
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature