Fixed build dependencies... ugh
authorSam Lantinga <slouken@libsdl.org>
Mon, 20 Feb 2006 11:29:36 +0000
changeset 13889a9b87172b4b
parent 1387 835c1831f903
child 1389 ce65f014190a
Fixed build dependencies... ugh
Makefile.in
build-scripts/makedep.sh
     1.1 --- a/Makefile.in	Mon Feb 20 10:19:47 2006 +0000
     1.2 +++ b/Makefile.in	Mon Feb 20 11:29:36 2006 +0000
     1.3 @@ -31,9 +31,9 @@
     1.4  
     1.5  DIST = acinclude.m4 autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS CWprojects.sea.bin docs docs.html EpocBuildFiles.zip include INSTALL Makefile.dc Makefile.in MPWmake.sea.bin PBProjects.tar.gz README* sdl-config.in sdl.m4 SDL.qpg.in SDL.spec SDL.spec.in setvars.cmd src test TODO VisualCE.zip VisualC.html VisualC.zip Watcom.mif WhatsNew Xcode21.tar.gz Xcode.tar.gz XcodeUniversal.tar.gz
     1.6  
     1.7 -BUILDC	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $? -o $@
     1.8 -BUILDCC	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $? -o $@
     1.9 -BUILDM	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $? -o $@
    1.10 +BUILDC	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c `echo $? | sed 's| .*||'`  -o $@
    1.11 +BUILDCC	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c `echo $? | sed 's| .*||'`  -o $@
    1.12 +BUILDM	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c `echo $? | sed 's| .*||'`  -o $@
    1.13  BUILDASM = $(LIBTOOL) --tag=CC --mode=compile @ac_aux_dir@/strip_fPIC.sh $(NASM) $? -o $@
    1.14  
    1.15  LT_AGE      = @LT_AGE@
     2.1 --- a/build-scripts/makedep.sh	Mon Feb 20 10:19:47 2006 +0000
     2.2 +++ b/build-scripts/makedep.sh	Mon Feb 20 11:29:36 2006 +0000
     2.3 @@ -22,37 +22,37 @@
     2.4      do cache=${cache_prefix}_`generate_var $file`
     2.5         if test -f $cache; then
     2.6            # We already ahve this cached
     2.7 -          cat $cache
     2.8 +          if test x$2 = x; then
     2.9 +              cat $cache
    2.10 +          else
    2.11 +              cat $cache >>$2
    2.12 +          fi
    2.13            continue;
    2.14         fi
    2.15         for path in $base `echo $INCLUDE | sed 's|-I||g'`
    2.16         do dep="$path/$file"
    2.17            if test -f "$dep"; then
    2.18 -             echo "	$dep \\" >$cache
    2.19 -             echo "	$dep \\"
    2.20 -             generate_dep $dep
    2.21 +             echo "	$dep \\" >>$cache
    2.22 +             if test x$2 = x; then
    2.23 +                  echo "	$dep \\"
    2.24 +             else
    2.25 +                  echo "	$dep \\" >>$2
    2.26 +             fi
    2.27 +             search_deps $dep $cache
    2.28               break
    2.29            fi
    2.30         done
    2.31      done
    2.32  }
    2.33  
    2.34 -generate_dep()
    2.35 -{
    2.36 -    cat >>${output}.new <<__EOF__
    2.37 -$1:	\\
    2.38 -`search_deps $1`
    2.39 -
    2.40 -__EOF__
    2.41 -}
    2.42 -
    2.43  :>${output}.new
    2.44  for src in $SOURCES
    2.45  do  echo "Generating dependencies for $src"
    2.46 -    generate_dep $src
    2.47      ext=`echo $src | sed 's|.*\.\(.*\)|\1|'`
    2.48      obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|$objects/\1.lo|g"`
    2.49 -    echo "$obj: $src" >>${output}.new
    2.50 +    echo "$obj: $src \\" >>${output}.new
    2.51 +    search_deps $src | sort | uniq >>${output}.new
    2.52 +    echo "" >>${output}.new
    2.53      case $ext in
    2.54          asm) echo "	\$(BUILDASM)" >>${output}.new;;
    2.55          cc)  echo "	\$(BUILDCC)" >>${output}.new;;