1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Filter all `Modules' files through C preprocessor, so that they can

reference BIRD configuration.

By the way: Do you know GCC by default does `#define unix 1'?
This commit is contained in:
Martin Mares
1999-01-23 21:08:36 +00:00
parent ca3d562b24
commit 2c2f67bd83
2 changed files with 5 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ if [ -z "$4" ] ; then
echo "Usage: mergedirs <src-dir> <src-dir-rel> <obj-dir> <list-of-dirs>"
exit 1
fi
cpp=${CPP:-gcc -E}
SRCDIR=$1
shift
SRCREL=$1
@@ -19,7 +20,9 @@ shift
echo "Merging system-dependent modules ($@)"
MODULES=`for a in $@ ; do
sed <$SRCDIR/$a/Modules "s@\\(.*\\)@\\1 $a/\\1@"
cat sysdep/autoconf.h $SRCDIR/$a/Modules |
$cpp -U unix - |
sed "/^[ ]*\$/d;/^#/d;s@\\(.*\\)@\\1 $a/\\1@"
done |
sort +0 -1 -u |
cut -d ' ' -f 2`