Syntax help

DJ Lucas dj at linuxfromscratch.org
Sat Aug 13 16:29:34 PDT 2005


Thomas Pegg wrote:
> On Fri, 2005-08-12 at 00:44 -0500, DJ Lucas wrote:
> 
>>First...does anyone already have a gcc4 profile made up?
> 
> Not as of yet, if you want to help make one, patches are always
> welcome. :)
> 
>>If not, then how does one assign a variable on the fly?  The immediatley
>>obvious answer is to use <execute command="VARIABLE=foo" />, but upon
>>thinking about that a bit more, VARIABLE=foo is not a command.  Will
>>that work?  I've not tried yet.  Also, in the same set of commands,
>>instead of variable substitution, will `backtic` substitution in param
>>tags work?  Basically, I don't want to fire this off and have it waste
> 
> Yes backticks will work, an execute element is basically the equivalent
> for bash -c 'command'.
> 
>>Here is are the samples in hopes somebody will just give me the correct
>>answer to study ;-) :
>>
> 
> <snip>
> 
>>      <execute command="rm">
>>        <param>-f</param>
>>        <param>`grep -l 'DO NOT EDIT THIS FILE'</param>
>>        <param>`gcc -print-search-dirs | head -n 1 | awk '{ print $2
>>"include" }'`/*</param>
>>      </execute>
>><!-- End new specfile dump and change -->
> 
> 
> Everything looks good.
> 
> 
> Thomas
> 

Thank you Thomas.  I'm a little late on my reply, but In the above I did
have to do something a little different...just like when really at the
shell, there is no such thing as nested backtics. :-)  As is now, the
gcc4 profile (see attached patch against thursday's svn pull) will
require /bin/sh to be a symlink to bash or zsh because I used $()
syntax.  ash is out unless somebody (maybe even me, but no guarantees)
does something different with the gcc specs.  Also, it'll have to be
babysitted through both glibc (test suites) and the first pass of gcc
('rm -rf <some non existant directory>' is an error).  Maybe || true?
I've also added the sed for gcc that adds -fomit-frame-pointer.

Last, with current wget required-packages.urls, need to
's at svn/trunk at development@'.

Patch attached if anyone would like to see a gcc4 branch.

-- DJ Lucas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc4.diff
Type: text/x-patch
Size: 21800 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/alfs-discuss/attachments/20050813/6ca0da03/attachment.bin>


More information about the alfs-discuss mailing list