From 6157bdbacfac38b27818b7b5b2c93348f12f7aa9 Mon Sep 17 00:00:00 2001 From: Anthony Islas Date: Tue, 12 Nov 2024 14:13:45 -0700 Subject: [PATCH] Remove leading -D from stanza fields with defines --- arch/configure_reader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/configure_reader.py b/arch/configure_reader.py index c52d776af7..f5e3efa153 100755 --- a/arch/configure_reader.py +++ b/arch/configure_reader.py @@ -19,6 +19,7 @@ referenceVar = re.compile( r"[$]([(])?(\w+)(?(1)[)])", re.I ) compileObject = re.compile( r"(\W|^)-c(\W|$)" ) configureRepl = re.compile( r"(\W|^)CONFIGURE_\w+(\W|$)" ) +defineRepl = re.compile( r"-D([^ ]+)" ) class Stanza(): @@ -164,6 +165,7 @@ def sanitize( self ) : for keyToSan in self.kvPairs_.keys() : self.kvPairs_[ keyToSan ] = configureRepl.sub( r"\1\2", self.kvPairs_[ keyToSan ] ).strip() self.kvPairs_[ keyToSan ] = compileObject.sub( r"\1\2", self.kvPairs_[ keyToSan ] ).strip() + self.kvPairs_[ keyToSan ] = defineRepl.sub( r"\1", self.kvPairs_[ keyToSan ] ).strip() # Now fix certain ones that are mixing programs with flags all mashed into one option