Permalink
Browse files

patch 8.0.0570: can't run make with several jobs

Problem:    Can't run make with several jobs, creating directories has a race
            condition.
Solution:   Use the MKDIR_P autoconf mechanism. (Eric N. Vander Weele,
            closes #1639)
  • Loading branch information...
brammool committed Apr 20, 2017
1 parent 62cf09b commit c03944151fec2d5469746642a949c8fcb5a744a8
Showing with 620 additions and 74 deletions.
  1. +1 −1 Filelist
  2. +25 −25 src/Makefile
  3. +82 −4 src/auto/configure
  4. +2 −0 src/config.mk.in
  5. +7 −6 src/configure.ac
  6. +501 −0 src/install-sh
  7. +0 −38 src/mkinstalldirs
  8. +2 −0 src/version.c
View
@@ -239,7 +239,7 @@ SRC_UNIX = \
src/link.sh \
src/installman.sh \
src/installml.sh \
src/mkinstalldirs \
src/install-sh \
src/os_unix.c \
src/os_unix.h \
src/os_unixx.h \
View
@@ -207,7 +207,7 @@
#SunOS 4.1.x +X11 -GUI 5.1b (J) Bram Moolenaar
#SunOS 4.1.3_U1 (sun4c) gcc +X11 +GUI Athena 5.0w (J) Darren Hiebert
#SUPER-UX 6.2 (NEC SX-4) cc +X11R6 Motif,Athena4.6b (P) Lennart Schultz
#Tandem/NSK (c) Matthew Woehlke
#Tandem/NSK (c) Matthew Woehlke
#Unisys 6035 cc +X11 Motif 5.3 (8) Glauber Ribeiro
#ESIX V4.2 cc +X11 6.0 (a) Reinhard Wobst
#Mac OS X 10.[23] gcc Carbon 6.2 (x) Bram Moolenaar
@@ -403,6 +403,7 @@ CClink = $(CC)
# First one is for static linking, second one for dynamic loading.
# Use --with-luajit if you want to use LuaJIT instead of Lua.
# Set PATH environment variable to find lua or luajit executable.
# This requires at least "normal" features, "tiny" and "small" don't work.
#CONF_OPT_LUA = --enable-luainterp
#CONF_OPT_LUA = --enable-luainterp=dynamic
#CONF_OPT_LUA = --enable-luainterp --with-luajit
@@ -429,16 +430,15 @@ CClink = $(CC)
# the next line.
# When you get an error for a missing "perl.exp" file, try creating an empty
# one: "touch perl.exp".
# This requires at least "small" features, "tiny" doesn't work.
# This requires at least "normal" features, "tiny" and "small" don't work.
#CONF_OPT_PERL = --enable-perlinterp
#CONF_OPT_PERL = --enable-perlinterp=dynamic
# PYTHON
# Uncomment this when you want to include the Python interface.
# Requires small features or better, fails with tiny features.
# Uncomment lines here when you want to include the Python interface.
# This requires at least "normal" features, "tiny" and "small" don't work.
# NOTE: This may cause threading to be enabled, which has side effects (such
# as using different libraries and debugging becomes more difficult).
# NOTE: Using this together with Perl may cause a crash in initialization.
# For Python3 support make a symbolic link in /usr/local/bin:
# ln -s python3 python3.1
# If both python2.x and python3.x are enabled then the linking will be via
@@ -454,6 +454,7 @@ CClink = $(CC)
# Uncomment this when you want to include the Ruby interface.
# First one for static linking, second one for loading when used.
# Note: you need the development package (e.g., ruby1.9.1-dev on Ubuntu).
# This requires at least "normal" features, "tiny" and "small" don't work.
#CONF_OPT_RUBY = --enable-rubyinterp
#CONF_OPT_RUBY = --enable-rubyinterp=dynamic
#CONF_OPT_RUBY = --enable-rubyinterp --with-ruby-command=ruby1.9.1
@@ -617,7 +618,7 @@ AUTOCONF = autoconf
#PURIFY = purify
# VALGRIND - remove the # to use valgrind for memory leaks and access errors.
# Used for the unittest targets.
# Used for the unittest targets.
# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind.$@
# NBDEBUG - debugging the netbeans interface.
@@ -649,15 +650,15 @@ LINT_OPTIONS = -beprxzF
# coverage information. (provided by Yegappan Lakshmanan)
# 1. make clean, run configure and build Vim as usual.
# 2. Generate the baseline code coverage information:
# $ lcov -c -i -b . -d objects -o objects/coverage_base.info
# $ lcov -c -i -b . -d objects -o objects/coverage_base.info
# 3. Run "make test" to run the unit tests. The code coverage information will
# be generated in the src/objects directory.
# 4. Generate the code coverage information from the tests:
# $ lcov -c -b . -d objects/ -o objects/coverage_test.info
# $ lcov -c -b . -d objects/ -o objects/coverage_test.info
# 5. Combine the baseline and test code coverage data:
# $ lcov -a objects/coverage_base.info -a objects/coverage_test.info -o objects/coverage_total.info
# $ lcov -a objects/coverage_base.info -a objects/coverage_test.info -o objects/coverage_total.info
# 6. Process the test coverage data and generate a report in html:
# $ genhtml objects/coverage_total.info -o objects
# $ genhtml objects/coverage_total.info -o objects
# 7. Open the objects/index.html file in a web browser to view the coverage
# information.
#
@@ -2566,7 +2567,7 @@ DESKTOPPATH = $(DESTDIR)$(DATADIR)/applications
KDEPATH = $(HOME)/.kde/share/icons
install-icons:
if test -n "$(DESTDIR)"; then \
$(SHELL) ./mkinstalldirs $(ICON48PATH) $(ICON32PATH) \
$(MKDIR_P) $(ICON48PATH) $(ICON32PATH) \
$(ICON16PATH) $(DESKTOPPATH); \
fi
@@ -2607,7 +2608,7 @@ $(DESTDIR)$(exec_prefix) $(DEST_BIN) \
$(DEST_LANG) $(DEST_KMAP) $(DEST_COMP) $(DEST_MACRO) \
$(DEST_PACK) $(DEST_TOOLS) $(DEST_TUTOR) $(DEST_SPELL) \
$(DEST_AUTO) $(DEST_AUTO)/xml $(DEST_PLUG):
-$(SHELL) ./mkinstalldirs $@
$(MKDIR_P) $@
-chmod $(DIRMOD) $@
# create links from various names to vim. This is only done when the links
@@ -2787,25 +2788,25 @@ clean celan: testclean
SHADOWDIR = shadow
shadow: runtime pixmaps
mkdir $(SHADOWDIR)
cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../vimtutor ../gvimtutor ../mkinstalldirs .
$(MKDIR_P) $(SHADOWDIR)
cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../vimtutor ../gvimtutor ../install-sh .
mkdir $(SHADOWDIR)/auto
cd $(SHADOWDIR)/auto; ln -s ../../auto/configure .
mkdir $(SHADOWDIR)/po
$(MKDIR_P) $(SHADOWDIR)/po
cd $(SHADOWDIR)/po; ln -s ../../po/*.po ../../po/*.mak ../../po/*.vim ../../po/Makefile .
cd $(SHADOWDIR); rm -f auto/link.sed
cp Makefile configure $(SHADOWDIR)
rm -f $(SHADOWDIR)/auto/config.mk $(SHADOWDIR)/config.mk.dist
cp config.mk.dist $(SHADOWDIR)/auto/config.mk
cp config.mk.dist $(SHADOWDIR)
mkdir $(SHADOWDIR)/xxd
$(MKDIR_P) $(SHADOWDIR)/xxd
cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
if test -d $(RSRC_DIR); then \
cd $(SHADOWDIR); \
ln -s ../infplist.xml .; \
ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \
fi
mkdir $(SHADOWDIR)/testdir
$(MKDIR_P) $(SHADOWDIR)/testdir
cd $(SHADOWDIR)/testdir; ln -s ../../testdir/Makefile \
../../testdir/Make_all.mak \
../../testdir/README.txt \
@@ -2942,7 +2943,7 @@ auto/gui_gtk_gresources.h: gui_gtk_res.xml $(GUI_GTK_RES_INPUTS)
objects: objects/.dirstamp
objects/.dirstamp:
mkdir -p objects
$(MKDIR_P) objects
touch objects/.dirstamp
# All object files depend on the objects directory, so that parallel make
@@ -3273,8 +3274,7 @@ install_macosx: gui_bundle
# Generate the help tags file now, it won't work with "make installruntime".
-@srcdir=`pwd`; cd $(HELPSOURCE); $(MAKE) VIMEXE=$$srcdir/$(VIMTARGET) vimtags
# Install the runtime files. Recursive!
-mkdir -p $(DESTDIR)$(prefix)/$(RESDIR)/vim/runtime
# -mkdir $(DESTDIR)$(prefix)/$(APPDIR)/bin
$(MKDIR_P) $(DESTDIR)$(prefix)/$(RESDIR)/vim/runtime
srcdir=`pwd`; $(MAKE) -f Makefile installruntime \
VIMEXE=$$srcdir/$(VIMTARGET) \
prefix=$(DESTDIR)$(prefix)/$(RESDIR)$(VIMDIR) \
@@ -3292,16 +3292,16 @@ gui_bundle: $(RESDIR) bundle-dir bundle-executable bundle-info bundle-resource \
bundle-language
$(RESDIR):
mkdir -p $@
$(MKDIR_P) $@
bundle-dir: $(APPDIR)/Contents $(VIMTARGET)
# Make a link to the runtime directory, so that we can try out the executable
# without installing it.
mkdir -p $(RESDIR)/vim
$(MKDIR_P) $(RESDIR)/vim
-ln -s `pwd`/../runtime $(RESDIR)/vim
bundle-executable: $(VIMTARGET)
mkdir -p $(APPDIR)/Contents/MacOS
$(MKDIR_P) $(APPDIR)/Contents/MacOS
cp $(VIMTARGET) $(APPDIR)/Contents/MacOS/$(VIMTARGET)
bundle-info: bundle-dir
@@ -3332,8 +3332,8 @@ bundle-rsrc: os_mac.rsr.hqx
bundle-language: bundle-dir
$(APPDIR)/Contents:
-$(SHELL) ./mkinstalldirs $(APPDIR)/Contents/MacOS
-$(SHELL) ./mkinstalldirs $(RESDIR)/English.lproj
$(MKDIR_P) $(APPDIR)/Contents/MacOS
$(MKDIR_P) $(RESDIR)/English.lproj
###############################################################################
View
@@ -725,6 +725,7 @@ XCODE_SELECT
CPP_MM
CROSS_COMPILING
STRIP
MKDIR_P
AWK
FGREP
EGREP
@@ -3446,7 +3447,7 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=c
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -3723,7 +3724,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
fi
rm -f conftest*
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
$as_echo_n "checking for fgrep... " >&6; }
if ${ac_cv_path_FGREP+:} false; then :
$as_echo_n "(cached) " >&6
@@ -3789,7 +3790,7 @@ fi
$as_echo "$ac_cv_path_FGREP" >&6; }
FGREP="$ac_cv_path_FGREP"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
$as_echo_n "checking for library containing strerror... " >&6; }
if ${ac_cv_search_strerror+:} false; then :
$as_echo_n "(cached) " >&6
@@ -3844,7 +3845,7 @@ if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
for ac_prog in gawk mawk nawk awk
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -3885,6 +3886,76 @@ fi
test -n "$AWK" && break
done
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
if ${ac_cv_path_mkdir+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
'mkdir (fileutils) '4.1*)
ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
break 3;;
esac
done
done
done
IFS=$as_save_IFS
fi
test -d ./--version && rmdir ./--version
if test "${ac_cv_path_mkdir+set}" = set; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
# As a last resort, use the slow shell script. Don't cache a
# value for MKDIR_P within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the value is a relative name.
MKDIR_P="$ac_install_sh -d"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
@@ -14714,6 +14785,7 @@ gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
MKDIR_P='$MKDIR_P'
AWK='$AWK'
test -n "\$AWK" || AWK=awk
_ACEOF
@@ -15271,6 +15343,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
# CONFIG_FILE
#
ac_MKDIR_P=$MKDIR_P
case $MKDIR_P in
[\\/$]* | ?:[\\/]* ) ;;
*/*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
esac
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -15324,6 +15401,7 @@ s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
View
@@ -103,6 +103,8 @@ AWK = @AWK@
STRIP = @STRIP@
MKDIR_P = @MKDIR_P@
EXEEXT = @EXEEXT@
CROSS_COMPILING = @CROSS_COMPILING@
View
@@ -11,12 +11,13 @@ AC_DEFINE(UNIX)
AC_PROG_MAKE_SET
dnl Checks for programs.
AC_PROG_CC dnl required by almost everything
AC_PROG_CPP dnl required by header file checks
AC_PROGRAM_EGREP dnl required by AC_EGREP_CPP
AC_PROG_FGREP dnl finds working grep -F
AC_ISC_POSIX dnl required by AC_C_CROSS
AC_PROG_AWK dnl required for "make html" in ../doc
AC_PROG_CC dnl required by almost everything
AC_PROG_CPP dnl required by header file checks
AC_PROGRAM_EGREP dnl required by AC_EGREP_CPP
AC_PROG_FGREP dnl finds working grep -F
AC_ISC_POSIX dnl required by AC_C_CROSS
AC_PROG_AWK dnl required for "make html" in ../doc
AC_PROG_MKDIR_P dnl portable "mkdir -p", also works in parallel
dnl Don't strip if we don't have it
AC_CHECK_PROG(STRIP, strip, strip, :)
Oops, something went wrong.

0 comments on commit c039441

Please sign in to comment.