Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
7f44c875
Commit
7f44c875
authored
17 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
function to set environment variables for build to include prefix
parent
cc20d9aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/zmap_functions.sh
+60
-0
60 additions, 0 deletions
scripts/zmap_functions.sh
with
60 additions
and
0 deletions
scripts/zmap_functions.sh
+
60
−
0
View file @
7f44c875
...
...
@@ -142,6 +142,61 @@ function zmap_dump_environment
set
>
$dump_file
}
# prepend PREFIX to all Variables required.
# Usage: zmap_register_prefix_in_env <PREFIX>
function
zmap_register_prefix_in_env
{
local
prefix
=
$1
[
"x
$prefix
"
!=
"x"
]
||
prefix
=
/non-existent
if
[
-d
$prefix
]
;
then
# PATH first
zmap_pathmunge
$prefix
/bin prepend
# PKG_CONFIG (only if not set!)
if
[
"x
$PKG_CONFIG
"
==
"x"
]
;
then
PKG_CONFIG
=
$prefix
/bin/pkg-config
fi
# PKG_CONFIG_PATH
if
[
"x
$PKG_CONFIG_PATH
"
!=
"x"
]
;
then
PKG_CONFIG_PATH
=
"
$prefix
/lib/pkgconfig:
$PKG_CONFIG_PATH
"
else
PKG_CONFIG_PATH
=
"
$prefix
/lib/pkgconfig"
fi
# LD_LIBRARY_PATH
if
[
"x
$LD_LIBRARY_PATH
"
!=
"x"
]
;
then
LD_LIBRARY_PATH
=
"
$prefix
/lib:
$LD_LIBRARY_PATH
"
else
LD_LIBRARY_PATH
=
"
$prefix
/lib"
fi
# LDFLAGS
if
[
"x
$LDFLAGS
"
!=
"x"
]
;
then
LDFLAGS
=
"-L
$prefix
/lib
$LDFLAGS
"
else
LDFLAGS
=
"-L
$prefix
/lib"
fi
# CPPFLAGS
if
[
"x
$CPPFLAGS
"
!=
"x"
]
;
then
CPPFLAGS
=
"-I
$prefix
/include
$CPPFLAGS
"
else
CPPFLAGS
=
"-I
$prefix
/include"
fi
export
PKG_CONFIG
export
PKG_CONFIG_PATH
export
LD_LIBRARY_PATH
export
LDFLAGS
export
CPPFLAGS
else
zmap_message_err
"
$prefix
doesn't exist. Are you sure?"
fi
}
# Usage: zmap_trap_handle
function
zmap_trap_handle
{
...
...
@@ -151,3 +206,8 @@ function zmap_trap_handle
trap
'zmap_trap_handle;'
INT
trap
'zmap_trap_handle;'
TERM
trap
'zmap_trap_handle;'
QUIT
# This should be the last thing.
set
-o
history
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment