[v2,1/2] allow .smk files as includes in packages
diff mbox series

Message ID 20191109185512.24139-2-jeremy.rosen@smile.fr
State New
Headers show
Series
  • Include makefiles from GLOBAL_PATCH_DIR
Related show

Commit Message

Jérémy ROSEN Nov. 9, 2019, 6:55 p.m. UTC
Currently, when using the include directive in a package's .mk, buildroot
will create a new package. It is impossible to include a makefile for
the normal inclusion purpose

This is hardwired in many places, both in buildroot-core and in the way
makefiles are included in BR2_EXTERNAL. This can't be changed without
breaking external code

Instead, use a different extension for "normal" includes and filter them out
in pkgdir

Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
---
 package/pkg-utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 63b19e812b..ebab55a0fd 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -30,7 +30,7 @@  endef
 # directory from its makefile directory, using the $(MAKEFILE_LIST)
 # variable provided by make. This is used by the *-package macros to
 # automagically find where the package is located.
-pkgdir = $(dir $(lastword $(MAKEFILE_LIST)))
+pkgdir = $(dir $(lastword $(filter-out %.smk,$(MAKEFILE_LIST))))
 pkgname = $(lastword $(subst /, ,$(pkgdir)))
 
 # Define extractors for different archive suffixes