Commit 86cc5a15 authored by Steve Lhomme's avatar Steve Lhomme Committed by 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."
parent 674f4dac
......@@ -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 $@
......@@ -55,7 +55,7 @@ endif
.aom: aom toolchain.cmake
cd $< && mkdir -p aom_build
cd $</aom_build && LDFLAGS="$(AOM_LDFLAGS)" $(HOSTVARS) $(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 $@
......@@ -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 $@
......@@ -58,6 +58,6 @@ DEPS_flac = ogg $(DEPS_ogg)
.flac: flac
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 $@
......@@ -64,7 +64,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
......
......@@ -89,6 +89,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 $@
......@@ -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 $@
......@@ -74,7 +74,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
......
......@@ -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 $@
......@@ -61,11 +61,11 @@ endif
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
......@@ -79,7 +79,7 @@ endif
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; \
......
......@@ -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 \
......
......@@ -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 $@
......@@ -36,6 +36,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 $@
......@@ -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 $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment