Syntax help

DJ Lucas dj at linuxfromscratch.org
Thu Aug 11 22:44:20 PDT 2005


First...does anyone already have a gcc4 profile made up?

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
an otherwise good gcc.  BTW, I'm working from an export of trunk from
around 8:00PM CST, I'll drop yas a patch if all looks good in the end.

Here is are the samples in hopes somebody will just give me the correct
answer to study ;-) :

<!-- Begin new specfile dump and change -->
      <execute command="gcc">
        <param>-dumpspecs > </param>
        <param>`gcc -print-search-dirs | head -n 1 | awk '{ print $2
"specs" }'`</param>
      </execute>

      <execute command="sed">
        <param>-i -e 's@^/lib/ld-linux.so.2@/tools&@g'</param>
        <param>`gcc -print-search-dirs | head -n 1 | awk '{ print $2
"specs" }'`</param>
      </execute>

      <execute command="find">
        <param>`gcc -print-search-dirs | head -n 1 | awk '{ print $2
"include" }'`/*</param>
        <param>-xtype d -exec rm -rf \{} \;</param>
      </execute>

      <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 -->

TIA

-- DJ Lucas



More information about the alfs-discuss mailing list