diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2013-02-08 10:20:15 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2013-02-08 11:03:11 +0100 |
commit | 364e8ac267848bace189b468c05ca375c5d0c92c (patch) | |
tree | 77d6da66ce7afd0ee2eb9a2adefe6add31d8879d /scripts | |
parent | 0b7e5d3518ba2a25552cb3da682962109b75b33f (diff) | |
download | ptxdist-364e8ac267848bace189b468c05ca375c5d0c92c.tar.gz ptxdist-364e8ac267848bace189b468c05ca375c5d0c92c.tar.xz |
wrapper: save some variables duing initialization
This way they can be included in the wrapper scripts and the
wrapper can be used outside of PTXdist.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_make_00-init.sh | 15 | ||||
-rw-r--r-- | scripts/wrapper/libwrapper.sh | 4 |
2 files changed, 18 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh index 3f9467de0..625764868 100644 --- a/scripts/lib/ptxd_make_00-init.sh +++ b/scripts/lib/ptxd_make_00-init.sh @@ -379,6 +379,18 @@ ptxd_init_devpkg() export PTXDIST_DEVPKG_PLATFORMDIR } +ptxd_init_save_wrapper_env() { + local sysroot="$(ptxd_get_ptxconf PTXCONF_SYSROOT_HOST)" + + cat > ${sysroot}/lib/wrapper/env <<- EOF + PTXDIST_PLATFORMCONFIG="${PTXDIST_PLATFORMCONFIG}" + PTXDIST_CROSS_CPPFLAGS="${PTXDIST_CROSS_CPPFLAGS}" + PTXDIST_CROSS_LDFLAGS="${PTXDIST_CROSS_LDFLAGS}" + PTXDIST_HOST_CPPFLAGS="${PTXDIST_HOST_CPPFLAGS}" + PTXDIST_HOST_LDFLAGS="${PTXDIST_HOST_LDFLAGS}" + EOF +} + # # initialize vars needed by PTXdist's make # @@ -399,6 +411,7 @@ ptxd_make_init() { ptxd_init_collectionconfig fi && ptxd_init_cross_env && - ptxd_init_host_env + ptxd_init_host_env && + ptxd_init_save_wrapper_env } ptxd_make_init diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh index 393dd2e42..f376f7fa2 100644 --- a/scripts/wrapper/libwrapper.sh +++ b/scripts/wrapper/libwrapper.sh @@ -14,6 +14,10 @@ STDLIB=true ARG_LIST="" LATE_ARG_LIST="" +if [ -z "${PTXDIST_PLATFORMCONFIG}" ]; then + . "$(dirname "$0")/env" || exit +fi + . ${PTXDIST_PLATFORMCONFIG} wrapper_exec() { |