2015-04-20 11:41:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-06-06 12:10:48 +00:00
|
|
|
. ~/build.stretch/settings.sh
|
|
|
|
. ~/build.stretch/common.sh
|
|
|
|
|
|
|
|
INPUT=~/build.stretch/HEADER.html.in
|
2015-04-20 11:41:47 +00:00
|
|
|
CPP="cpp -traditional -undef -P -C -nostdinc"
|
|
|
|
|
|
|
|
if [ "$1"x = ""x ] ; then
|
|
|
|
echo "$0: Need to be told which directory to target!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-06-06 12:10:48 +00:00
|
|
|
if [ "$2"x = "firmware"x ] ; then
|
|
|
|
FIRMWARE="-DFIRMWARE"
|
|
|
|
IN_FW=1
|
|
|
|
fi
|
|
|
|
|
2015-04-20 11:41:47 +00:00
|
|
|
cd $1
|
|
|
|
for DIR in *; do
|
|
|
|
if [ -d $DIR ] && [ $DIR != trace ] ; then
|
|
|
|
ARCH=$DIR
|
2017-06-06 12:10:48 +00:00
|
|
|
if [ "$IN_FW"x = ""x ]; then
|
|
|
|
if $(arch_has_firmware $ARCH) ; then
|
|
|
|
FIRMWARE="-DARCH_HAS_FIRMWARE"
|
|
|
|
else
|
|
|
|
FIRMWARE=""
|
|
|
|
fi
|
|
|
|
fi
|
2015-04-20 11:41:47 +00:00
|
|
|
case $ARCH in
|
|
|
|
i386|amd64|arm64)
|
|
|
|
EXTRAS="-DISOHYBRID"
|
|
|
|
;;
|
|
|
|
multi-arch)
|
|
|
|
EXTRAS="-DISOHYBRID -DONEonly"
|
|
|
|
ARCH="multi"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
EXTRAS=""
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
case $ARCH in
|
|
|
|
kfreebsd*)
|
|
|
|
KERNEL="kFreeBSD"
|
|
|
|
;;
|
|
|
|
hurd*)
|
|
|
|
KERNEL="Hurd"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
KERNEL="Linux"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
for DIR1 in $DIR/*-* ; do
|
|
|
|
STYLE=$(echo $DIR1 | sed 's,^.*/,,g;s,-.*$,,g')
|
|
|
|
TYPE=$(echo $DIR1 | sed 's,^.*-,,g')
|
|
|
|
ls -l $DIR1 | grep -q update
|
|
|
|
if [ $? -eq 0 ] ; then
|
|
|
|
UPDATES="-DUPDATES"
|
|
|
|
fi
|
|
|
|
#echo "Found directory $DIR (ARCH $ARCH, STYLE $STYLE, TYPE $TYPE)"
|
2017-06-06 12:10:48 +00:00
|
|
|
$CPP -DARCH=${ARCH} -DARCH${ARCH} -DKERNEL=${KERNEL} -DSTYLE${STYLE} -DSTYLE=${STYLE} -DTYPE${TYPE} $UPDATES $EXTRAS $FIRMWARE $INPUT > $DIR1/HEADER.html
|
2015-04-20 11:41:47 +00:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
done
|