From: Glenn Washburn Date: Thu, 13 Jan 2022 03:40:20 +0000 (-0600) Subject: gentpl.py: Fix issue where sometimes marker files have CPP defines X-Git-Tag: grub-2.12-rc1~495 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a274bf458d8133d3c06b73fa3b6271ba5ae0acda;p=thirdparty%2Fgrub.git 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 --- 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):