diff options
author | William Deegan <bill@baddogconsulting.com> | 2022-07-20 15:47:00 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2022-07-20 15:47:00 (GMT) |
commit | baf96f12d0e4fa015fefc31c79ab71d33f898fcf (patch) | |
tree | 27736cf9a894eabecddfa29a34bf35a867491fc8 /SCons/Tool | |
parent | aa6fc2562fa47f6449f03b7b90218a375877e96d (diff) | |
download | SCons-baf96f12d0e4fa015fefc31c79ab71d33f898fcf.zip SCons-baf96f12d0e4fa015fefc31c79ab71d33f898fcf.tar.gz SCons-baf96f12d0e4fa015fefc31c79ab71d33f898fcf.tar.bz2 |
Move LEXHEADERFILE, LEXTABLEFILE, YACCHEADERFILE, YACCGRAPHFILE -> separated by underscores for readability
Diffstat (limited to 'SCons/Tool')
-rw-r--r-- | SCons/Tool/lex.py | 20 | ||||
-rw-r--r-- | SCons/Tool/lex.xml | 10 | ||||
-rw-r--r-- | SCons/Tool/yacc.py | 18 | ||||
-rw-r--r-- | SCons/Tool/yacc.xml | 10 |
4 files changed, 29 insertions, 29 deletions
diff --git a/SCons/Tool/lex.py b/SCons/Tool/lex.py index 55f7112..60ae4bd 100644 --- a/SCons/Tool/lex.py +++ b/SCons/Tool/lex.py @@ -80,17 +80,17 @@ def lexEmitter(target, source, env) -> tuple: file_name = option[l:].strip() target.append(file_name) - lexheaderfile = env.subst("$LEXHEADERFILE", target=target, source=source) + lexheaderfile = env.subst("$LEX_HEADER_FILE", target=target, source=source) if lexheaderfile: target.append(lexheaderfile) # rewrite user-supplied file string with a node, we need later - env.Replace(LEXHEADERFILE=env.File(lexheaderfile)) + env.Replace(LEX_HEADER_FILE=env.File(lexheaderfile)) - lextablesfile = env.subst("$LEXTABLESFILE", target=target, source=source) + lextablesfile = env.subst("$LEX_TABLE_FILE", target=target, source=source) if lextablesfile: target.append(lextablesfile) # rewrite user-supplied file string with a node, we need later - env.Replace(LEXTABLESFILE=env.File(lextablesfile)) + env.Replace(LEX_TABLE_FILE=env.File(lextablesfile)) return target, source @@ -148,18 +148,18 @@ def generate(env) -> None: env.SetDefault( LEX=env.Detect(BINS), LEXFLAGS=CLVar(""), - LEXHEADERFILE="", - LEXTABLESFILE="", + LEX_HEADER_FILE="", + LEX_TABLE_FILE="", ) if sys.platform == 'win32': env.SetDefault(LEXUNISTD=CLVar("")) - env["LEXCOM"] = "$LEX $LEXUNISTD $LEXFLAGS $_LEXHEADER $_LEXTABLES -t $SOURCES > $TARGET" + env["LEXCOM"] = "$LEX $LEXUNISTD $LEXFLAGS $_LEX_HEADER $_LEX_TABLES -t $SOURCES > $TARGET" else: - env["LEXCOM"] = "$LEX $LEXFLAGS $_LEXHEADER $_LEXTABLES -t $SOURCES > $TARGET" + env["LEXCOM"] = "$LEX $LEXFLAGS $_LEX_HEADER $_LEX_TABLES -t $SOURCES > $TARGET" - env['_LEXHEADER'] = '${LEXHEADERFILE and "--header-file=" + str(LEXHEADERFILE)}' - env['_LEXTABLES'] = '${LEXTABLESFILE and "--tables-file=" + str(LEXTABLESFILE)}' + env['_LEX_HEADER'] = '${LEX_HEADER_FILE and "--header-file=" + str(LEX_HEADER_FILE)}' + env['_LEX_TABLES'] = '${LEX_TABLE_FILE and "--tables-file=" + str(LEX_TABLE_FILE)}' def exists(env) -> Optional[str]: diff --git a/SCons/Tool/lex.xml b/SCons/Tool/lex.xml index 897eb49..e68a2bf 100644 --- a/SCons/Tool/lex.xml +++ b/SCons/Tool/lex.xml @@ -60,8 +60,8 @@ Sets construction variables for the &lex; lexical analyser. <uses> <item>LEXCOMSTR</item> <item>LEXFLAGS</item> -<item>LEXHEADERFILE</item> -<item>LEXTABLESFILE</item> +<item>LEX_HEADER_FILE</item> +<item>LEX_TABLE_FILE</item> </uses> </tool> @@ -113,12 +113,12 @@ the output file is named by the option argument. Note that files specified by <option>--header-file=</option> and <option>--tables-file=</option> may not be properly handled by &SCons; in all situations. Consider using -&cv-link-LEXHEADERFILE; and &cv-link-LEXTABLESFILE; instead. +&cv-link-LEX_HEADER_FILE; and &cv-link-LEX_TABLE_FILE; instead. </para> </summary> </cvar> -<cvar name="LEXHEADERFILE"> +<cvar name="LEX_HEADER_FILE"> <summary> <para> If supplied, generate a C header file with the name taken from this variable. @@ -129,7 +129,7 @@ command-line option. Use this in preference to including </summary> </cvar> -<cvar name="LEXTABLESFILE"> +<cvar name="LEX_TABLE_FILE"> <summary> <para> If supplied, write the lex tables to a file with the name diff --git a/SCons/Tool/yacc.py b/SCons/Tool/yacc.py index 4bc6415..42ef1db 100644 --- a/SCons/Tool/yacc.py +++ b/SCons/Tool/yacc.py @@ -98,17 +98,17 @@ def _yaccEmitter(target, source, env, ysuf, hsuf) -> tuple: fileName = option[l:].strip() target.append(fileName) - yaccheaderfile = env.subst("$YACCHEADERFILE", target=target, source=source) + yaccheaderfile = env.subst("$YACC_HEADER_FILE", target=target, source=source) if yaccheaderfile: target.append(yaccheaderfile) # rewrite user-supplied file string with a node, we need later - env.Replace(YACCHEADERFILE=env.File(yaccheaderfile)) + env.Replace(YACC_HEADER_FILE=env.File(yaccheaderfile)) - yaccgraphfile = env.subst("$YACCGRAPHFILE", target=target, source=source) + yaccgraphfile = env.subst("$YACC_GRAPH_FILE", target=target, source=source) if yaccgraphfile: target.append(yaccgraphfile) # rewrite user-supplied file string with a node, we need later - env.Replace(YACCGRAPHFILE=env.File(yaccgraphfile)) + env.Replace(YACC_GRAPH_FILE=env.File(yaccgraphfile)) return target, source @@ -178,16 +178,16 @@ def generate(env) -> None: env.SetDefault( YACC=env.Detect(BINS), YACCFLAGS=CLVar(""), - YACCHEADERFILE="", - YACCGRAPHSFILE="", + YACC_HEADER_FILE="", + YACC_GRAPH_FILE="", ) - env['YACCCOM'] = '$YACC $YACCFLAGS $_YACCHEADER $_YACCGRAPH -o $TARGET $SOURCES' + env['YACCCOM'] = '$YACC $YACCFLAGS $_YACC_HEADER $_YACC_GRAPH -o $TARGET $SOURCES' env['YACCHFILESUFFIX'] = '.h' env['YACCHXXFILESUFFIX'] = '.hpp' env['YACCVCGFILESUFFIX'] = '.vcg' - env['_YACCHEADER'] = '${YACCHEADERFILE and "--header=" + str(YACCHEADERFILE)}' - env['_YACCGRAPH'] = '${YACCGRAPHFILE and "--graph=" + str(YACCGRAPHFILE)}' + env['_YACC_HEADER'] = '${YACC_HEADER_FILE and "--header=" + str(YACC_HEADER_FILE)}' + env['_YACC_GRAPH'] = '${YACC_GRAPH_FILE and "--graph=" + str(YACC_GRAPH_FILE)}' def exists(env) -> Optional[str]: diff --git a/SCons/Tool/yacc.xml b/SCons/Tool/yacc.xml index f22c673..9ccc4e6 100644 --- a/SCons/Tool/yacc.xml +++ b/SCons/Tool/yacc.xml @@ -62,8 +62,8 @@ Sets construction variables for the &yacc; parse generator. <uses> <item>YACCCOMSTR</item> <item>YACCFLAGS</item> -<item>YACCHEADERFILE</item> -<item>YACCGRAPHFILE</item> +<item>YACC_HEADER_FILE</item> +<item>YACC_GRAPH_FILE</item> </uses> </tool> @@ -146,12 +146,12 @@ but the output filename is named by the option argument. Note that files specified by <option>--header=</option> and <option>--graph=</option> may not be properly handled by &SCons; in all situations. Consider using -&cv-link-YACCHEADERFILE; and &cv-link-YACCGRAPHFILE; instead. +&cv-link-YACC_HEADER_FILE; and &cv-link-YACC_GRAPH_FILE; instead. </para> </summary> </cvar> -<cvar name="YACCHEADERFILE"> +<cvar name="YACC_HEADER_FILE"> <summary> <para> If supplied, generate a header file with the name taken from this variable. @@ -162,7 +162,7 @@ command-line option. Use this in preference to including </summary> </cvar> -<cvar name="YACCGRAPHFILE"> +<cvar name="YACC_GRAPH_FILE"> <summary> <para> If supplied, write a graph of the automaton to a file with the name |