diff --git a/conf/templates/fallback b/conf/templates/fallback index f3d5823..9b47347 100644 --- a/conf/templates/fallback +++ b/conf/templates/fallback @@ -14,6 +14,8 @@ PATCHURL[0]="" @DEFAULT_PREFIX_VARS@ +@BEE_DEFINES@ + #mee_extract() { # bee_extract ${@} #} diff --git a/src/bee-init.sh.in b/src/bee-init.sh.in index 0003a90..efc2c58 100644 --- a/src/bee-init.sh.in +++ b/src/bee-init.sh.in @@ -55,6 +55,8 @@ function usage() { -f --force force overwrite of bee-file. -h --help this little help. -V --version print version number. + -D --define=A=B define ENV variables with the bee-file. + (extra (over)quoting may be needed if B contains spaces.) Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -240,6 +242,9 @@ function initialize() { sed -e "s,@DEFAULT_PREFIX_VARS@,${DEFAULT_PREFIX_VARS}," \ -i ${beefile} + sed -e "s,@BEE_DEFINES@,${OPT_DEFINE}," \ + -i ${beefile} + if [ "${CONFIGURE_BEEHAVIOR}" ] ; then sed -e "s,@BEE_CONFIGURE@,BEE_CONFIGURE=${CONFIGURE_BEEHAVIOR}," \ -i ${beefile} @@ -265,6 +270,7 @@ options=$(${BEE_BINDIR}/beegetopt --name bee-init \ --option disable-versionify \ --option help/h \ --option version/V \ + --option define/D= \ --option template/t= \ --option force/f \ --option configure= \ @@ -356,6 +362,11 @@ while true ; do shift 2 ;; + --define) + OPT_DEFINE="${OPT_DEFINE}\n${2}" + shift 2 + ;; + --buildtype) OPT_BUILDTYPE="${2}" shift 2