From a274bf458d8133d3c06b73fa3b6271ba5ae0acda Mon Sep 17 00:00:00 2001 From: Glenn Washburn Date: Wed, 12 Jan 2022 21:40:20 -0600 Subject: [PATCH] gentpl.py: Fix issue where sometimes marker files have CPP defines When generating video.lst, modules whose marker file contains the string VIDEO_LIST_MARKER are selected. But when the marker file contains the CPP defines, one of the defines is VIDEO_LIST_MARKER and is present in all marker files, so they are all selected. By removing the defines, the correct modules are selected. Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper --- gentpl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gentpl.py b/gentpl.py index c86550d4f..05ab13fa0 100644 --- a/gentpl.py +++ b/gentpl.py @@ -700,7 +700,7 @@ def module(defn, platform): output(""" """ + name + """.marker: $(""" + cname(defn) + """_SOURCES) $(nodist_""" + cname(defn) + """_SOURCES) $(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(""" + cname(defn) + """_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1) - grep 'MARKER' $@.new > $@; rm -f $@.new + grep 'MARKER' $@.new | grep -v '^#' > $@; rm -f $@.new """) def kernel(defn, platform): -- 2.47.2