[vlc-commits] contrib: using make -C should spread the threads from "make -j" properly
Steve Lhomme
git at videolan.org
Thu Jun 18 18:31:33 CEST 2020
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed May 18 13:24:03 2016 +0200| [dc642dc17de46702fa75a9f39365671e213134ce] | committer: Steve Lhomme
contrib: using make -C should spread the threads from "make -j" properly
According to https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html#index-recursion_002c-and-_002dj
"the parent make and all the sub-makes will communicate to ensure that there
are only āNā jobs running at the same time between them all."
(cherry picked from commit 86cc5a15be3bc9480cb4b87d08e1c0af4d0f8fe9) (rebased)
rebased:
- aom has the proper pthreadGC2 in this branch
- flac ece14f9ee78760a8176467978d0a09a45f9a9a2f was backported before
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=dc642dc17de46702fa75a9f39365671e213134ce
---
contrib/src/a52/rules.mak | 4 ++--
contrib/src/aom/rules.mak | 2 +-
contrib/src/faad2/rules.mak | 2 +-
contrib/src/flac/rules.mak | 4 ++--
contrib/src/fontconfig/rules.mak | 2 +-
contrib/src/gnutls/rules.mak | 4 ++--
contrib/src/libmpeg2/rules.mak | 4 ++--
contrib/src/lua/rules.mak | 2 +-
contrib/src/ncurses/rules.mak | 6 +++---
contrib/src/qt/rules.mak | 8 ++++----
contrib/src/qtsvg/rules.mak | 2 +-
contrib/src/twolame/rules.mak | 2 +-
contrib/src/x265/rules.mak | 2 +-
contrib/src/zvbi/rules.mak | 2 +-
14 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/contrib/src/a52/rules.mak b/contrib/src/a52/rules.mak
index 3ca4d08899..4e042a17da 100644
--- a/contrib/src/a52/rules.mak
+++ b/contrib/src/a52/rules.mak
@@ -26,6 +26,6 @@ endif
$(REQUIRE_GPL)
$(RECONF)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
- cd $</liba52 && $(MAKE) install
- cd $</include && $(MAKE) install
+ cd $< && $(MAKE) -C liba52 install
+ cd $< && $(MAKE) -C include install
touch $@
diff --git a/contrib/src/aom/rules.mak b/contrib/src/aom/rules.mak
index 0d78922f1d..c0c9d0e8ac 100644
--- a/contrib/src/aom/rules.mak
+++ b/contrib/src/aom/rules.mak
@@ -94,7 +94,7 @@ endif
.aom: aom toolchain.cmake
cd $< && mkdir -p aom_build
cd $</aom_build && LDFLAGS="$(AOM_LDFLAGS)" $(HOSTVARS) CFLAGS="$(AOM_CFLAGS)" CXXFLAGS="$(AOM_CXXFLAGS)" $(CMAKE) ../ $(AOM_CONF)
- cd $</aom_build && $(MAKE)
+ cd $< && $(MAKE) -C aom_build
cd $</aom_build && ../../../../contrib/src/pkg-static.sh aom.pc
cd $</aom_build && $(MAKE) install
touch $@
diff --git a/contrib/src/faad2/rules.mak b/contrib/src/faad2/rules.mak
index a4d4dfb556..0f25469397 100644
--- a/contrib/src/faad2/rules.mak
+++ b/contrib/src/faad2/rules.mak
@@ -32,5 +32,5 @@ endif
$(RECONF)
cd $< && $(HOSTVARS) ./configure --without-drm $(HOSTCONF)
cd $< && sed -i.orig "s/shrext_cmds/shrext/g" libtool
- cd $</libfaad && $(MAKE) install
+ cd $< && $(MAKE) -C libfaad install
touch $@
diff --git a/contrib/src/flac/rules.mak b/contrib/src/flac/rules.mak
index 1a4cfef3e7..878e37f5c7 100644
--- a/contrib/src/flac/rules.mak
+++ b/contrib/src/flac/rules.mak
@@ -59,6 +59,6 @@ DEPS_flac = ogg $(DEPS_ogg)
.flac: flac
cd $< && $(AUTORECONF)
cd $< && $(HOSTVARS) CFLAGS="$(FLAC_CFLAGS)" ./configure $(FLACCONF)
- cd $</include && $(MAKE) install
- cd $</src && $(MAKE) -C libFLAC install && $(MAKE) -C share install
+ cd $< && $(MAKE) -C include install
+ cd $< && $(MAKE) -C src/libFLAC install && $(MAKE) -C src/share install
touch $@
diff --git a/contrib/src/fontconfig/rules.mak b/contrib/src/fontconfig/rules.mak
index 4d44c09597..3efaaeb7b2 100644
--- a/contrib/src/fontconfig/rules.mak
+++ b/contrib/src/fontconfig/rules.mak
@@ -60,7 +60,7 @@ ifndef HAVE_MACOSX
cd $< && $(MAKE) install
else
cd $< && $(MAKE) install-exec
- cd $</fontconfig && $(MAKE) install-data
+ cd $< && $(MAKE) -C fontconfig install-data
sed -e 's%/usr/lib/libiconv.la%%' -i.orig $(PREFIX)/lib/libfontconfig.la
cp $</fontconfig.pc $(PREFIX)/lib/pkgconfig/
endif
diff --git a/contrib/src/gnutls/rules.mak b/contrib/src/gnutls/rules.mak
index 98bfd33acf..7a4f550cce 100644
--- a/contrib/src/gnutls/rules.mak
+++ b/contrib/src/gnutls/rules.mak
@@ -86,6 +86,6 @@ endif
.gnutls: gnutls
$(RECONF)
cd $< && $(GNUTLS_ENV) ./configure $(GNUTLS_CONF)
- cd $</gl && $(MAKE) install
- cd $</lib && $(MAKE) install
+ cd $< && $(MAKE) -C gl install
+ cd $< && $(MAKE) -C lib install
touch $@
diff --git a/contrib/src/libmpeg2/rules.mak b/contrib/src/libmpeg2/rules.mak
index c834c2030a..3b4ce47e37 100644
--- a/contrib/src/libmpeg2/rules.mak
+++ b/contrib/src/libmpeg2/rules.mak
@@ -27,6 +27,6 @@ libmpeg2: libmpeg2-$(LIBMPEG2_VERSION).tar.gz .sum-libmpeg2
$(REQUIRE_GPL)
$(RECONF)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --without-x --disable-sdl
- cd $</libmpeg2 && $(MAKE) && $(MAKE) install
- cd $</include && $(MAKE) && $(MAKE) install
+ cd $< && $(MAKE) -C libmpeg2 && $(MAKE) -C libmpeg2 install
+ cd $< && $(MAKE) -C include && $(MAKE) -C include install
touch $@
diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index 5f79756abd..309b9940fe 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -75,7 +75,7 @@ endif
.lua: lua
cd $< && $(HOSTVARS_PIC) $(MAKE) $(LUA_TARGET)
ifdef HAVE_WIN32
- cd $</src && $(HOSTVARS) $(MAKE) liblua.a
+ cd $< && $(HOSTVARS) $(MAKE) -C src liblua.a
endif
cd $< && $(HOSTVARS) $(MAKE) install INSTALL_TOP="$(PREFIX)"
ifdef HAVE_WIN32
diff --git a/contrib/src/ncurses/rules.mak b/contrib/src/ncurses/rules.mak
index eeb5dbb711..4b19f13b44 100644
--- a/contrib/src/ncurses/rules.mak
+++ b/contrib/src/ncurses/rules.mak
@@ -22,7 +22,7 @@ ncurses: ncurses-$(NCURSES_VERSION).tar.gz .sum-ncurses
.ncurses: ncurses
cd $< && mkdir -p "$(PREFIX)/lib/pkgconfig" && $(HOSTVARS) PKG_CONFIG_LIBDIR="$(PREFIX)/lib/pkgconfig" ./configure $(patsubst --datarootdir=%,,$(HOSTCONF)) --without-debug --enable-widec --without-develop --without-shared --with-terminfo-dirs=/usr/share/terminfo --with-pkg-config=yes --enable-pc-files
- cd $</ncurses && make -j1 && make install
- cd $</include && make -j1 && make install
- cd $</misc && make pc-files && cp ncursesw.pc "$(PREFIX)/lib/pkgconfig"
+ cd $< && make -C ncurses -j1 && make -C ncurses install
+ cd $< && make -C include -j1 && make -C include install
+ cd $< && make -C misc pc-files && cp misc/ncursesw.pc "$(PREFIX)/lib/pkgconfig"
touch $@
diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
index 6be3dc09a0..3496eec1bb 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -51,11 +51,11 @@ QT_CONFIG += -release
cd $< && ./configure $(QT_PLATFORM) $(QT_CONFIG) -prefix $(PREFIX)
# Make && Install libraries
cd $< && $(MAKE)
- cd $</src && $(MAKE) sub-corelib-install_subtargets sub-gui-install_subtargets sub-widgets-install_subtargets sub-platformsupport-install_subtargets sub-zlib-install_subtargets sub-bootstrap-install_subtargets
+ cd $< && $(MAKE) -C src sub-corelib-install_subtargets sub-gui-install_subtargets sub-widgets-install_subtargets sub-platformsupport-install_subtargets sub-zlib-install_subtargets sub-bootstrap-install_subtargets
# Install tools
- cd $</src && $(MAKE) sub-moc-install_subtargets sub-rcc-install_subtargets sub-uic-install_subtargets
+ cd $< && $(MAKE) -C src sub-moc-install_subtargets sub-rcc-install_subtargets sub-uic-install_subtargets
# Install plugins
- cd $</src/plugins && $(MAKE) sub-platforms-install_subtargets
+ cd $< && $(MAKE) -C src/plugins sub-platforms-install_subtargets
mv $(PREFIX)/plugins/platforms/libqwindows.a $(PREFIX)/lib/ && rm -rf $(PREFIX)/plugins
# Move includes to match what VLC expects
mkdir -p $(PREFIX)/include/QtGui/qpa
@@ -69,7 +69,7 @@ QT_CONFIG += -release
ifdef HAVE_CROSS_COMPILE
# Building Qt build tools for Xcompilation
cd $</include/QtCore; ln -sf $(QT_VERSION)/QtCore/private
- cd $</qmake; $(MAKE)
+ cd $<; $(MAKE) -C qmake
cd $<; $(MAKE) install_qmake install_mkspecs
cd $</src/tools; \
for i in bootstrap uic rcc moc; \
diff --git a/contrib/src/qtsvg/rules.mak b/contrib/src/qtsvg/rules.mak
index 4a97239ea5..37c5e4d815 100644
--- a/contrib/src/qtsvg/rules.mak
+++ b/contrib/src/qtsvg/rules.mak
@@ -28,7 +28,7 @@ qtsvg: qtsvg-$(QTSVG_VERSION).tar.xz .sum-qtsvg
cd $< && $(PREFIX)/bin/qmake
# Make && Install libraries
cd $< && $(MAKE)
- cd $</src && $(MAKE) sub-plugins-install_subtargets sub-svg-install_subtargets
+ cd $< && $(MAKE) -C src sub-plugins-install_subtargets sub-svg-install_subtargets
mv $(PREFIX)/plugins/iconengines/libqsvgicon.a $(PREFIX)/lib/
mv $(PREFIX)/plugins/imageformats/libqsvg.a $(PREFIX)/lib/
cd $(PREFIX)/lib/pkgconfig; sed -i \
diff --git a/contrib/src/twolame/rules.mak b/contrib/src/twolame/rules.mak
index 70dda67387..3ff3de64fa 100644
--- a/contrib/src/twolame/rules.mak
+++ b/contrib/src/twolame/rules.mak
@@ -24,6 +24,6 @@ twolame: twolame-$(TWOLAME_VERSION).tar.gz .sum-twolame
$(RECONF)
cd $< && $(HOSTVARS) CFLAGS="${CFLAGS} -DLIBTWOLAME_STATIC" ./configure $(HOSTCONF)
cd $< && $(MAKE)
- cd $</libtwolame && $(MAKE) install
+ cd $< && $(MAKE) -C libtwolame install
cd $< && $(MAKE) install-data
touch $@
diff --git a/contrib/src/x265/rules.mak b/contrib/src/x265/rules.mak
index c06c22d18d..0b0fce3187 100644
--- a/contrib/src/x265/rules.mak
+++ b/contrib/src/x265/rules.mak
@@ -37,6 +37,6 @@ endif
.x265: x265 toolchain.cmake
$(REQUIRE_GPL)
cd $</source && $(HOSTVARS_PIC) $(CMAKE) -DENABLE_SHARED=OFF -DCMAKE_SYSTEM_PROCESSOR=$(ARCH) -DENABLE_CLI=OFF
- cd $</source && $(MAKE) install
+ cd $< && $(MAKE) -C source install
sed -e s/'[^ ]*clang_rt[^ ]*'//g -i.orig "$(PREFIX)/lib/pkgconfig/x265.pc"
touch $@
diff --git a/contrib/src/zvbi/rules.mak b/contrib/src/zvbi/rules.mak
index 3378618622..a9cf42674f 100644
--- a/contrib/src/zvbi/rules.mak
+++ b/contrib/src/zvbi/rules.mak
@@ -47,7 +47,7 @@ endif
$(UPDATE_AUTOCONFIG)
$(RECONF)
cd $< && $(HOSTVARS) CFLAGS="$(ZVBI_CFLAGS)" ./configure $(ZVBICONF)
- cd $</src && $(MAKE) install
+ cd $< && $(MAKE) -C src install
cd $< && $(MAKE) SUBDIRS=. install
sed -i.orig -e "s/\/[^ ]*libiconv.a/-liconv/" $(PREFIX)/lib/pkgconfig/zvbi-0.2.pc
touch $@
More information about the vlc-commits
mailing list