grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] gentpl.py: Fix issue where sometimes marker files have CPP d


From: Glenn Washburn
Subject: [PATCH 1/2] gentpl.py: Fix issue where sometimes marker files have CPP defines
Date: Wed, 12 Jan 2022 21:40:20 -0600

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 <development@efficientek.com>
---
 gentpl.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gentpl.py b/gentpl.py
index 28ec24209..9f51e4fb6 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.27.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]