diff --git a/conf/templates/fallback b/conf/templates/fallback index 3cd8086..e1e1f4f 100644 --- a/conf/templates/fallback +++ b/conf/templates/fallback @@ -34,9 +34,9 @@ ## bee cannot detect buildtypes specified in subdirectories. ## Sometimes packages "hide" the real sources in a subdirectory named ## 'src' or 'cmake' or .. -## use 'add_sourcesubdir' to specify this directory if known. +## use 'sourcesubdir_append' to specify this directory if known. -# add_sourcesubdir src +# sourcesubdir_append src @DEFAULT_PREFIX_VARS@ @BEE_DEFINES@ diff --git a/src/beesh.sh.in b/src/beesh.sh.in index 379012a..c484bad 100644 --- a/src/beesh.sh.in +++ b/src/beesh.sh.in @@ -181,9 +181,22 @@ function build_in_sourcedir() { } function add_sourcesubdir() { + print_warning "WARNING: add_sourcesubdir is deprecated in favor of sourcesubdir_append" + sourcesubdir_append "${@}" +} + +function sourcesubdir_set() { BEE_SOURCESUBDIR="${1}" } +function sourcesubdir_prepend() { + BEE_SOURCESUBDIR="${1}${BEE_SOURCESUBDIR:+/${BEE_SOURCESUBDIR}}" +} + +function sourcesubdir_append() { + BEE_SOURCESUBDIR="${BEE_SOURCESUBDIR:+${BEE_SOURCESUBDIR}/}{$1}" +} + #### bee_init_builddir() ###################################################### function bee_init_builddir() {