Fix parallel build of the sample when using configure
Don't add both a directory and its subdirectories to SAMPLES_SUBDIRS as this can result in 2 sub-makes building in the same directory in parallel: one make process recursing into sub-subdirectory from the subdirectory and another one running directly inside it. This notably results in recurring failures in GitHub Actions CI builds. We still need to create makefile.in in the subdirectories containing other samples, so add a separate SAMPLES_SUBTREES variable and use it to collect such directories, instead of putting them into SAMPLES_SUBDIRS itself.
This commit is contained in:
10
configure
vendored
10
configure
vendored
@@ -29103,7 +29103,8 @@ $as_echo "$as_me: WARNING: wxGLCanvas not implemented for this port, library wil
|
||||
|
||||
$as_echo "#define wxUSE_GLCANVAS 1" >>confdefs.h
|
||||
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl opengl/cube opengl/penguin opengl/isosurf opengl/pyramid"
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl/cube opengl/penguin opengl/isosurf opengl/pyramid"
|
||||
SAMPLES_SUBTREES="$SAMPLES_SUBTREES opengl"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -37119,7 +37120,8 @@ if test "$wxUSE_HTML" = "yes"; then
|
||||
$as_echo "#define wxUSE_HTML 1" >>confdefs.h
|
||||
|
||||
USE_HTML=1
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox"
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox"
|
||||
SAMPLES_SUBTREES="$SAMPLES_SUBTREES html"
|
||||
fi
|
||||
|
||||
USE_XRC=0
|
||||
@@ -41306,6 +41308,10 @@ for subdir in $SUBDIRS; do
|
||||
if test -d $srcdir/samples/$sample; then
|
||||
makefiles="samples/$sample/Makefile.in $makefiles"
|
||||
fi
|
||||
done
|
||||
|
||||
for subtree in $SAMPLES_SUBTREES; do
|
||||
makefiles="samples/$subtree/Makefile.in $makefiles"
|
||||
done
|
||||
else
|
||||
disabled_var=DISABLED_`echo $subdir | tr '[a-z]' '[A-Z]'`
|
||||
|
14
configure.in
14
configure.in
@@ -3914,7 +3914,8 @@ if test "$wxUSE_OPENGL" = "yes" -o "$wxUSE_OPENGL" = "auto"; then
|
||||
USE_OPENGL=1
|
||||
AC_DEFINE(wxUSE_OPENGL)
|
||||
AC_DEFINE(wxUSE_GLCANVAS)
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl opengl/cube opengl/penguin opengl/isosurf opengl/pyramid"
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl/cube opengl/penguin opengl/isosurf opengl/pyramid"
|
||||
SAMPLES_SUBTREES="$SAMPLES_SUBTREES opengl"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -7391,7 +7392,8 @@ USE_HTML=0
|
||||
if test "$wxUSE_HTML" = "yes"; then
|
||||
AC_DEFINE(wxUSE_HTML)
|
||||
USE_HTML=1
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox"
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox"
|
||||
SAMPLES_SUBTREES="$SAMPLES_SUBTREES html"
|
||||
fi
|
||||
|
||||
USE_XRC=0
|
||||
@@ -8729,6 +8731,14 @@ for subdir in $SUBDIRS; do
|
||||
makefiles="samples/$sample/Makefile.in $makefiles"
|
||||
fi
|
||||
done
|
||||
|
||||
dnl also create makefiles for the subdirectories containing
|
||||
dnl other samples that are not added to SAMPLES_SUBDIRS because
|
||||
dnl we don't want to recurse into them when building everything
|
||||
dnl because we still want to allow building them explicitly
|
||||
for subtree in $SAMPLES_SUBTREES; do
|
||||
makefiles="samples/$subtree/Makefile.in $makefiles"
|
||||
done
|
||||
else
|
||||
dnl assume that everything compiles for utils &c
|
||||
dnl any that shouldn't be built can be added to
|
||||
|
Reference in New Issue
Block a user