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:
parent
ca3d562b24
commit
2c2f67bd83
2 changed files with 5 additions and 2 deletions
|
@ -114,7 +114,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CONFIG_HEADER(sysdep/autoconf.h)
|
AC_CONFIG_HEADER(sysdep/autoconf.h)
|
||||||
AC_OUTPUT_COMMANDS(,[$srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs])
|
AC_OUTPUT_COMMANDS(,[CPP="$CPP" $srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs])
|
||||||
AC_OUTPUT($makefiles)
|
AC_OUTPUT($makefiles)
|
||||||
|
|
||||||
cat >&AC_FD_MSG <<EOF
|
cat >&AC_FD_MSG <<EOF
|
||||||
|
|
|
@ -4,6 +4,7 @@ if [ -z "$4" ] ; then
|
||||||
echo "Usage: mergedirs <src-dir> <src-dir-rel> <obj-dir> <list-of-dirs>"
|
echo "Usage: mergedirs <src-dir> <src-dir-rel> <obj-dir> <list-of-dirs>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
cpp=${CPP:-gcc -E}
|
||||||
SRCDIR=$1
|
SRCDIR=$1
|
||||||
shift
|
shift
|
||||||
SRCREL=$1
|
SRCREL=$1
|
||||||
|
@ -19,7 +20,9 @@ shift
|
||||||
|
|
||||||
echo "Merging system-dependent modules ($@)"
|
echo "Merging system-dependent modules ($@)"
|
||||||
MODULES=`for a in $@ ; do
|
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 |
|
done |
|
||||||
sort +0 -1 -u |
|
sort +0 -1 -u |
|
||||||
cut -d ' ' -f 2`
|
cut -d ' ' -f 2`
|
||||||
|
|
Loading…
Reference in a new issue