mirror of https://git.wownero.com/dsc/mxe.git
Merge pull request #348 from TimothyGu/parallel
Allow building packages for different targets simultaneously using multiple `make` instances
This commit is contained in:
commit
2d9725a083
4
Makefile
4
Makefile
|
@ -300,7 +300,7 @@ $(PREFIX)/$(3)/installed/$(1): $(TOP_DIR)/src/$(1).mk \
|
|||
@echo '[build] $(1)',
|
||||
@echo '[no-build] $(1)')
|
||||
@touch '$(LOG_DIR)/$(TIMESTAMP)/$(1)_$(3)'
|
||||
@[ $(words $(MXE_TARGETS)) == 1 ] || ln -sf '$(TIMESTAMP)/$(1)_$(3)' '$(LOG_DIR)/$(1)_$(3)'
|
||||
@ln -sf '$(TIMESTAMP)/$(1)_$(3)' '$(LOG_DIR)/$(1)_$(3)'
|
||||
@ln -sf '$(TIMESTAMP)/$(1)_$(3)' '$(LOG_DIR)/$(1)'
|
||||
@if ! (time $(MAKE) -f '$(MAKEFILE)' 'build-only-$(1)_$(3)') &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)_$(3)'; then \
|
||||
echo; \
|
||||
|
@ -349,7 +349,7 @@ endef
|
|||
$(foreach TARGET,$(MXE_TARGETS), \
|
||||
$(shell [ -d '$(PREFIX)/$(TARGET)/installed' ] || mkdir -p '$(PREFIX)/$(TARGET)/installed') \
|
||||
$(foreach PKG,$(PKGS), \
|
||||
$(eval $(call PKG_RULE,$(PKG),$(call TMP_DIR,$(PKG)),$(TARGET)))))
|
||||
$(eval $(call PKG_RULE,$(PKG),$(call TMP_DIR,$(PKG)-$(TARGET)),$(TARGET)))))
|
||||
|
||||
# convenience set-like functions for unique lists
|
||||
SET_APPEND = \
|
||||
|
|
|
@ -17,15 +17,19 @@ define $(PKG)_UPDATE
|
|||
endef
|
||||
|
||||
define $(PKG)_BUILD
|
||||
cd '$(1)' && autoconf
|
||||
$(SED) -i 's,yasm_prog="yasm",yasm_prog="$(TARGET)-yasm",' '$(1)/configure.in'
|
||||
cd '$(1)' && autoreconf -fi
|
||||
cd '$(1)' && ./configure \
|
||||
$(MXE_CONFIGURE_OPTS)
|
||||
$(MAKE) -C '$(1)' -j 1 BUILD_DIR='build' $(if $(BUILD_STATIC),SHARED,STATIC)_LIB=
|
||||
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
|
||||
$(INSTALL) -m644 '$(1)/../../src/xvid.h' '$(PREFIX)/$(TARGET)/include/'
|
||||
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
|
||||
$(INSTALL) -m644 '$(1)/build/xvidcore.$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/lib/'
|
||||
ln -sf '$(PREFIX)/$(TARGET)/lib/xvidcore.$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/lib/libxvidcore.$(LIB_SUFFIX)'
|
||||
$(INSTALL) -m644 '$(1)/build/xvidcore.$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/bin/'
|
||||
$(if $(BUILD_STATIC), \
|
||||
ln -sf '$(PREFIX)/$(TARGET)/lib/xvidcore.$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/lib/libxvidcore.$(LIB_SUFFIX)', \
|
||||
mv '$(1)/build/xvidcore.dll.a' '$(1)/build/libxvidcore.dll.a' && \
|
||||
$(INSTALL) -m644 '$(1)/build/libxvidcore.dll.a' '$(PREFIX)/$(TARGET)/lib/')
|
||||
endef
|
||||
|
||||
define $(PKG)_BUILD_x86_64-w64-mingw32
|
||||
|
|
Loading…
Reference in New Issue