[vlc-devel] [PATCH] [RFC] contrib: using make -C should spread the threads from "make -j" properly
Steve Lhomme
robux4 at videolabs.io
Wed May 18 14:11:49 CEST 2016
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."
---
contrib/src/a52/rules.mak | 4 ++--
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 | 4 ++--
contrib/src/ncurses/rules.mak | 6 +++---
contrib/src/twolame/rules.mak | 2 +-
contrib/src/x265/rules.mak | 4 ++--
contrib/src/zvbi/rules.mak | 2 +-
11 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/contrib/src/a52/rules.mak b/contrib/src/a52/rules.mak
index dd4d7a3..e9d0242 100644
--- a/contrib/src/a52/rules.mak
+++ b/contrib/src/a52/rules.mak
@@ -25,6 +25,6 @@ endif
.a52: a52dec
$(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/faad2/rules.mak b/contrib/src/faad2/rules.mak
index 5bc68cb..bce5289 100644
--- a/contrib/src/faad2/rules.mak
+++ b/contrib/src/faad2/rules.mak
@@ -27,5 +27,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 8eeff31..3c41895 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 $< && $(HOSTVARS) CFLAGS="$(FLAC_CFLAGS)" ./configure $(FLACCONF)
- cd $</include && $(MAKE) install
- cd $</src && $(MAKE) -C share install && $(MAKE) -C libFLAC install
+ cd $< && $(MAKE) -C include install
+ cd $< && $(MAKE) -C src/share install && $(MAKE) -C src/libFLAC install
touch $@
diff --git a/contrib/src/fontconfig/rules.mak b/contrib/src/fontconfig/rules.mak
index 0430c8c..1168a8a 100644
--- a/contrib/src/fontconfig/rules.mak
+++ b/contrib/src/fontconfig/rules.mak
@@ -58,7 +58,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 c4a689c..3b94ef5 100644
--- a/contrib/src/gnutls/rules.mak
+++ b/contrib/src/gnutls/rules.mak
@@ -69,6 +69,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 fcaf421..cb97bcd 100644
--- a/contrib/src/libmpeg2/rules.mak
+++ b/contrib/src/libmpeg2/rules.mak
@@ -25,6 +25,6 @@ libmpeg2: libmpeg2-$(LIBMPEG2_VERSION).tar.gz .sum-libmpeg2
.libmpeg2: libmpeg2
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 037d680..962629e 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -76,7 +76,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)"
mkdir -p -- "$(PREFIX)/lib/pkgconfig"
@@ -85,7 +85,7 @@ ifdef HAVE_WIN32
cd $< && $(RANLIB) "$(PREFIX)/lib/liblua.a"
endif
ifdef HAVE_CROSS_COMPILE
- cd $</src && $(MAKE) clean && $(MAKE) liblua.a && ranlib liblua.a && $(MAKE) luac
+ cd $< && $(MAKE) -C src clean && $(MAKE) -C src liblua.a && ranlib liblua.a && $(MAKE) -C src luac
cp $</src/luac $(PREFIX)/bin
endif
touch $@
diff --git a/contrib/src/ncurses/rules.mak b/contrib/src/ncurses/rules.mak
index 92b3e77..a86f027 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/twolame/rules.mak b/contrib/src/twolame/rules.mak
index 5a85747..9ba78ee 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 aa8efeb..d2fe4e3 100644
--- a/contrib/src/x265/rules.mak
+++ b/contrib/src/x265/rules.mak
@@ -30,7 +30,7 @@ x265: x265-$(X265_VERSION).tar.bz2 .sum-x265
$(MOVE)
.x265: x265 toolchain.cmake
- cd $</source && $(HOSTVARS_PIC) $(CMAKE) -DENABLE_SHARED=OFF
- cd $</source && $(MAKE) install
+ cd $< && $(HOSTVARS_PIC) $(CMAKE) -C source -DENABLE_SHARED=OFF
+ 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 85a54ab..80e1938 100644
--- a/contrib/src/zvbi/rules.mak
+++ b/contrib/src/zvbi/rules.mak
@@ -46,7 +46,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 $@
--
2.8.1
More information about the vlc-devel
mailing list