diff build-scripts/makedep.sh @ 1634:14f302c5b32c

Don't hardcode the output directory
author Sam Lantinga <slouken@libsdl.org>
date Fri, 14 Apr 2006 03:56:31 +0000
parents 9b9212e4810c
children 9f64d06fa168
line wrap: on
line diff
--- a/build-scripts/makedep.sh	Fri Apr 14 03:24:01 2006 +0000
+++ b/build-scripts/makedep.sh	Fri Apr 14 03:56:31 2006 +0000
@@ -3,8 +3,8 @@
 # Generate dependencies from a list of source files
 
 # Check to make sure our environment variables are set
-if test x"$INCLUDE" = x -o x"$SOURCES" = x -o x"$objects" = x -o x"$output" = x; then
-    echo "SOURCES, INCLUDE, objects, and output needs to be set"
+if test x"$INCLUDE" = x -o x"$SOURCES" = x -o x"$output" = x; then
+    echo "SOURCES, INCLUDE, and output needs to be set"
     exit 1
 fi
 cache_prefix=".#$$"
@@ -41,8 +41,8 @@
 for src in $SOURCES
 do  echo "Generating dependencies for $src"
     ext=`echo $src | sed 's|.*\.\(.*\)|\1|'`
-    obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|$objects/\1.lo|g"`
-    echo "$obj: $src \\" >>${output}.new
+    obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"`
+    echo "\$(objects)/$obj: $src \\" >>${output}.new
     search_deps $src | sort | uniq >>${output}.new
     case $ext in
         c) cat >>${output}.new <<__EOF__