chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] make madness.


From: Perry E. Metzger
Subject: [Chicken-users] make madness.
Date: 13 Aug 2002 22:56:22 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Okay, I was slightly off. from what I can tell, the $< construct isn't
nearly as portable as one would think. It is for use only inside of
rules constructs (i.e. .c.o: or what have you) and not for use inside
of any Makefile construct. gmake's use of $< outside of a suffix rule
is non-portable. Sigh.

There are a few ways to fix this:

1) change $< in things like "csc: csc.in" to say "csc.in" instead.
2) create a .in: rule, but that would probably be bad given that there
   are things like config.in that don't obey the same semantics.
3) rename everything like csc.in to csc.inp (or whatever) and create a
   .inp rule.

For reference, the POSIX make spec is at:
http://www.opengroup.org/onlinepubs/007904975/utilities/make.html
it says:

$<    In an inference rule, the $< macro shall evaluate to the
      filename whose existence allowed the inference rule to be chosen for
      the target. In the .DEFAULT rule, the $< macro shall evaluate to the
      current target name. The meaning of the $< macro shall be otherwise
      unspecified. 

      For example, in the .c.a inference rule, $< represents the
      prerequisite .c file.

Gack.

This is really gross. I think I'm going to look into having BSD make
do the same thing that gmake does if a $< is used in a non-suffix rule
context but even then the construct isn't strictly portable given that
there are likely yet other makes out there. :(

I'm currently having a friend check out what Solaris make does just
for the hell of it, but either way...

Perry




reply via email to

[Prev in Thread] Current Thread [Next in Thread]