1 |
#!/bin/bash |
#!/bin/bash |
2 |
# |
# |
3 |
# Minimal Sanitized Headers - Version 01.00 |
# Minimal Sanitized Headers - Version 01.02 |
4 |
# |
# |
5 |
# Submit bugreports via http://headers.cross-lfs.org |
# Submit bugreports via http://headers.cross-lfs.org |
6 |
# |
# |
152 |
-e '/#include <asm.hpet.h>/d' \ |
-e '/#include <asm.hpet.h>/d' \ |
153 |
-e '/#include <asm.ide.h>/d' \ |
-e '/#include <asm.ide.h>/d' \ |
154 |
-e '/#include <asm.interrupt.h>/d' \ |
-e '/#include <asm.interrupt.h>/d' \ |
155 |
|
-e '/#include <asm.machtypes.h>/d' \ |
156 |
|
-e '/#include <asm.mach-types.h>/d' \ |
157 |
-e '/#include <asm.machvec_init.h>/d' \ |
-e '/#include <asm.machvec_init.h>/d' \ |
158 |
-e '/#include <asm.mtd-xip.h>/d' \ |
-e '/#include <asm.mtd-xip.h>/d' \ |
159 |
-e '/#include <asm.offset.h>/d' \ |
-e '/#include <asm.offset.h>/d' \ |
164 |
-e '/#include <asm.proc-fns.h>/d' \ |
-e '/#include <asm.proc-fns.h>/d' \ |
165 |
-e '/#include <asm.rwclock.h>/d' \ |
-e '/#include <asm.rwclock.h>/d' \ |
166 |
-e '/#include <asm.sections.h>/d' \ |
-e '/#include <asm.sections.h>/d' \ |
167 |
|
-e '/#include <asm.serial-bigsur.h>/d' \ |
168 |
|
-e '/#include <asm.serial-ec3104.h>/d' \ |
169 |
-e '/#include <asm.spinlock_types.h>/d' \ |
-e '/#include <asm.spinlock_types.h>/d' \ |
170 |
-e '/#include <asm.thread_info.h>/d' \ |
-e '/#include <asm.thread_info.h>/d' \ |
171 |
-e '/#include <asm.uaccess.h>/d' \ |
-e '/#include <asm.uaccess.h>/d' \ |
225 |
-e 's/|| defined (__KERNEL__)//g' \ |
-e 's/|| defined (__KERNEL__)//g' \ |
226 |
-e 's/#ifdef linux/#ifdef __linux__/g' \ |
-e 's/#ifdef linux/#ifdef __linux__/g' \ |
227 |
-e 's/#ifndef linux/#ifndef __linux__/g' \ |
-e 's/#ifndef linux/#ifndef __linux__/g' \ |
|
-e '/#include <asm.machtypes.h>/d' \ |
|
|
-e '/#include <asm.serial-bigsur.h>/d' \ |
|
|
-e '/#include <asm.serial-ec3104.h>/d' \ |
|
228 |
$header > $header.new |
$header > $header.new |
229 |
mv $header.new $header |
mv $header.new $header |
230 |
|
|
577 |
|
|
578 |
GLIBC_HEADERS=$(cat $CURRENT_DIR/lists/glibc-headers) |
GLIBC_HEADERS=$(cat $CURRENT_DIR/lists/glibc-headers) |
579 |
|
|
580 |
|
COPY_HEADERS=$(cat $CURRENT_DIR/lists/copy-headers) |
581 |
|
|
582 |
REMOVE_HEADERS=$(cat $CURRENT_DIR/lists/remove-headers) |
REMOVE_HEADERS=$(cat $CURRENT_DIR/lists/remove-headers) |
583 |
|
|
584 |
if [ "$FILE" = "yes" ]; then |
if [ "$FILE" = "yes" ]; then |
728 |
fi |
fi |
729 |
done |
done |
730 |
|
|
731 |
SETTYPE="mtd scsi sound" |
SETTYPE="acpi mtd scsi sound" |
732 |
for type in $SETTYPE; do |
for type in $SETTYPE; do |
733 |
TYPE="$type" |
TYPE="$type" |
734 |
cd $ORIGDIR |
cd $ORIGDIR |
1316 |
cp $TYPES_H.new $TYPES_H |
cp $TYPES_H.new $TYPES_H |
1317 |
clean_header $TYPES_H |
clean_header $TYPES_H |
1318 |
|
|
1319 |
|
for files in $COPY_HEADERS; do |
1320 |
|
echo "$files" | { |
1321 |
|
IFS=':' read sfile dfile |
1322 |
|
echo "Copying $sfile to $dfile..." |
1323 |
|
cp $NEWDIR/$sfile $NEWDIR/$dfile |
1324 |
|
} |
1325 |
|
done |
1326 |
|
|
1327 |
for file in $REMOVE_HEADERS; do |
for file in $REMOVE_HEADERS; do |
1328 |
echo "Removing unused header $file..." |
echo "Removing unused header $file..." |
1329 |
rm -f $NEWDIR/$file |
rm -f $NEWDIR/$file |