Skip to content

Commit 56615ea

Browse files
committed
Avoid circular dependency (combine several .pm files)
1 parent 2116cb3 commit 56615ea

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

build/Makefile.in

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ GEN_SOURCES = \
106106
src/FileGlob/Actions.pir \
107107
src/FileGlob/Compiler.pir \
108108
src/FileGlob/Grammar.pir \
109-
src/Partcl/Actions.pir \
110-
src/Partcl/Compiler.pir \
111-
src/Partcl/Grammar.pir \
112109
src/Partcl/Operators.pir \
113110
src/Internals.pir \
114111
src/TclArray.pir \
@@ -122,20 +119,21 @@ all: $(PARTCL_EXE) .revision
122119

123120
src/Partcl.pir: $(GEN_SOURCES)
124121
src/Partcl/commands.pm: $(COMMANDS) $(HELPERS) src/init.pir src/TclList.pir \
125-
src/Partcl/Actions.pir src/Partcl/Compiler.pir
122+
src/Partcl/Actions.pm src/Partcl/Compiler.pm src/Partcl/Grammar.pm\
123+
src/Internals.pm
126124
echo "use src::init;" > src/Partcl/commands.pm
127125
echo "use src::TclList;" >> src/Partcl/commands.pm
128-
echo "use src::Partcl::Actions;" >> src/Partcl/commands.pm
129-
echo "use src::Partcl::Compiler;" >> src/Partcl/commands.pm
126+
cat src/Partcl/Grammar.pm >> src/Partcl/commands.pm
127+
cat src/Partcl/Actions.pm >> src/Partcl/commands.pm
128+
cat src/Partcl/Compiler.pm >> src/Partcl/commands.pm
130129
echo "class Builtins {" >> src/Partcl/commands.pm
131130
cat $(COMMANDS) >> src/Partcl/commands.pm
132131
echo "}" >> src/Partcl/commands.pm
132+
cat src/Internals.pm >> src/Partcl/commands.pm
133133
cat $(HELPERS) >> src/Partcl/commands.pm
134134

135-
src/Internals.pm: src/Partcl/commands.pir src/init.pm
136135
src/init.pm: src/TclLexPad.pir src/TclArray.pir
137136
src/FileGlob/Actions.pm: src/StringGlob/Actions.pir
138-
src/Partcl/Actions.pm: src/Internals.pir
139137
src/FileGlob/Grammar.pm: src/StringGlob/Grammar.pir
140138

141139
$(PARTCL_EXE) : partcl.pbc

src/Internals.pm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
use src::Partcl::commands;
2-
use src::init;
3-
41
class Internals {
52

63
## wrapper method for invoking tcl builtins - deals with unknown

src/Partcl.pm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
use NQPHLL;
22

33
use src::init;
4-
use src::Partcl::Grammar;
5-
use src::Partcl::Actions;
6-
use src::Partcl::Compiler;
4+
use src::Partcl::Commands;
75
use src::Partcl::Operators;
86
use src::TclArray;
97
use src::TclLexPad;

src/Partcl/Actions.pm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use src::Internals;
2-
31
class Partcl::Actions is HLL::Actions {
42
method TOP($/) {
53
make $<TOP_eval>.ast;

0 commit comments

Comments
 (0)