X-Git-Url: http://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/2e5b48374d80959256e535bc1973f032158bde9e..84dd06463916fbf857351fbaba4ea33e1e056460:/snippet/exported.sh.in diff --git a/snippet/exported.sh.in b/snippet/exported.sh.in index 762600a..ef875a5 100644 --- a/snippet/exported.sh.in +++ b/snippet/exported.sh.in @@ -1,6 +1,6 @@ #!@SHELL@ # -# Copyright © 2011 Nick Bowler +# Copyright © 2011-2012 Nick Bowler # # Determine the list of exported symbols from archives or (libtool) object # files. @@ -40,5 +40,19 @@ done set x $OBJS; shift case $# in 0) : ;; -*) @NM@ $OBJS | @GLOBAL_SYMBOL_PIPE@ | @SED@ 's/^.* //' | sort | uniq ;; +*) + exec 4>&1 + eval_cmd=`exec 3>&1 + { @NM@ $OBJS 3>&- + echo "(exit $?) || exit $?" >&3 + } | { @GLOBAL_SYMBOL_PIPE@ 3>&- + echo "(exit $?) || exit $?" >&3 + } | { @SED@ 's/^.* //' 3>&- + echo "(exit $?) || exit $?" >&3 + } | { sort -u 3>&- + echo "(exit $?) || exit $?" >&3 + } >&4` + exec 4>&- + eval "$eval_cmd" +;; esac