Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: recent make(1) and pkgsrc
On Fri, Dec 26, 2008 at 09:38:18PM +0900, Ryo HAYASAKA wrote:
> Hi,
>
> Recent make(1) which uses the revision 1.40 or 1.39 of for.c in
> src/usr.bin/make doesn't work with pkgsrc. Note that the revision 1.38
> is OK.
The only intended change in revision 1.39 is the way .for loop control
variables are substituted.
The old version substituted them prior to any further parsing (including
applying any modifiers).
The new version substitutes a variable expansion that gives the same
required text - so loop variables need the same escaping as any other
variable.
Unfortunately (and part of the reason for the change) make's syntax is
not well defined in any sane way - so it isn't possible to ever say
what is right and what is wrong (for instance the only byte value that
is illegal in a variable name is 0! Scripts that use any of " ${}():"
are likely to be problematical!
I've fixed one pkgsrc bug where ${foo:M${bar:S/a/b/}} now needs the 2nd ':'
escaped even when 'bar' is a loop control variable.
Basically the :M<match> needs to find the end of <match> before expanding it.
In general the make syntax makes that impossible. In particular you can't
identify the start and end of a variable unless you actually expand it
left to right. Some code counts () and {} - but that is all buggy!
> For example, building devel/cpuflags stops like this:
>
> ryoh@bonnie$ make
> ERROR: This package is only available for these platforms: NetBSD-*-*
> Linux-*-* SunOS-*-* FreeBSD-*-*.
> ERROR: This package has set PKG_FAIL_REASON:
> ERROR: PKG_INSTALLATION_TYPE must be ``pkgviews'' or ``overwrite''.
> ERROR: This package doesn't support PKG_INSTALLATION_TYPE=none.
> ERROR: No acceptable compiler found for cpuflags-1.29.
> *** Error code 1
>
> Stop.
No hints about this one...
> lang/perl5:
>
> ryoh@bonnie$ make
> make: "/usr/pkgsrc/lang/perl5/hacks.mk" line 33: Malformed conditional
> (!empty(CC_VERSION:Mgcc*) && !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc))
> make: "/usr/pkgsrc/lang/perl5/hacks.mk" line 44: Malformed conditional
> (!empty(CC_VERSION:Mgcc*) && !empty(MACHINE_PLATFORM:MNetBSD-*-alpha))
> make: "/usr/pkgsrc/lang/perl5/hacks.mk" line 53: Malformed conditional
> (!empty(CC_VERSION:Mgcc-3.*) && !empty(MACHINE_ARCH:Marm*))
> make: Unclosed substitution for (/ missing)
> make: Fatal errors encountered -- cannot continue
It isn't clear to me what is going on here - nor why a change to the .for
internals should affect a conditional!
Running make with -dPcv and -DFmake.log.%d might give some information!
> I'm not sure which one (make(1) or pkgsrc) is correct.
Probably 6 of one and 1/2 a dozen of the other.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index