makefile rule for running msgmerge

View: New views
3 Messages — Rating Filter:   Alert me  

makefile rule for running msgmerge

by Ben Pfaff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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."
--douglas@... <URL:http://slashdot.org/article.pl?sid=99/05/16/2211252>


_______________________________________________
pspp-dev mailing list
pspp-dev@...
http://lists.gnu.org/mailman/listinfo/pspp-dev

Re: makefile rule for running msgmerge

by John Darrington-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It looks as if you are correct.  Can you suggest a better rule which
will do the job?

'
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."
     --douglas@... <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.




_______________________________________________
pspp-dev mailing list
pspp-dev@...
http://lists.gnu.org/mailman/listinfo/pspp-dev

signature.asc (196 bytes) Download Attachment

Re: makefile rule for running msgmerge

by John Darrington-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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."
     --douglas@... <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.




_______________________________________________
pspp-dev mailing list
pspp-dev@...
http://lists.gnu.org/mailman/listinfo/pspp-dev

signature.asc (196 bytes) Download Attachment