Subject: Re: kern/1296: Makefile.inc for lib{kern,compat} uses " for passing variables to sub-make
To: None <netbsd-bugs@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 08/02/1995 07:41:31
>> Synopsis: Makefile.inc for lib{kern,compat} uses " for passing variables to sub-make
> IDENT=-DFOO="variable with a space" -DBAR=$$SHELL
> in the kernel Makefile, attempting to make libkern.a results in
> results in the following make command being run
> make -f <file> CC="-DFOO="variable with a space" -DBAR="$SHELL" "
> which expands to
> make -f <file> CC="-DFOO=variable with a space -DBAR=/bin/sh"
Er, to the equivalent of
make -f <file> CC=-DFOO=variable with a "space -DBAR=/bin/sh "
> In the Makefile.inc for libkern and libcompat, pass sub-variables
> with single quotes.
That won't help much, because then it will misbehave in the presence of
IDENT=-DFOO='variable with a space'
There is no good fix, short of teaching make about shell quoting
conventions and introducing a syntax saying "expand this variable,
quoting shell metacharacters". Which IMO would be really ugly.
der Mouse
mouse@collatz.mcrcim.mcgill.edu