diff options
author | Michele Calgaro <[email protected]> | 2020-06-13 22:45:28 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-06-13 22:45:28 +0900 |
commit | 5f44f7b187093ef290315b7f8766b540a31de35f (patch) | |
tree | 27ffb7b218199ca04f240c390c52426c65f45dce /configure | |
download | codeine-5f44f7b187093ef290315b7f8766b540a31de35f.tar.gz codeine-5f44f7b187093ef290315b7f8766b540a31de35f.zip |
Initial code import from debian snapshot
https://snapshot.debian.org/package/codeine/1.0.1-3.dfsg-3.1/
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/configure b/configure new file mode 100755 index 0000000..83b4ab9 --- /dev/null +++ b/configure @@ -0,0 +1,87 @@ +#! /bin/sh +# TODO parse each passed argument and remove any "--" prefix + +BOLD="\033[1m" +RED="\033[91m" +GREEN="\033[92m" +YELLOW="\033[93m" +CYAN="\033[96m" +NORMAL="\033[0m" + +if command -v scons >/dev/null 2>&1; +then + SCONS=scons +else + if [ ! -e "scons/scons" ]; then + echo "" + echo -ne "Unpacking mini-scons..."$RED + + pushd scons >/dev/null 2>&1 + tar xjvf scons-mini.tar.bz2 > /dev/null 2>&1 + + if [[ "$?" == "0" ]]; then + echo -e $GREEN"done"$NORMAL + else + echo -e $RED"failed!"$NORMAL + exit 2 + fi + + popd > /dev/null + fi + + SCONS=scons/scons +fi + +if [[ "$1" == "--help" ]]; then + $SCONS -Q configure --help + exit +fi + +echo "" +echo "Configuring Codeine "`cat VERSION`"..." +echo "" + +#TODO remove all prefixed "--" + +$SCONS -Q configure $@ || exit 1 + +echo "" +echo -e "Your configure completed "$GREEN"successfully"$NORMAL", now type "$BOLD"make"$NORMAL +echo "" + +cat > Makefile << EOF +## Makefile automatically generated by unpack_local_scons.sh + +SCONS=$SCONS + +# scons : compile +# scons -c : clean +# scons install : install +# scons -c install : uninstall and clean + +# default target : use scons to build the programs +all: + \$(SCONS) -Q + +### There are several possibilities to help debugging : +# scons --debug=explain, scons --debug=tree .. +# +### To optimize the runtime, use +# scons --max-drift=1 --implicit-deps-unchanged +debug: + \$(SCONS) -Q --debug=tree + +clean: + \$(SCONS) -c + +install: + \$(SCONS) install + +uninstall: + \$(SCONS) -c install + +## this target creates a tarball of the project +dist: + \$(SCONS) dist +EOF + |