summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2021-02-01 17:26:53 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2021-02-01 17:26:55 +0100
commit9a405e7fc2a1ec27db94c47fd6a6969c0dba0e6f (patch)
tree05e416834ca8e9886c861d0162b5e83fed5d2a17 /scripts
parentcfa277fdd1c547ae3ebff6cf78cbe5de4461cc1f (diff)
downloadptxdist-9a405e7fc2a1ec27db94c47fd6a6969c0dba0e6f.tar.gz
ptxdist-9a405e7fc2a1ec27db94c47fd6a6969c0dba0e6f.tar.xz
ptxd_lib_dgen: generate package variable with all existing patch directories
<PKG>_PATCH_DIR is the directory that contains the patches for the package. The new variable <PKG>_PATCH_DIRS contains all possible patch directories that exist. e.g. if the BSP overwrites the patches provided by PTXdist then this variable contains two paths. This will be used by the new 'lint' command. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_lib_dgen.awk9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index 0f85be426..b62e43f5c 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -409,13 +409,14 @@ function write_deps_pkg_active_cfghash(this_PKG, this_pkg) {
print "ifneq ($(" this_PKG "),)" > DGEN_DEPS_POST;
print "ifneq ($(" this_PKG "_PATCHES),)" > DGEN_DEPS_POST;
- print this_PKG "_PATCH_DIR := $(call ptx/in-path,PTXDIST_PATH_PATCHES,$(" this_PKG "_PATCHES))" > DGEN_DEPS_POST;
+ print this_PKG "_PATCH_DIRS := $(call ptx/in-path-all,PTXDIST_PATH_PATCHES,$(" this_PKG "_PATCHES))" > DGEN_DEPS_POST;
print "else" > DGEN_DEPS_POST;
- print this_PKG "_PATCH_DIR := $(call ptx/in-path,PTXDIST_PATH_PATCHES,$(" this_PKG "))" > DGEN_DEPS_POST;
+ print this_PKG "_PATCH_DIRS := $(call ptx/in-path-all,PTXDIST_PATH_PATCHES,$(" this_PKG "))" > DGEN_DEPS_POST;
print "endif" > DGEN_DEPS_POST;
- print "ifeq ($(" this_PKG "_PATCH_DIR),)" > DGEN_DEPS_POST;
- print "undefine " this_PKG "_PATCH_DIR" > DGEN_DEPS_POST;
+ print "ifeq ($(" this_PKG "_PATCH_DIRS),)" > DGEN_DEPS_POST;
+ print "undefine " this_PKG "_PATCH_DIRS" > DGEN_DEPS_POST;
print "else" > DGEN_DEPS_POST;
+ print this_PKG "_PATCH_DIR := $(firstword $(" this_PKG "_PATCH_DIRS))" > DGEN_DEPS_POST;
print "ifdef PTXDIST_SETUP_ONCE" > DGEN_DEPS_POST;
print "PTXDIST_HASHLIST_DATA += PATCHES: " this_PKG " $(" this_PKG "_PATCH_DIR)\\n" > DGEN_DEPS_POST;
print "endif" > DGEN_DEPS_POST;