Fixed bug 4379 - fix parallel build with slibtool
authorSam Lantinga <slouken@libsdl.org>
Sat, 08 Dec 2018 11:22:50 -0800
changeset 1246999d8b18acf8a
parent 12468 209066a82aef
child 12470 1f8d0b1afe07
Fixed bug 4379 - fix parallel build with slibtool

orbea

I am having a parallel build problem with -j3 or higher using the autotools build and slibtool instead of GNU libtool. Basically slibtool is faster than GNU libtool and it will start working before mkdir starts or finishes creating the build/ directory.
Makefile.in
configure
configure.in
     1.1 --- a/Makefile.in	Sat Dec 08 11:06:40 2018 -0800
     1.2 +++ b/Makefile.in	Sat Dec 08 11:22:50 2018 -0800
     1.3 @@ -125,7 +125,7 @@
     1.4  LT_REVISION = @LT_REVISION@
     1.5  LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
     1.6  
     1.7 -all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
     1.8 +all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
     1.9  
    1.10  $(srcdir)/configure: $(srcdir)/configure.in
    1.11  	@echo "Warning, configure is out of date, please re-run autogen.sh"
    1.12 @@ -135,8 +135,9 @@
    1.13  
    1.14  Makefile.in:;
    1.15  
    1.16 -$(objects):
    1.17 -	$(SHELL) $(auxdir)/mkinstalldirs $@
    1.18 +$(objects)/.created:
    1.19 +	$(SHELL) $(auxdir)/mkinstalldirs $(objects)
    1.20 +	touch $@
    1.21  
    1.22  update-revision:
    1.23  	$(SHELL) $(auxdir)/updaterev.sh
     2.1 --- a/configure	Sat Dec 08 11:06:40 2018 -0800
     2.2 +++ b/configure	Sat Dec 08 11:22:50 2018 -0800
     2.3 @@ -24868,7 +24868,7 @@
     2.4  for EXT in asm cc m c S; do
     2.5      OBJECTS=`echo "$OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.'$EXT',$(objects)/\1.lo,g'`
     2.6      DEPENDS=`echo "$DEPENDS" | sed "s,^\\([^ ]*\\)/\\([^ ]*\\)\\.$EXT\\$,\\\\
     2.7 -\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
     2.8 +\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created\\\\
     2.9  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    2.10  done
    2.11  
    2.12 @@ -24885,14 +24885,14 @@
    2.13  SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
    2.14  SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
    2.15  SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.c,\\\\
    2.16 -\\$(objects)/\\2.lo: \\1/\\2.c\\\\
    2.17 +\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
    2.18  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    2.19  
    2.20  SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
    2.21  SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
    2.22  SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
    2.23  SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.c,\\\\
    2.24 -\\$(objects)/\\2.lo: \\1/\\2.c\\\\
    2.25 +\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
    2.26  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    2.27  
    2.28  # Set runtime shared library paths as needed
     3.1 --- a/configure.in	Sat Dec 08 11:06:40 2018 -0800
     3.2 +++ b/configure.in	Sat Dec 08 11:22:50 2018 -0800
     3.3 @@ -4073,7 +4073,7 @@
     3.4  for EXT in asm cc m c S; do
     3.5      OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
     3.6      DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\
     3.7 -\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
     3.8 +\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created\\\\
     3.9  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    3.10  done
    3.11  
    3.12 @@ -4090,14 +4090,14 @@
    3.13  SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
    3.14  SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
    3.15  SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
    3.16 -\\$(objects)/\\2.lo: \\1/\\2.c\\\\
    3.17 +\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
    3.18  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    3.19  
    3.20  SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
    3.21  SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
    3.22  SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
    3.23  SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
    3.24 -\\$(objects)/\\2.lo: \\1/\\2.c\\\\
    3.25 +\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
    3.26  	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
    3.27  
    3.28  # Set runtime shared library paths as needed