Makefile: move cmake toolchain file to $HOST_DIR/usr/share/buildroot
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 25 Feb 2012 22:18:03 +0000 (23:18 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 25 Feb 2012 22:18:03 +0000 (23:18 +0100)
To make it part of the SDK installation.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Makefile
package/Makefile.cmake.in

index d5cd8f03d73c1183b00e640ed0d8d08564b50132..9a07f9f79859d4ed4e51604fbacc06c40ed9aac9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -368,7 +368,7 @@ $(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
 dirs: $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
        $(HOST_DIR) $(BINARIES_DIR) $(STAMP_DIR)
 
-$(BASE_TARGETS): dirs $(O)/toolchainfile.cmake
+$(BASE_TARGETS): dirs $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake
 
 $(BUILD_DIR)/buildroot-config/auto.conf: $(CONFIG_DIR)/.config
        $(MAKE) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
@@ -377,7 +377,8 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf
 
 world: prepare dirs dependencies $(BASE_TARGETS) $(TARGETS_ALL)
 
-$(O)/toolchainfile.cmake:
+$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
+       mkdir -p $(@D)
        @echo -en "\
        set(CMAKE_SYSTEM_NAME Linux)\n\
        set(CMAKE_C_COMPILER $(TARGET_CC_NOCCACHE))\n\
index 38e459b80cdae79b4641a80c3ca316e6b705f508..aea1185196852319ba1ec5b42f056156e63a22dc 100644 (file)
@@ -72,7 +72,7 @@ define $(2)_CONFIGURE_CMDS
        (cd $$($$(PKG)_BUILDDIR) && \
        rm -f CMakeCache.txt && \
        $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
-               -DCMAKE_TOOLCHAIN_FILE="$$(BASE_DIR)/toolchainfile.cmake" \
+               -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
                -DCMAKE_INSTALL_PREFIX="/usr" \
                $$($$(PKG)_CONF_OPT) \
        )