diff options
author | Sam Lantinga <slouken@libsdl.org> | 2006-02-20 11:29:36 +0000 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2006-02-20 11:29:36 +0000 |
commit | 5b3fcf92ea91f2afcb18f8d4c74a906524f88b73 (patch) | |
tree | 574ee38adacf7d923ca011884fc84a0c90369e5f /build-scripts | |
parent | 7e395220f0d0b370067c81c19287e7efa8bc6fb2 (diff) |
Fixed build dependencies... ugh
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401392
Diffstat (limited to 'build-scripts')
-rwxr-xr-x | build-scripts/makedep.sh | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/build-scripts/makedep.sh b/build-scripts/makedep.sh index c8be8b14..50ce568c 100755 --- a/build-scripts/makedep.sh +++ b/build-scripts/makedep.sh @@ -22,37 +22,37 @@ search_deps() do cache=${cache_prefix}_`generate_var $file` if test -f $cache; then # We already ahve this cached - cat $cache + if test x$2 = x; then + cat $cache + else + cat $cache >>$2 + fi continue; fi for path in $base `echo $INCLUDE | sed 's|-I||g'` do dep="$path/$file" if test -f "$dep"; then - echo " $dep \\" >$cache - echo " $dep \\" - generate_dep $dep + echo " $dep \\" >>$cache + if test x$2 = x; then + echo " $dep \\" + else + echo " $dep \\" >>$2 + fi + search_deps $dep $cache break fi done done } -generate_dep() -{ - cat >>${output}.new <<__EOF__ -$1: \\ -`search_deps $1` - -__EOF__ -} - :>${output}.new for src in $SOURCES do echo "Generating dependencies for $src" - generate_dep $src ext=`echo $src | sed 's|.*\.\(.*\)|\1|'` obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|$objects/\1.lo|g"` - echo "$obj: $src" >>${output}.new + echo "$obj: $src \\" >>${output}.new + search_deps $src | sort | uniq >>${output}.new + echo "" >>${output}.new case $ext in asm) echo " \$(BUILDASM)" >>${output}.new;; cc) echo " \$(BUILDCC)" >>${output}.new;; |