From: Theodore Ts'o Date: Sat, 22 Feb 2025 04:54:02 +0000 (-0500) Subject: Fix parallel "make -j install" X-Git-Tag: v1.47.3-rc1~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c8d4f6e0183388be05b49555658920ac8dc9edf;p=thirdparty%2Fe2fsprogs.git Fix parallel "make -j install" If running a parallel install with --enable-elf-shlibs, multiple makes in different library directories can collide while try building util/symlinks. Fix this by building util/symlinks and util/install-symlink as part of the top-level Makefile building other dependencies before recursing into other directories. https://github.com/tytso/e2fsprogs/issues/200 Signed-off-by: Theodore Ts'o --- diff --git a/Makefile.in b/Makefile.in index 79b71165..277b500b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -32,7 +32,7 @@ SUBS= util/subst.conf lib/config.h $(top_builddir)/lib/dirpaths.h \ TAR=tar -all:: subs +all:: top-deps $(MAKE) libs @ALL_CMT@ $(MAKE) progs @ALL_CMT@ $(MAKE) docs @@ -41,7 +41,7 @@ all-static:: $(MAKE) libs @ALL_CMT@ $(MAKE) static-progs -subs: $(DEP_SUBSTITUTE) +top-deps: $(DEP_SUBSTITUTE) $(DEP_INSTALL_SYMLINK) @for i in $(SUBS) ; do if test -d `dirname $$i` ; \ then $(MAKE) $$i || exit $$? ; fi ; done @(if test -d lib/et ; then cd lib/et && $(MAKE) compile_et; fi) @@ -51,7 +51,7 @@ subs: $(DEP_SUBSTITUTE) progs: all-progs-recursive static-progs: all-static-progs-recursive libs: all-libs-recursive -all-progs-recursive all-libs-recursive:: subs +all-progs-recursive all-libs-recursive:: top-deps rpm: sh contrib/build-rpm @@ -71,11 +71,11 @@ clean-doc: distclean-doc: -test -d doc && cd doc && $(MAKE) distclean -install: subs all-libs-recursive install-progs-recursive \ +install: top-deps all-libs-recursive install-progs-recursive \ install-shlibs-libs-recursive install-doc-libs @SUBSET_CMT@ $(MAKE) install-libs -install-strip: subs all-libs-recursive install-strip-progs-recursive \ +install-strip: top-deps all-libs-recursive install-strip-progs-recursive \ install-shlibs-strip-libs-recursive install-doc-libs uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs