Blargle-fnargle dependencies and build rules
authorSam Lantinga <slouken@libsdl.org>
Mon, 20 Feb 2006 12:45:51 +0000
changeset 13917dc446173e37
parent 1390 67781f790694
child 1392 4a203b442650
Blargle-fnargle dependencies and build rules
Makefile.in
build-scripts/makedep.sh
     1.1 --- a/Makefile.in	Mon Feb 20 11:49:16 2006 +0000
     1.2 +++ b/Makefile.in	Mon Feb 20 12:45:51 2006 +0000
     1.3 @@ -11,6 +11,7 @@
     1.4  includedir = $(DESTDIR)@includedir@
     1.5  datadir	= $(DESTDIR)@datadir@
     1.6  mandir	= $(DESTDIR)@mandir@
     1.7 +auxdir	= @ac_aux_dir@
     1.8  distpath = $(srcdir)/..
     1.9  distdir = SDL-@SDL_VERSION@
    1.10  distfile = $(distdir).tar.gz
    1.11 @@ -31,11 +32,6 @@
    1.12  
    1.13  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.14  
    1.15 -BUILDC	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c `echo $? | sed 's| .*||'`  -o $@
    1.16 -BUILDCC	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c `echo $? | sed 's| .*||'`  -o $@
    1.17 -BUILDM	= $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c `echo $? | sed 's| .*||'`  -o $@
    1.18 -BUILDASM = $(LIBTOOL) --tag=CC --mode=compile @ac_aux_dir@/strip_fPIC.sh $(NASM) `echo $? | sed 's| .*||'` -o $@
    1.19 -
    1.20  LT_AGE      = @LT_AGE@
    1.21  LT_CURRENT  = @LT_CURRENT@
    1.22  LT_RELEASE  = @LT_RELEASE@
    1.23 @@ -48,12 +44,12 @@
    1.24  	$(SHELL) config.status $@
    1.25  
    1.26  $(objects):
    1.27 -	$(SHELL) @ac_aux_dir@/mkinstalldirs $@
    1.28 +	$(SHELL) $(auxdir)/mkinstalldirs $@
    1.29  
    1.30  .PHONY: all depend install install-bin install-hdrs install-lib install-data install-man uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-man clean distclean dist
    1.31  depend:
    1.32  	SOURCES="$(SOURCES)" INCLUDE="$(INCLUDE)" objects="$(objects)" output="$(depend)" \
    1.33 -	$(SHELL) @ac_aux_dir@/makedep.sh
    1.34 +	$(SHELL) $(auxdir)/makedep.sh
    1.35  
    1.36  include $(depend)
    1.37  
    1.38 @@ -62,23 +58,23 @@
    1.39  
    1.40  install: install-bin install-hdrs install-lib install-data install-man
    1.41  install-bin:
    1.42 -	$(SHELL) @ac_aux_dir@/mkinstalldirs $(bindir)
    1.43 +	$(SHELL) $(auxdir)/mkinstalldirs $(bindir)
    1.44  	$(INSTALL) -m 755 $(srcdir)/sdl-config $(bindir)/sdl-config
    1.45  install-hdrs:
    1.46 -	$(SHELL) @ac_aux_dir@/mkinstalldirs $(includedir)/SDL
    1.47 +	$(SHELL) $(auxdir)/mkinstalldirs $(includedir)/SDL
    1.48  	for src in $(srcdir)/include/*.h; do \
    1.49  	    file=`echo $$src | sed -e 's|^.*/||'`; \
    1.50  	    $(INSTALL) $$src $(includedir)/SDL/$$file; \
    1.51  	done
    1.52  	$(INSTALL) include/SDL_config.h $(includedir)/SDL/SDL_config.h
    1.53  install-lib:
    1.54 -	$(SHELL) @ac_aux_dir@/mkinstalldirs $(libdir)
    1.55 +	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
    1.56  	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
    1.57  install-data:
    1.58 -	$(SHELL) @ac_aux_dir@/mkinstalldirs $(datadir)/aclocal
    1.59 +	$(SHELL) $(auxdir)/mkinstalldirs $(datadir)/aclocal
    1.60  	$(INSTALL) $(srcdir)/sdl.m4 $(datadir)/aclocal/sdl.m4
    1.61  install-man:
    1.62 -	$(SHELL) @ac_aux_dir@/mkinstalldirs $(mandir)/man3
    1.63 +	$(SHELL) $(auxdir)/mkinstalldirs $(mandir)/man3
    1.64  	for src in $(srcdir)/docs/man3/*.3; do \
    1.65  	    file=`echo $$src | sed -e 's|^.*/||'`; \
    1.66  	    $(INSTALL) $$src $(mandir)/man3/$$file; \
    1.67 @@ -120,7 +116,7 @@
    1.68  	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
    1.69  
    1.70  dist $(distfile):
    1.71 -	$(SHELL) @ac_aux_dir@/mkinstalldirs $(distdir)
    1.72 +	$(SHELL) $(auxdir)/mkinstalldirs $(distdir)
    1.73  	tar cf - $(DIST) | (cd $(distdir); tar xf -)
    1.74  	rm -rf `find $(distdir) -name CVS`
    1.75  	rm -f `find $(distdir) -name '.cvsignore'`
     2.1 --- a/build-scripts/makedep.sh	Mon Feb 20 11:49:16 2006 +0000
     2.2 +++ b/build-scripts/makedep.sh	Mon Feb 20 12:45:51 2006 +0000
     2.3 @@ -2,6 +2,11 @@
     2.4  #
     2.5  # Generate dependencies from a list of source files
     2.6  
     2.7 +BUILDC="\\\$\\(LIBTOOL\\) --mode=compile \\\$\\(CC\\) \\\$\\(CFLAGS\\) -c \$src  -o \\\$@"
     2.8 +BUILDCC=$BUILDC
     2.9 +BUILDM=$BUILDC
    2.10 +BUILDASM="\\\$\\(LIBTOOL\\) --tag=CC --mode=compile \\\$\\(auxdir\\)/strip_fPIC.sh \\\$\\(NASM\\) \$src -o \\\$@"
    2.11 +
    2.12  # Check to make sure our environment variables are set
    2.13  if test x"$INCLUDE" = x -o x"$SOURCES" = x -o x"$objects" = x -o x"$output" = x; then
    2.14      echo "SOURCES, INCLUDE, objects, and output needs to be set"
    2.15 @@ -21,27 +26,19 @@
    2.16      while read file
    2.17      do cache=${cache_prefix}_`generate_var $file`
    2.18         if test -f $cache; then
    2.19 -          # We already ahve this cached
    2.20 -          if test x$2 = x; then
    2.21 -              cat $cache
    2.22 -          else
    2.23 -              cat $cache >>$2
    2.24 -          fi
    2.25 -          continue;
    2.26 +          : # We already ahve this cached
    2.27 +       else
    2.28 +           : >$cache
    2.29 +           for path in $base `echo $INCLUDE | sed 's|-I||g'`
    2.30 +           do dep="$path/$file"
    2.31 +              if test -f "$dep"; then
    2.32 +                 echo "	$dep \\" >>$cache
    2.33 +                 search_deps $dep >>$cache
    2.34 +                 break
    2.35 +              fi
    2.36 +           done
    2.37         fi
    2.38 -       for path in $base `echo $INCLUDE | sed 's|-I||g'`
    2.39 -       do dep="$path/$file"
    2.40 -          if test -f "$dep"; then
    2.41 -             echo "	$dep \\" >>$cache
    2.42 -             if test x$2 = x; then
    2.43 -                  echo "	$dep \\"
    2.44 -             else
    2.45 -                  echo "	$dep \\" >>$2
    2.46 -             fi
    2.47 -             search_deps $dep $cache
    2.48 -             break
    2.49 -          fi
    2.50 -       done
    2.51 +       cat $cache
    2.52      done
    2.53  }
    2.54  
    2.55 @@ -54,13 +51,12 @@
    2.56      search_deps $src | sort | uniq >>${output}.new
    2.57      echo "" >>${output}.new
    2.58      case $ext in
    2.59 -        asm) echo "	\$(BUILDASM)" >>${output}.new;;
    2.60 -        cc)  echo "	\$(BUILDCC)" >>${output}.new;;
    2.61 -        c)   echo "	\$(BUILDC)" >>${output}.new;;
    2.62 -        m)   echo "	\$(BUILDM)" >>${output}.new;;
    2.63 +        c)   eval echo \\"	$BUILDC\\" >>${output}.new;;
    2.64 +        cc)  eval echo \\"	$BUILDCC\\" >>${output}.new;;
    2.65 +        m)   eval echo \\"	$BUILDM\\" >>${output}.new;;
    2.66 +        asm) eval echo \\"	$BUILDASM\\" >>${output}.new;;
    2.67          *)   echo "Unknown file extension: $ext";;
    2.68      esac
    2.69      echo "" >>${output}.new
    2.70  done
    2.71 -rm -f ${cache_prefix}*
    2.72  mv ${output}.new ${output}