Module: xenomai-2.5 Branch: master Commit: ec7cf85c20554e326da433a3f88a5693f58d1fa0 URL: http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=ec7cf85c20554e326da433a3f88a5693f58d1fa0
Author: Philippe Gerum <r...@xenomai.org> Date: Sun Feb 21 16:36:19 2010 +0100 wrap-link.sh: introduce dry run mode (-n) --- scripts/wrap-link.sh | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/wrap-link.sh b/scripts/wrap-link.sh index 83a8d3d..a54e6ff 100755 --- a/scripts/wrap-link.sh +++ b/scripts/wrap-link.sh @@ -14,6 +14,7 @@ Xenomai user-space posix skin in two stages. Options: -q be quiet -v be verbose (print each command before running it) +-n dry run (print all commands but don't run any) Example: $1 -v gcc -o foo foo.o -Wl,@/usr/xenomai/lib/posix.wrappers -L/usr/xenomai/lib -lpthread_rt -lpthread -lrt @@ -58,6 +59,7 @@ if test -n "$V" && test $V -gt 0; then else verbose=false fi +dryrun= progname="$0" if test $# -eq 0; then @@ -77,6 +79,10 @@ while test $# -gt 0; do verbose=false ;; + -n) + dryrun="echo # " + ;; + -*) cc="$cc $arg" ;; @@ -98,6 +104,7 @@ while test $# -gt 0; do esac done +test -z "$dryrun" || verbose=false next_is_wrapped_symbol=false onestage_args="$@" @@ -182,10 +189,10 @@ done if $stage2; then $verbose && set -x - $cc -o "$output.tmp" -Wl,-Ur -nostdlib $stage1_args - $cc -o "$output" "$output.tmp" $stage2_args - rm -f $output.tmp + $dryrun $cc -o "$output.tmp" -Wl,-Ur -nostdlib $stage1_args + $dryrun $cc -o "$output" "$output.tmp" $stage2_args + $dryrun rm -f $output.tmp else $verbose && set -x - $cc -o "$output" $onestage_args + $dryrun $cc -o "$output" $onestage_args fi _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git