Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Pmodules
buildblocks
Commits
499a69be
Commit
499a69be
authored
Aug 29, 2014
by
gsell
Browse files
libem.bash: set release to \'unstable\' on first time compilation
parent
ac9fb2bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
lib/libem.bash
lib/libem.bash
+16
-7
No files found.
lib/libem.bash
View file @
499a69be
...
...
@@ -261,18 +261,20 @@ function _load_build_dependencies() {
tmp
=
${
tmp
/
${
MODULEPATH_ROOT
}
\/
}
tmp
=
${
tmp
%%/*
}
local
_family
=(
${
tmp
//./
}
)
# set module release to 'deprecated' if a build dependency
# is deprecated
if
[[
${
_family
[1]
}
==
deprecated
]]
;
then
MODULE_RELEASE
=
.deprecated
MODULE_RELEASE
=
'.deprecated'
# set module release to 'unstable' if a build dependency is
# unstable and release not yet set
elif
[[
${
_family
[1]
}
==
unstable
]]
&&
[[
-z
${
MODULE_RELEASE
}
]]
;
then
MODULE_RELEASE
=
.unstable
MODULE_RELEASE
=
'
.unstable
'
fi
echo
"Loading module:
${
m
}
"
module load
"
${
m
}
"
done
}
function
_write_runtime_dependencies
()
{
local
-r
fname
=
"
${
PREFIX
}
/.dependencies"
local
dep
...
...
@@ -301,6 +303,7 @@ function _write_build_dependencies() {
done
}
# setup general environment
function
_setup_env1
()
{
C_INCLUDE_PATH
=
''
CPLUS_INCLUDE_PATH
=
''
...
...
@@ -319,6 +322,7 @@ function _setup_env1() {
}
#setup module specific environment
function
_setup_env2
()
{
if
[[
-z
${
MODULE_FAMILY
}
]]
;
then
die 1
"
$P
: family not set."
...
...
@@ -340,6 +344,8 @@ function _setup_env2() {
MODULE_BUILDDIR
=
"
${
BUILD_TMPDIR
}
/build/
$P
-
$V
/
$COMPILER
/
$COMPILER_VERSION
"
# build module name
# :FIXME: the MODULE_PREFIX should be derived from MODULE_NAME
# :FIXME: this should be read from a configuration file
case
${
MODULE_FAMILY
}
in
Tools
)
MODULE_RPREFIX
=
"
${
P
}
/
${
V
}
"
...
...
@@ -381,8 +387,13 @@ function _setup_env2() {
# set PREFIX of module
PREFIX
=
"
${
EM_PREFIX
}
/
${
MODULE_FAMILY
}
/
${
MODULE_RPREFIX
}
"
# set release to 'unstable' on first time compilation and release not yet set
[[
!
-d
${
PREFIX
}
]]
&&
[[
-z
${
MODULE_RELEASE
}
]]
&&
MODULE_RELEASE
=
'.unstable'
# directory for README's, license files etc
DOCDIR
=
"
${
PREFIX
}
/share/doc/
$P
"
# set tar-ball and flags for tar
TARBALL
=
"
${
BUILD_DOWNLOADSDIR
}
/
${
P
/_serial
}
-
$V
.tar"
if
[[
-r
$TARBALL
.gz
]]
;
then
TARBALL
=
${
TARBALL
}
.gz
...
...
@@ -394,6 +405,7 @@ function _setup_env2() {
error
"tar-ball for
$P
/
$V
not found."
exit
43
fi
}
function
_prep
()
{
...
...
@@ -483,10 +495,7 @@ function _check_compiler() {
function
em.make_all
()
{
_setup_env1
# build release - and thereby the PREFIX - depends on other modules
_load_build_dependencies
_setup_env2
if
[[
!
-d
"
${
PREFIX
}
"
]]
||
[[
${
FORCE_REBUILD
}
]]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment