Avoid leaving Makefile.am and configure.ac slightly modified by boot.sh.

(This turned out to be more annoying than I expected.)
This commit is contained in:
Ben Pfaff committed 2008-10-17 16:15:34 -07:00
1 parent 3f43245fa5
commit 016e02cfe7
4 files changed
+9 -20

No files matched your search

+2
View File
@@ -39,4 +39,6 @@
Module.symvers Module.symvers
TAGS TAGS
cscope.* cscope.*
ext.m4
ext.mk
tags tags
+1 -1
View File
@@ -60,4 +60,4 @@ include tests/automake.mk
include include/automake.mk include include/automake.mk
include third-party/automake.mk include third-party/automake.mk
include debian/automake.mk include debian/automake.mk
include ext/automake.mk include ext.mk
+5 -18
View File
@@ -20,35 +20,22 @@ EOF
esac esac
done done
# Generate list of files in debian/ to distribute. # Generate list of files in debian/ to distribute.
(echo '# Automatically generated by boot.sh (from Git tree).' && (echo '# Automatically generated by boot.sh (from Git tree).' &&
echo 'EXTRA_DIST += \' && echo 'EXTRA_DIST += \' &&
git ls-files debian | grep -v '^debian/\.gitignore$' | git ls-files debian | grep -v '^debian/\.gitignore$' |
sed -e 's/\(.*\)/ \1 \\/' -e '$s/ \\//') > debian/automake.mk sed -e 's/\(.*\)/ \1 \\/' -e '$s/ \\//') > debian/automake.mk
# Find the "include ext/automake.mk" line in Makefile.am and comment # Enable or disable ext.
# it out or in according to whether ext is available, and similarly
# for "m4_include(ext/configure.m4)" in configure.ac.
subst() {
perl -pe "$1" < "$2" > "$2.tmp"
if cmp -s "$2.tmp" "$2"; then
rm "$2.tmp"
else
mv "$2.tmp" "$2"
fi
}
if test "$have_ext" = yes; then if test "$have_ext" = yes; then
echo 'Enabling openflowext...' echo 'Enabling openflowext...'
OC='#' echo 'include ext/automake.mk' > ext.mk
NC= echo 'm4_include([ext/configure.m4])' > ext.m4
else else
echo 'Disabling openflowext...' echo 'Disabling openflowext...'
OC= echo '# This file intentionally left blank.' > ext.mk
NC='#' echo '# This file intentionally left blank.' > ext.m4
fi fi
subst "s|^$OC(include ext/automake\\.mk)\$|$NC\$1|" Makefile.am
subst "s|^$OC(m4_include\\(ext/configure\.m4\\))\$|$NC\$1|" configure.ac
# Bootstrap configure system from .ac/.am files # Bootstrap configure system from .ac/.am files
autoreconf --install -I config --force autoreconf --install -I config --force
+1 -1
View File
@@ -63,7 +63,7 @@ OFP_CHECK_DPKG_BUILDPACKAGE
CFLAGS="$CFLAGS -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement" CFLAGS="$CFLAGS -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement"
OFP_ENABLE_EXT OFP_ENABLE_EXT
m4_include(ext/configure.m4) m4_include([ext.m4])
AC_CONFIG_FILES([Makefile AC_CONFIG_FILES([Makefile
datapath/Makefile datapath/Makefile