pkg-cmake: move configuration files out of $(HOST_DIR)/usr
authorArnout Vandecappelle <arnout@mind.be>
Tue, 4 Jul 2017 14:04:01 +0000 (16:04 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 5 Jul 2017 09:50:14 +0000 (11:50 +0200)
Move toolchainfile.cmake and Buildroot.cmake from
$(HOST_DIR)/usr/share/buildroot to $(HOST_DIR)/share/buildroot.

Build-tested with a bunch of cmake packages.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pkg-cmake.mk
support/misc/toolchainfile.cmake.in
toolchain/toolchain/toolchain.mk

index 0606d26ad7c2d68695b5b0a19c7340b563b99c16..1bb3652a13fc96009aeb495f34324aea1bd1d484 100644 (file)
@@ -86,7 +86,7 @@ define $(2)_CONFIGURE_CMDS
        rm -f CMakeCache.txt && \
        PATH=$$(BR_PATH) \
        $$($$(PKG)_CONF_ENV) $$(BR2_CMAKE) $$($$(PKG)_SRCDIR) \
-               -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
+               -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/share/buildroot/toolchainfile.cmake" \
                -DCMAKE_INSTALL_PREFIX="/usr" \
                -DCMAKE_COLOR_MAKEFILE=OFF \
                -DBUILD_DOC=OFF \
@@ -234,10 +234,10 @@ CMAKE_SYSTEM_PROCESSOR = $(BR2_ARCH)
 endif
 
 # In order to allow the toolchain to be relocated, we calculate the HOST_DIR
-# based on the toolchainfile.cmake file's location: $(HOST_DIR)/usr/share/buildroot
+# based on the toolchainfile.cmake file's location: $(HOST_DIR)/share/buildroot
 # In all the other variables, HOST_DIR will be replaced by RELOCATED_HOST_DIR,
 # so we have to strip "$(HOST_DIR)/" from the paths that contain it.
-$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
+$(HOST_DIR)/share/buildroot/toolchainfile.cmake:
        @mkdir -p $(@D)
        sed \
                -e 's#@@STAGING_SUBDIR@@#$(call qstrip,$(STAGING_SUBDIR))#' \
@@ -254,5 +254,5 @@ $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
                $(TOPDIR)/support/misc/toolchainfile.cmake.in \
                > $@
 
-$(HOST_DIR)/usr/share/buildroot/Platform/Buildroot.cmake:
+$(HOST_DIR)/share/buildroot/Platform/Buildroot.cmake:
        $(Q)$(INSTALL) -D -m 0644 support/misc/Buildroot.cmake $(@)
index c38800e598c6a979c6f6861a6d42db387ca736ed..c8c710bddd865749ecaa7e612790ad41b5199203 100644 (file)
@@ -4,11 +4,11 @@
 #
 
 # In order to allow the toolchain to be relocated, we calculate the
-# HOST_DIR based on this file's location: $(HOST_DIR)/usr/share/buildroot
+# HOST_DIR based on this file's location: $(HOST_DIR)/share/buildroot
 # and store it in RELOCATED_HOST_DIR.
 # All the other variables that need to refer to HOST_DIR will use the
 # RELOCATED_HOST_DIR variable.
-string(REPLACE "/usr/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST_DIR})
+string(REPLACE "/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST_DIR})
 
 # Point cmake to the location where we have our custom modules,
 # so that it can find our custom platform description.
index e15ceeb426faf99cb2baf9e7e6b41c172ee4e3e2..b55b0c712cb92ab575da705366c4bff52fc03408 100644 (file)
@@ -39,5 +39,5 @@ endif
 
 $(eval $(virtual-package))
 
-toolchain: $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake
-toolchain: $(HOST_DIR)/usr/share/buildroot/Platform/Buildroot.cmake
+toolchain: $(HOST_DIR)/share/buildroot/toolchainfile.cmake
+toolchain: $(HOST_DIR)/share/buildroot/Platform/Buildroot.cmake