[OpenWrt-Devel,v2] build: have scripts/feeds honor all toplevel .mk-files of a feed
diff mbox series

Message ID 20190309140015.24122-1-devel-sven@geroedel.de
State New
Headers show
Series
  • [OpenWrt-Devel,v2] build: have scripts/feeds honor all toplevel .mk-files of a feed
Related show

Commit Message

Sven Roederer March 9, 2019, 2 p.m. UTC
The luci and freifunk feed having a common Makefile included by the
individual packages. Currently a change to this file will be ignored
when running "scripts/feeds update".
When we are updating for a feed, add a dependency for all .mk files
in the root of it.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
---
 include/scan.mk | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Sven Roederer July 1, 2019, 10:34 p.m. UTC | #1
Hi,

based on the recent commit of "scripts/feeds: add src-include method" 
I remembered in my patch I sent some time ago.
As Jo suggested it's now adding a dependency to all .mk files in a feeds
root-folder.

I assume it was just overseen or is there something bad? We use it for
some time for our freifunk-firmware already.

Sven

Am Samstag, 9. März 2019, 15:00:15 CEST schrieb Sven Roederer:
> The luci and freifunk feed having a common Makefile included by the
> individual packages. Currently a change to this file will be ignored
> when running "scripts/feeds update".
> When we are updating for a feed, add a dependency for all .mk files
> in the root of it.
> 
> Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
> ---
>  include/scan.mk | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/include/scan.mk b/include/scan.mk
> index d9cd4f7e8c..7df5dc6486 100644
> --- a/include/scan.mk
> +++ b/include/scan.mk
> @@ -12,10 +12,17 @@
> OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE)
> 
>  export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
> 
> +define feedname
> +$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
> +endef
> +
>  ifeq ($(SCAN_NAME),target)
>    SCAN_DEPS=image/Makefile profiles/*.mk $(TOPDIR)/include/kernel*.mk
> $(TOPDIR)/include/target.mk image/*.mk else
>    SCAN_DEPS=$(TOPDIR)/include/package*.mk
> +ifneq ($(call feedname,$(SCAN_DIR)),)
> +  SCAN_DEPS += $(TOPDIR)/feeds/$(call feedname,$(SCAN_DIR))/*.mk
> +endif
>  endif
> 
>  ifeq ($(IS_TTY),1)
> @@ -34,10 +41,6 @@ else
>    endef
>  endif
> 
> -define feedname
> -$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
> -endef
> -
>  define PackageDir
>    $(TMP_DIR)/.$(SCAN_TARGET): $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1)
>    $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1): $(SCAN_DIR)/$(2)/Makefile $(foreach
> DEP,$(DEPS_$(SCAN_DIR)/$(2)/Makefile) $(SCAN_DEPS),$(wildcard $(if $(filter
> /%,$(DEP)),$(DEP),$(SCAN_DIR)/$(2)/$(DEP))))

Patch
diff mbox series

diff --git a/include/scan.mk b/include/scan.mk
index d9cd4f7e8c..7df5dc6486 100644
--- a/include/scan.mk
+++ b/include/scan.mk
@@ -12,10 +12,17 @@  OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE)
 
 export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
 
+define feedname
+$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
+endef
+
 ifeq ($(SCAN_NAME),target)
   SCAN_DEPS=image/Makefile profiles/*.mk $(TOPDIR)/include/kernel*.mk $(TOPDIR)/include/target.mk image/*.mk
 else
   SCAN_DEPS=$(TOPDIR)/include/package*.mk
+ifneq ($(call feedname,$(SCAN_DIR)),)
+  SCAN_DEPS += $(TOPDIR)/feeds/$(call feedname,$(SCAN_DIR))/*.mk
+endif
 endif
 
 ifeq ($(IS_TTY),1)
@@ -34,10 +41,6 @@  else
   endef
 endif
 
-define feedname
-$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
-endef
-
 define PackageDir
   $(TMP_DIR)/.$(SCAN_TARGET): $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1)
   $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1): $(SCAN_DIR)/$(2)/Makefile $(foreach DEP,$(DEPS_$(SCAN_DIR)/$(2)/Makefile) $(SCAN_DEPS),$(wildcard $(if $(filter /%,$(DEP)),$(DEP),$(SCAN_DIR)/$(2)/$(DEP))))