summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/lex_compile.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/script/lex_compile.sh b/source4/script/lex_compile.sh
index f33a7f0fba..064bf89bea 100755
--- a/source4/script/lex_compile.sh
+++ b/source4/script/lex_compile.sh
@@ -19,7 +19,9 @@ fi
TOP=`pwd`
if cd $dir && $LEX $file; then
if [ -r $base.yy.c ];then
- sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c > $base.c
+ # we must guarantee that config.h comes first
+ echo "#include \"config.h\"" > $base.c
+ sed '/^#/ s|$base.yy\.c|$DEST|' $base.yy.c >> $base.c
rm -f $base.yy.c
fi
fi