Skip to content

Commit

Permalink
beesh: Change the way source sub directories are handled
Browse files Browse the repository at this point in the history
$S now points to the $W/source/souresubdirectory
  • Loading branch information
mariux committed Feb 28, 2013
1 parent c1c65da commit 5d091b5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion buildtypes/cmake.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

: ${BEE_BUILDTYPE_CMAKE_CMAKELISTSTXT:=${S}/${BEE_SOURCESUBDIR}/CMakeLists.txt}
: ${BEE_BUILDTYPE_CMAKE_CMAKELISTSTXT:=${S}/CMakeLists.txt}

if [ ! -r "${BEE_BUILDTYPE_CMAKE_CMAKELISTSTXT}" ] ; then
return
Expand Down
30 changes: 19 additions & 11 deletions src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 +215,22 @@ function bee_init_builddir() {
fi

print_info " -> creating source dir ${S}"

mkdir -p ${S}

print_info " -> creating image dir ${D}"
mkdir -p ${D}
}

function bee_init_buildinsourcedir() {
if [ "${B}" == "${S}" ] ; then
link=${BEEWORKDIR}/build
print_info " -> B=S linking build dir ${link} to source dir"
ln -s source ${link}
ln -s ${S#${W}/} ${link}
else
print_info " -> creating build dir ${B}"
mkdir -p ${B}
fi

print_info " -> creating image dir ${D}"
mkdir -p ${D}
}

#### bee_getsources() #########################################################
Expand Down Expand Up @@ -972,6 +973,19 @@ bee_run getsources

bee_run extract ${bee_SOURCEFILES[@]}

: ${BEE_SOURCESUBDIR=""}

if [ ! -d "${S}/${BEE_SOURCESUBDIR}" ] ; then
print_error "ERROR: directory specified as sourcesubdir (${S}/${BEE_SOURCESUBDIR}) does not exist."
exit 1
fi

if [ "${B}" = "${S}" ] ; then
B="${S}/${BEE_SOURCESUBDIR}"
fi

S="${S}/${BEE_SOURCESUBDIR}"

print_info "changing to source directory: ${S}"
cd ${S}

Expand All @@ -990,20 +1004,14 @@ bee_buildmagic=$(${BEE_BINDIR}/beeuniq ${BEE_BUILDTYPE[@]} \

BEE_BUILDTYPE_DETECTED=""

: ${BEE_SOURCESUBDIR=""}

if [ ! -d "${S}/${BEE_SOURCESUBDIR}" ] ; then
print_error "ERROR: directory specified with add_sourcesubdir does not exist."
exit 1
fi

for t in ${bee_buildmagic[@]} ; do
load_buildmagic ${t}
if [ -n "${BEE_BUILDTYPE_DETECTED}" ] ; then
break
fi
done

bee_init_buildinsourcedir

print_info "changing to build directory: ${B}"
cd ${B}
Expand Down

0 comments on commit 5d091b5

Please sign in to comment.