DJ Lucas wrote:
Don't do that. Do it from the toplevel. There is one instance in
linux/errno.h for asm-generic/errno.h.
okay..scratch that completely...
Kill asm-generic with this snipit:
## Flatten asm-generic headers
# first unifdef all the _ASM_GERNERIC_*_H #ifndef's
cd asm-generic
for cleanfile in $(grep -r "#ifndef _ASM_GENERIC_" * | sed '[EMAIL PROTECTED]
@@')
do
file=$(echo "$cleanfile" | cut -d: -f1)
asmsymbol=$(echo "$cleanfile" | cut -d: -f2)
mv ${file} ${file}-orig
unifdef -U${asmsymbol} ${file}-orig > $file
# Remove the defines for those files (_ASM_GENERIC_*_H)
sed -i /${asmsymbol}/d ${file}
rm ${file}-orig
done
cd ..
# Now for linux and asm
# asm-generic must come first so nothing slips into linux and asm
for dir in asm-generic asm linux
do
cd $dir
for combine in $(grep -nr "<asm-generic" * | sed '[EMAIL PROTECTED] @@')
do
file=$(echo "$combine" | cut -d: -f1)
line=$(echo "$combine" | cut -d: -f2)
include=$(echo "$combine" | cut -d: -f3 | sed 's@<@@' | sed 's@>@@')
eline=$(( $line - 1 ))
length=$(grep -c '^' $file)
sline=$(( $length - $line ))
mv $file ${file}-orig
head -n $eline ${file}-orig > $file
cat ../$include >> $file
tail -n $sline ${file}-orig >> $file
rm ${file}-orig
done
cd ..
done
rm -rf asm-generic
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page