mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
I did change the /bin/bash to /bin/sh per the comments. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/coreboot-v3@919 f3766cd6-281f-0410-b1cd-43a5c92072e9
16 lines
285 B
Bash
16 lines
285 B
Bash
#!/bin/sh
|
|
out=$1
|
|
shift
|
|
o=""
|
|
while [ "$1" != "--" ]; do
|
|
o="$o $1"
|
|
shift
|
|
done
|
|
shift
|
|
p=`pwd`
|
|
while [ "$1" ] ; do
|
|
echo $1 >>${out}
|
|
cpp -M -m32 $o $1 | sed 's/.*://' | sed 's/^ *//g' | tr ' ' '\n' | tr '\\' ' ' |sed "s,^include,${p}/include," >>${out}
|
|
shift
|
|
done
|
|
sort -o ${out} -u ${out}
|