X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=boot.sh;h=ae2b366594e3b5ef076695baaf01d429a0b42977;hb=refs%2Fheads%2Ffor-nox%2F0.4;hp=f616e7660ee772a1af6c2d1f35a66d435596def3;hpb=245218f84aba73346f23c32f7c7de60a42d61e31;p=sliver-openvswitch.git diff --git a/boot.sh b/boot.sh index f616e7660..ae2b36659 100755 --- a/boot.sh +++ b/boot.sh @@ -1,10 +1,55 @@ -#!/bin/sh +#! /bin/sh + +set -e + +have_ext=$(if test -e ext/automake.mk; then echo yes; else echo no; fi) +for opt +do + case $opt in + (--enable-ext) have_ext=yes ;; + (--disable-ext) have_ext=no ;; + (--help) cat < debian/Makefile.am + printf 'EXTRA_DIST += \\\n' && + git ls-files debian | grep -v '^debian/\.gitignore$' | + sed -e 's/\(.*\)/ \1 \\/' -e '$s/ \\//') > debian/automake.mk + +# Enable or disable ext. +if test "$have_ext" = yes; then + echo 'Enabling openflowext...' + echo 'include ext/automake.mk' > ext.mk + echo 'm4_include([ext/configure.m4])' > ext.m4 + cat debian/control.in ext/debian/control.in > debian/control + for d in $(cd ext/debian && git ls-files --exclude-from=debian/dontlink) + do + test -e debian/$d || ln -s ../ext/debian/$d debian/$d + if ! fgrep -q $d debian/.gitignore; then + echo "Adding $d to debian/.gitignore" + (cat debian/.gitignore && printf '/%s' "$d") \ + | LC_ALL=C sort > tmp$$ \ + && mv tmp$$ debian/.gitignore + fi + done +else + echo 'Disabling openflowext...' + echo '# This file intentionally left blank.' > ext.mk + echo '# This file intentionally left blank.' > ext.m4 + cat debian/control.in > debian/control +fi # Bootstrap configure system from .ac/.am files autoreconf --install -I config --force