Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Proposed syntax for static make-also rule: msg#00005

Subject: Re: Proposed syntax for static make-also rule
Scripsit David Boyce <dsb@xxxxxxxxxx>
> At 08:20 PM 12/10/2002 +0100, Henning Makholm wrote:

> >Risk assessment: Existing makefiles may break if the first character
> >of a dependency is & or | *and* they're written by a whitespace-phobic.

> I'd suggest that "risk assessment" be expanded to include the possibility 
> that some other make-alike uses this syntax for something else.

Agreed.

FWIW, I've checked the manuals for the system `make' tools on SunOS
5.7 and 5.8, Digital OSF1 V4.0, and HP-UX 10 and 20, as well as
/usr/lib/svr4.make on SunOS 5.8. I have also scanned the www
documentation for {Net,Free,Open}BSD make, dmake, Lucent nmake and
(briefly) Microsoft nmake.

Neither mentions any special use of either & or | in makefiles, except
that some makes use & as a wildcard inside variable substitutions.
BSD make allows || and && in its conditionals (which are incompatible
with GNU make's and cannot be mistaken for rules anyway).

Lucent nmake has a '&=' assignment operator, which will not conflict
with "&:". Some makes have a $& automatic variable.

dmake has a :| separator with a different but related semantics:

     %.o :| %.c %.r %.f ; some rule

     is equivalent to:

     %.o : %.c ; some rule
     %.o : %.r ; some rule
     %.o : %.f ; some rule

This implies agrees intuively with my proposed |: variant (note that
Paul convinced me to put modifiers *before* the colon rather than
after it).

I don't claim comprehensiveness of this analysis. There are surely
lots of makes out there that I don't know about.

-- 
Henning Makholm                           "... a specialist in the breakaway
                           oxidation phenomena of certain nuclear reactors."


<Prev in Thread] Current Thread [Next in Thread>