From 6192981d1b1341cf876e65a01448ff57f3fbb579 Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Sun, 22 Jul 2007 07:14:44 +0000 Subject: [PATCH] Matthew Leverton made the gcc-uni.sh script just default to a single gcc call if nothing is being built, so it can work for make depend. --- misc/gcc-uni.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/misc/gcc-uni.sh b/misc/gcc-uni.sh index ce2dc58847..a5f48dcdd1 100755 --- a/misc/gcc-uni.sh +++ b/misc/gcc-uni.sh @@ -20,7 +20,7 @@ # set up defaults mode=link -output=a.out +output= cmd= # check whether to use gcc or g++ @@ -60,6 +60,9 @@ if [ $# -eq 0 ]; then exit 1 fi +# remember the arguments in case there's no output files +args=$* + while [ -n "$1" ]; do case "$1" in -arch) @@ -81,10 +84,9 @@ while [ -n "$1" ]; do shift done -# if no output, bail... +# if no output file, just pass the original command as-is and hope for the best if [ -z "$output" ]; then - echo "Error! $0 requires the -o switch." - exit 1 + exec $gcc $args fi # figure out if we are compiling or linking