1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!/bin/bash
# sets up source tree for building
if echo $0 | grep -q force; then
force=1
fi
if ! (test -f configure.ac || test -f CMakeLists.txt); then
echo "sorry, no configure.ac or CMakeLists.txt in this directory"
echo "you have to run this command in the root of source tree"
exit 1
fi
if test -f ../configure.ac || test -f ../CMakeLists.txt; then
if test -z "$force"; then
echo "beware, there is a configure.ac or CMakeLists.txt in my parent"
echo "directory -- if you are sure you are in a source tree root"
echo "run otb-setup-force instead"
exit 1
fi
fi
echo you win, setting up otb
echo please do not remove this file, otb uses it to find root \
of the source tree > source-tree-root
# set up default build tree
otb-run :default touch build-tree-root
if test -e CMakeLists.txt; then
echo "using cmake build system"
else
echo "using autotools: sorry, cluttering your source tree"
autoreconf -i
fi
|