This patch fixes the issue of configure generating broken Makefile
authorSam Lantinga
Thu, 27 Jan 2011 14:54:20 -0800
changeset 511239772ccf7ddd
parent 5111 481dabb098ef
child 5113 686d795b1b29
This patch fixes the issue of configure generating broken Makefile
when .cc files are used due to bad sed substitution on multiple passes:
$(objects)/SDL_BeApp.lo:
$(objects)/SDL_BeApp.lo: ./src/main/beos/SDL_BeApp.c
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@c
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@

Signed-off-by: Fran├žois Revol
configure.in
     1.1 --- a/configure.in	Thu Jan 27 14:45:06 2011 -0800
     1.2 +++ b/configure.in	Thu Jan 27 14:54:20 2011 -0800
     1.3 @@ -2712,10 +2712,10 @@
     1.4  fi
     1.5  
     1.6  OBJECTS=`echo $SOURCES`
     1.7 -DEPENDS=`echo $SOURCES`
     1.8 +DEPENDS=`echo $SOURCES | tr ' ' '\n'`
     1.9  for EXT in asm cc m c S; do
    1.10      OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
    1.11 -    DEPENDS=`echo "$DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT,\\\\
    1.12 +    DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\
    1.13  \\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
    1.14  	\\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    1.15  done