diff options
author | Tony Theodore <tonyt@logyst.com> | 2016-07-16 06:52:56 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2016-07-16 06:53:58 (GMT) |
commit | bc5c058fe790d1d2a2e0ebb7494245a7196d0417 (patch) | |
tree | a5b84b13b72dd0649b3647ab3844e5a179fd2685 /plugins | |
parent | e9299c020403c851472bef7cb685a57f936a5fde (diff) | |
download | mxe-bc5c058fe790d1d2a2e0ebb7494245a7196d0417.zip mxe-bc5c058fe790d1d2a2e0ebb7494245a7196d0417.tar.gz mxe-bc5c058fe790d1d2a2e0ebb7494245a7196d0417.tar.bz2 |
host-toolchain plugin: use new BUILD_DIR, SOURCE_DIR, $(PKG)_PATCHES variables
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/examples/host-toolchain/cmake-host.mk | 7 | ||||
l--------- | plugins/examples/host-toolchain/gcc-host-1.patch | 1 | ||||
-rw-r--r-- | plugins/examples/host-toolchain/gcc-host.mk | 8 | ||||
-rw-r--r-- | plugins/examples/host-toolchain/pkgconf-host.mk | 8 | ||||
-rw-r--r-- | plugins/examples/host-toolchain/qt5-host-tools.mk | 47 |
5 files changed, 34 insertions, 37 deletions
diff --git a/plugins/examples/host-toolchain/cmake-host.mk b/plugins/examples/host-toolchain/cmake-host.mk index 80a6521..253dbc4 100644 --- a/plugins/examples/host-toolchain/cmake-host.mk +++ b/plugins/examples/host-toolchain/cmake-host.mk @@ -16,8 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - mkdir '$(1).build' - cd '$(1).build' && '$(TARGET)-cmake' '$(1)' - $(MAKE) -C '$(1).build' -j '$(JOBS)' - $(MAKE) -C '$(1).build' -j 1 install + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) VERBOSE=1 + $(MAKE) -C '$(BUILD_DIR)' -j 1 install endef diff --git a/plugins/examples/host-toolchain/gcc-host-1.patch b/plugins/examples/host-toolchain/gcc-host-1.patch deleted file mode 120000 index d63be56..0000000 --- a/plugins/examples/host-toolchain/gcc-host-1.patch +++ /dev/null @@ -1 +0,0 @@ -src/gcc-1.patch
\ No newline at end of file diff --git a/plugins/examples/host-toolchain/gcc-host.mk b/plugins/examples/host-toolchain/gcc-host.mk index 758f68d..d83adda 100644 --- a/plugins/examples/host-toolchain/gcc-host.mk +++ b/plugins/examples/host-toolchain/gcc-host.mk @@ -7,6 +7,7 @@ $(PKG)_VERSION = $(gcc_VERSION) $(PKG)_CHECKSUM = $(gcc_CHECKSUM) $(PKG)_SUBDIR = $(gcc_SUBDIR) $(PKG)_FILE = $(gcc_FILE) +$(PKG)_PATCHES = $(realpath $(sort $(wildcard $(addsuffix /gcc-[0-9]*.patch, $(TOP_DIR)/src)))) $(PKG)_URL = $(gcc_URL) $(PKG)_URL_2 = $(gcc_URL_2) $(PKG)_DEPS := gcc binutils-host cloog gmp isl mpfr mpc pthreads @@ -16,8 +17,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - mkdir '$(1).build' - cd '$(1).build' && '$(1)/configure' \ + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ --host='$(TARGET)' \ --target='$(TARGET)' \ --build='$(BUILD)' \ @@ -39,8 +39,8 @@ define $(PKG)_BUILD --with-{cloog,gmp,isl,mpc,mpfr}='$(PREFIX)/$(TARGET)' \ $($(PKG)_CONFIGURE_OPTS) - $(MAKE) -C '$(1).build' -j '$(JOBS)' - $(MAKE) -C '$(1).build' -j 1 install + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install # test compilation on host # strip and compare cross and host-built tests diff --git a/plugins/examples/host-toolchain/pkgconf-host.mk b/plugins/examples/host-toolchain/pkgconf-host.mk index c44230b..c971044 100644 --- a/plugins/examples/host-toolchain/pkgconf-host.mk +++ b/plugins/examples/host-toolchain/pkgconf-host.mk @@ -16,11 +16,11 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && ./autogen.sh - cd '$(1)' && ./configure \ + cd '$(SOURCE_DIR)' && ./autogen.sh + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ $(MXE_CONFIGURE_OPTS) - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install # create pkg-config script with relative paths (echo '#!/bin/sh'; \ diff --git a/plugins/examples/host-toolchain/qt5-host-tools.mk b/plugins/examples/host-toolchain/qt5-host-tools.mk index 5e13ee2..4904fef 100644 --- a/plugins/examples/host-toolchain/qt5-host-tools.mk +++ b/plugins/examples/host-toolchain/qt5-host-tools.mk @@ -13,38 +13,37 @@ $(PKG)_DEPS := gcc gcc-host make-w32-bin qtbase define $(PKG)_BUILD $(SED) -i 's,BUILD_ON_MAC=yes,BUILD_ON_MAC=no,g' '$(1)/configure' - mkdir '$(1).build' - cd '$(1).build' && '$(1)/configure' \ - -prefix '$(PREFIX)/$(TARGET)/qt5' \ - -static \ - -release \ - -c++std c++11 \ - -platform win32-g++ \ - -host-option CROSS_COMPILE=${TARGET}- \ - -external-hostbindir '$(PREFIX)/$(TARGET)/qt5/bin' \ - -device-option PKG_CONFIG='${TARGET}-pkg-config' \ - -device-option CROSS_COMPILE=${TARGET}- \ - -force-pkg-config \ - -no-icu \ - -no-sql-{db2,ibase,mysql,oci,odbc,psql,sqlite,sqlite2,tds} \ - -no-use-gold-linker \ - -nomake examples \ - -nomake tests \ - -opensource \ - -confirm-license \ - -continue \ - -verbose + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ + -prefix '$(PREFIX)/$(TARGET)/qt5' \ + -static \ + -release \ + -c++std c++11 \ + -platform win32-g++ \ + -host-option CROSS_COMPILE=${TARGET}- \ + -external-hostbindir '$(PREFIX)/$(TARGET)/qt5/bin' \ + -device-option PKG_CONFIG='$(TARGET)-pkg-config' \ + -device-option CROSS_COMPILE=$(TARGET)- \ + -force-pkg-config \ + -no-icu \ + -no-sql-{db2,ibase,mysql,oci,odbc,psql,sqlite,sqlite2,tds} \ + -no-use-gold-linker \ + -nomake examples \ + -nomake tests \ + -opensource \ + -confirm-license \ + -continue \ + -verbose # generate remaining build configuration (qmake is created by configure) - $(MAKE) -C '$(1).build' -j $(JOBS) \ + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) \ sub-src-qmake_all # build other tools - $(MAKE) -C '$(1).build/src' -j $(JOBS) \ + $(MAKE) -C '$(BUILD_DIR)/src' -j $(JOBS) \ sub-{moc,qdbuscpp2xml,qdbusxml2cpp,qlalr,rcc,uic}-all # install tools and create `qt.conf` for runtime config - cp '$(1).build/bin'/*.exe '$(PREFIX)/$(TARGET)/qt5/bin/' + cp '$(BUILD_DIR)/bin'/*.exe '$(PREFIX)/$(TARGET)/qt5/bin/' (printf '[Paths]\r\n'; \ printf 'Prefix = ..\r\n'; \ ) > '$(PREFIX)/$(TARGET)/qt5/bin/qt.conf' |