Skip to content

Commit

Permalink
beesh: Change sourcesubdir handling
Browse files Browse the repository at this point in the history
add functions to set, append or prepend source subdirectories.

add_sourcesubdir is now deprecated in favor of sourcesubdir_append
  • Loading branch information
mariux committed Feb 28, 2013
1 parent 726ce24 commit 172342c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conf/templates/fallback
Original file line number Diff line number Diff line change
Expand Up @@ -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@
Expand Down
13 changes: 13 additions & 0 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 172342c

Please sign in to comment.