3 have_ext=$(if test -e ext/automake.mk; then echo yes; else echo no; fi)
7 (--enable-ext) have_ext=yes ;;
8 (--disable-ext) have_ext=no ;;
10 $0: bootstrap OpenFlow from a Git repository
12 The recognized options are:
13 --enable-ext include openflowext
14 --disable-ext exclude openflowext
15 By default, openflowext is included if it is present.
19 (*) echo "unknown option $opt; use --help for help"; exit 1 ;;
23 # Generate list of files in debian/ to distribute.
24 (echo '# Automatically generated by boot.sh (from Git tree).' &&
25 printf 'EXTRA_DIST += \\\n' &&
26 git ls-files debian | grep -v '^debian/\.gitignore$' |
27 sed -e 's/\(.*\)/ \1 \\/' -e '$s/ \\//') > debian/automake.mk
29 # Enable or disable ext.
30 if test "$have_ext" = yes; then
31 echo 'Enabling openflowext...'
32 echo 'include ext/automake.mk' > ext.mk
33 echo 'm4_include([ext/configure.m4])' > ext.m4
34 cat debian/control.in ext/debian/control.in > debian/control
35 for d in $(cd ext/debian && git ls-files --exclude-from=debian/dontlink)
37 test -e debian/$d || ln -s ../ext/debian/$d debian/$d
38 if ! fgrep -q $d debian/.gitignore; then
39 echo "Adding $d to debian/.gitignore"
40 (cat debian/.gitignore && printf '/%s' "$d") \
41 | LC_ALL=C sort > tmp$$ \
42 && mv tmp$$ debian/.gitignore
46 echo 'Disabling openflowext...'
47 echo '# This file intentionally left blank.' > ext.mk
48 echo '# This file intentionally left blank.' > ext.m4
49 cat debian/control.in > debian/control
52 # Bootstrap configure system from .ac/.am files
53 autoreconf --install -I config --force