Commit 089d5af1 authored by gsell's avatar gsell
Browse files

em.cleanup_src() added, required for modules which must be build in the src directory

parent 344794aa
#!/bin/bash
declare -rx SHLIBDIR=$( cd $(dirname "$BASH_SOURCE") && pwd )
......@@ -138,10 +139,13 @@ declare -x DOCDIR=''
declare -x EM_FAMILY=''
declare -x EM_MODULENAME=''
declare -x CONFIG_DIR="${EM_BASEDIR}/config"
declare -x SCRIPTDIR="${EM_BASEDIR}/scripts"
declare -x EM_TMPDIR="${EM_BASEDIR}/tmp"
# these directories are module dependend
declare -x EM_SRCDIR=''
declare -x EM_BUILDDIR=''
declare -x CONFIG_DIR="${EM_BASEDIR}/config"
declare -x EM_BUILD_DEPENDENCIES
......@@ -375,6 +379,18 @@ function _cleanup_build() {
);
}
function em.cleanup_src() {
(
[[ -d /${EM_SRCDIR} ]] || return 0
cd "/${EM_SRCDIR}";
if [[ $(pwd) != / ]]; then
echo "Cleaning up $(pwd)"
rm -rf *
fi
);
}
function em.make_all() {
_set_env
if [[ ! -d "${PREFIX}" ]] || [[ ${FORCE_REBUILD} ]]; then
......
#!/bin/bash
#
# Lua cannot be build in a seperate directory!
#
source "$(dirname $0)/../lib/libem.bash"
......@@ -12,9 +15,10 @@ function em.configure() {
function em.build() {
cd "${EM_SRCDIR}"
make
make -j ${JOBS}
}
em.add_to_family "core"
em.set_build_dependencies "${COMPILER}"
em.make_all
em.cleanup_src
......@@ -51,4 +51,4 @@ em.add_to_family "compiler"
em.set_runtime_dependencies "${COMPILER}"
em.set_build_dependencies "${COMPILER}"
em.make_all
em.cleanup_src
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment