kumquat-buildroot/package/skeleton/skeleton.mk
Thomas Petazzoni 3ff90c8888 Makefile, skeleton: move the host skeleton logic to host-skeleton package
As part of the per-package SDK work, we want to avoid having logic
that installs files to the global HOST_DIR, and instead do it inside
packages. One thing that gets installed to the global HOST_DIR is the
minimal "skeleton" that we create in host:

 - the "usr" symbolic link for backward compatibility

 - the "lib" directory, and its lib64 or lib32 symbolic links

This commit moves this logic to a new host-skeleton package, and makes
all packages (except itself) depend on it.

While at it, use $(Q) instead of @ in the HOST_SKELETON_INSTALL_CMDS.

[Peter: drop host-patchelf reference in commit message]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-03-25 17:34:54 +02:00

27 lines
868 B
Makefile

################################################################################
#
# skeleton
#
################################################################################
# The skeleton can't depend on the toolchain, since all packages depends on the
# skeleton and the toolchain is a target package, as is skeleton.
# Hence, skeleton would depends on the toolchain and the toolchain would depend
# on skeleton.
SKELETON_ADD_TOOLCHAIN_DEPENDENCY = NO
SKELETON_ADD_SKELETON_DEPENDENCY = NO
# We create a compatibility symlink in case a post-build script still
# uses $(HOST_DIR)/usr
define HOST_SKELETON_INSTALL_CMDS
$(Q)ln -snf . $(HOST_DIR)/usr
$(Q)mkdir -p $(HOST_DIR)/lib
$(Q)case $(HOSTARCH) in \
(*64) ln -snf lib $(HOST_DIR)/lib64;; \
(*) ln -snf lib $(HOST_DIR)/lib32;; \
esac
endef
$(eval $(virtual-package))
$(eval $(host-generic-package))