Removal of removing fixincludes.

Ryan Oliver Ryan.Oliver at
Thu May 15 09:35:42 PDT 2003

Gerard Beekmans wrote:
> On May 14, 2003 08:00 am, Ryan Oliver wrote:
>>but then again we could use this method and just blit away the lot just
>>befor make install...
> You mean for gcc-pass2 something like this:
> make &&
> make -k check #maybe
> rm -r /stage1/lib/gcc-lib/*/*/include
> make install

I'm leaning more towards blowing the fixed includes away before gcc pass2

After pass1 there shouldn't be any directories in 

and all the fixed headers have
as their first line (nice and easy to grep for )

Heres a quick fix I've come up with.
Don't know how easily this would fit into the book though...

<before pass2>

echo "Cleaning up the fixed includes"

# get the location of the fixed includes
fixincludedir=`/stage1/bin/gcc -v 2>&1 | grep specs | \
    sed -e 's at .* \(.*\)specs@\1include@'`

# Remove all fixed include files
flist=`find ${fixincludedir} -type f `
for file in ${flist}; do
    head -n 1 ${file} | grep "DO NOT EDIT THIS FILE" &&
       echo " o Removing ${file}"
       rm -f ${file}

# remove all directories from the fixed include directory
dirlist=`find ${fixincludedir} -type d | sed "s@${fixincludedir}@@" `
for dir in ${dirlist}; do
    echo " o Removing ${fixincludedir}${dir}"
    rm -rf ${fixincludedir}${dir}

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list