Skip to content

Commit

Permalink
Matthew Leverton made the gcc-uni.sh script just default to a single …
Browse files Browse the repository at this point in the history
…gcc call

if nothing is being built, so it can work for make depend.
  • Loading branch information
Peter Wang committed Jul 22, 2007
1 parent 43835b7 commit 6192981
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions misc/gcc-uni.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# set up defaults
mode=link
output=a.out
output=
cmd=

# check whether to use gcc or g++
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 6192981

Please sign in to comment.