Castle: The best Real-Time/Embedded/HighTech language EVER. Attempt 2
Revision | f4b9258a0b7cdc367524eecdcd4c8070b0131dc1 (tree) |
---|---|
Time | 2022-01-24 04:31:18 |
Author | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
Saved old Makefiles into Mk/
@@ -1,25 +0,0 @@ | ||
1 | -default: test | |
2 | - | |
3 | -all: test demos | |
4 | - | |
5 | -test: | |
6 | - (cd pytst/; pytest) | |
7 | -test-s: | |
8 | - (cd pytst/; pytest -s) | |
9 | - | |
10 | -DEMOS:=$(wildcard demo/*demo*.py) | |
11 | -demos: | |
12 | - for d in ${DEMOS}; do echo "*** $$d ***"; python $$d; done | |
13 | - | |
14 | -clean: | |
15 | - rm -rf {.,castle}/{__pycache__,.pytest_cache}/ | |
16 | - rm -rf pytst/{.,*}/{__pycache__,.pytest_cache}/ | |
17 | - rm -f *.dot | |
18 | - rm -f pytst/*.dot | |
19 | - | |
20 | -PYREVERSE_FORMAT=svg | |
21 | -PYREVERSEd=./pyreversed/ | |
22 | - | |
23 | -pyreverse : ${PYREVERSEd} | |
24 | - pyreverse -d ${PYREVERSEd} -o ${PYREVERSE_FORMAT} -fALL -A -my -p TryOut.AST.Caste castle | |
25 | - |
@@ -1,25 +0,0 @@ | ||
1 | -default: demos | |
2 | - | |
3 | -all: demos test | |
4 | - | |
5 | -test: | |
6 | - (cd pytst/; pytest) | |
7 | -test-s: | |
8 | - (cd pytst/; pytest -s) | |
9 | - | |
10 | -DEMOS:=$(wildcard demo/*demo*.py) | |
11 | -demos: | |
12 | - for d in ${DEMOS}; do echo "*** $$d ***"; python $$d; done | |
13 | - | |
14 | -clean: | |
15 | - rm -rf {.,castle}/{__pycache__,.pytest_cache}/ | |
16 | - rm -rf pytst/{.,*}/{__pycache__,.pytest_cache}/ | |
17 | - rm -f *.dot | |
18 | - rm -f pytst/*.dot | |
19 | - | |
20 | -PYREVERSE_FORMAT=svg | |
21 | -PYREVERSEd=./pyreversed/ | |
22 | - | |
23 | -pyreverse : ##${PYREVERSEd} | |
24 | - #pyreverse -d ${PYREVERSEd} -o ${PYREVERSE_FORMAT} -fALL -A -my -p TryOut.Jinja ... | |
25 | - @echo nothing yet |
@@ -1,6 +0,0 @@ | ||
1 | -default: all | |
2 | - | |
3 | - | |
4 | -SUBS = Arpeggio AST Jinja | |
5 | - | |
6 | -include ./recursive.mk |
@@ -0,0 +1,25 @@ | ||
1 | +default: test | |
2 | + | |
3 | +all: test demos | |
4 | + | |
5 | +test: | |
6 | + (cd pytst/; pytest) | |
7 | +test-s: | |
8 | + (cd pytst/; pytest -s) | |
9 | + | |
10 | +DEMOS:=$(wildcard demo/*demo*.py) | |
11 | +demos: | |
12 | + for d in ${DEMOS}; do echo "*** $$d ***"; python $$d; done | |
13 | + | |
14 | +clean: | |
15 | + rm -rf {.,castle}/{__pycache__,.pytest_cache}/ | |
16 | + rm -rf pytst/{.,*}/{__pycache__,.pytest_cache}/ | |
17 | + rm -f *.dot | |
18 | + rm -f pytst/*.dot | |
19 | + | |
20 | +PYREVERSE_FORMAT=svg | |
21 | +PYREVERSEd=./pyreversed/ | |
22 | + | |
23 | +pyreverse : ${PYREVERSEd} | |
24 | + pyreverse -d ${PYREVERSEd} -o ${PYREVERSE_FORMAT} -fALL -A -my -p TryOut.AST.Caste castle | |
25 | + |
@@ -0,0 +1,25 @@ | ||
1 | +default: demos | |
2 | + | |
3 | +all: demos test | |
4 | + | |
5 | +test: | |
6 | + (cd pytst/; pytest) | |
7 | +test-s: | |
8 | + (cd pytst/; pytest -s) | |
9 | + | |
10 | +DEMOS:=$(wildcard demo/*demo*.py) | |
11 | +demos: | |
12 | + for d in ${DEMOS}; do echo "*** $$d ***"; python $$d; done | |
13 | + | |
14 | +clean: | |
15 | + rm -rf {.,castle}/{__pycache__,.pytest_cache}/ | |
16 | + rm -rf pytst/{.,*}/{__pycache__,.pytest_cache}/ | |
17 | + rm -f *.dot | |
18 | + rm -f pytst/*.dot | |
19 | + | |
20 | +PYREVERSE_FORMAT=svg | |
21 | +PYREVERSEd=./pyreversed/ | |
22 | + | |
23 | +pyreverse : ##${PYREVERSEd} | |
24 | + #pyreverse -d ${PYREVERSEd} -o ${PYREVERSE_FORMAT} -fALL -A -my -p TryOut.Jinja ... | |
25 | + @echo nothing yet |
@@ -0,0 +1,6 @@ | ||
1 | +default: all | |
2 | + | |
3 | + | |
4 | +SUBS = Arpeggio AST Jinja | |
5 | + | |
6 | +include ./recursive.mk |
@@ -0,0 +1,34 @@ | ||
1 | +default: all | |
2 | + | |
3 | +all: test missing_visitors | |
4 | + | |
5 | +test: | |
6 | + (cd pytst/; pytest) | |
7 | +test-s: | |
8 | + (cd pytst/; pytest -s) | |
9 | + | |
10 | +DEMOS:=$(wildcard demo/*demo*.py) | |
11 | +demos: | |
12 | + for d in ${DEMOS}; do echo "*** $$d ***"; python $$d; done | |
13 | + | |
14 | +clean: | |
15 | + rm -rf {.,castle}/{__pycache__,.pytest_cache}/ | |
16 | + rm -rf pytst/{.,*}/{__pycache__,.pytest_cache}/ | |
17 | + rm -f *.dot | |
18 | + rm -f pytst/*.dot | |
19 | + | |
20 | +GRAMMAR_RULES := $(shell grep '^ *def ' ./grammar.py | awk '{print $$2}' | sed 's/()://') | |
21 | + | |
22 | +missing_visitors: | |
23 | + @for R in ${GRAMMAR_RULES}; do \ | |
24 | + if ! grep -q -E "^ *((def)|(# *NO_VISITOR_NEEDED:)) *visit_$$R" ./visitor.py> /dev/null ; then\ | |
25 | + echo "Warning: $${R} has no visitor (nor is marked as to need none)" ;\ | |
26 | + fi ;\ | |
27 | + done | |
28 | + | |
29 | +PYREVERSE_FORMAT=svg | |
30 | +PYREVERSEd=./pyreversed/ | |
31 | + | |
32 | +pyreverse : ${PYREVERSEd} | |
33 | + pyreverse -d ${PYREVERSEd} -o ${PYREVERSE_FORMAT} -fALL -A -my -p TryOut.Arpeggio grammar.py visitor.py | |
34 | + |
@@ -0,0 +1,26 @@ | ||
1 | +# Makefile -- GNU syntax (C) 2000-2016 reuse freely -- http://ALbert.mietus.nl | |
2 | + | |
3 | +### | |
4 | +### recursive:: Generic macro to run sub-makes, in each dir in SUBS | |
5 | +### | |
6 | + | |
7 | +# all possible recursive targets .. | |
8 | +RECURSIVE = clean all test docs cleaner cleanest demos pyreverse | |
9 | +RECURSIVE_TARGETS = $(foreach dir,$(SUBS),$(foreach target,$(RECURSIVE),$(dir)/$(target))) | |
10 | + | |
11 | +.PHONY: ${RECURSIVE} ${SUBS} ${RECURSIVE_TARGETS} | |
12 | + | |
13 | +$(RECURSIVE): % : $(foreach dir,$(SUBS),$(dir)/%) | |
14 | +$(SUBS) : % : %/all | |
15 | + | |
16 | +${RECURSIVE_TARGETS}: | |
17 | + $(MAKE) -C $(dir $@) $(notdir $@) | |
18 | + | |
19 | +# re-test: clean first, then test | |
20 | +retest : clean test | |
21 | +veryclean: cleanest | |
22 | + | |
23 | +help-local:: | |
24 | + @echo RECURSIVE: ${RECURSIVE} | |
25 | + @echo SUBS: ${SUBS} | |
26 | + @echo RECURSIVE_TARGETS: ${RECURSIVE_TARGETS} |
@@ -5,7 +5,8 @@ | ||
5 | 5 | |
6 | 6 | .. todo:: Makefiles |
7 | 7 | |
8 | - There are still some Makefiles (and *.mk) that contain usefull stuff -- BUT OLD | |
8 | + * There are still some Makefiles (and *.mk) that contain usefull stuff -- BUT OLD | |
9 | + * They are now moved/saves into the .../Mk/-dir | |
9 | 10 | |
10 | 11 | .. todo:: Jinja/ |
11 | 12 |
@@ -1,34 +0,0 @@ | ||
1 | -default: all | |
2 | - | |
3 | -all: test missing_visitors | |
4 | - | |
5 | -test: | |
6 | - (cd pytst/; pytest) | |
7 | -test-s: | |
8 | - (cd pytst/; pytest -s) | |
9 | - | |
10 | -DEMOS:=$(wildcard demo/*demo*.py) | |
11 | -demos: | |
12 | - for d in ${DEMOS}; do echo "*** $$d ***"; python $$d; done | |
13 | - | |
14 | -clean: | |
15 | - rm -rf {.,castle}/{__pycache__,.pytest_cache}/ | |
16 | - rm -rf pytst/{.,*}/{__pycache__,.pytest_cache}/ | |
17 | - rm -f *.dot | |
18 | - rm -f pytst/*.dot | |
19 | - | |
20 | -GRAMMAR_RULES := $(shell grep '^ *def ' ./grammar.py | awk '{print $$2}' | sed 's/()://') | |
21 | - | |
22 | -missing_visitors: | |
23 | - @for R in ${GRAMMAR_RULES}; do \ | |
24 | - if ! grep -q -E "^ *((def)|(# *NO_VISITOR_NEEDED:)) *visit_$$R" ./visitor.py> /dev/null ; then\ | |
25 | - echo "Warning: $${R} has no visitor (nor is marked as to need none)" ;\ | |
26 | - fi ;\ | |
27 | - done | |
28 | - | |
29 | -PYREVERSE_FORMAT=svg | |
30 | -PYREVERSEd=./pyreversed/ | |
31 | - | |
32 | -pyreverse : ${PYREVERSEd} | |
33 | - pyreverse -d ${PYREVERSEd} -o ${PYREVERSE_FORMAT} -fALL -A -my -p TryOut.Arpeggio grammar.py visitor.py | |
34 | - |
@@ -1,26 +0,0 @@ | ||
1 | -# Makefile -- GNU syntax (C) 2000-2016 reuse freely -- http://ALbert.mietus.nl | |
2 | - | |
3 | -### | |
4 | -### recursive:: Generic macro to run sub-makes, in each dir in SUBS | |
5 | -### | |
6 | - | |
7 | -# all possible recursive targets .. | |
8 | -RECURSIVE = clean all test docs cleaner cleanest demos pyreverse | |
9 | -RECURSIVE_TARGETS = $(foreach dir,$(SUBS),$(foreach target,$(RECURSIVE),$(dir)/$(target))) | |
10 | - | |
11 | -.PHONY: ${RECURSIVE} ${SUBS} ${RECURSIVE_TARGETS} | |
12 | - | |
13 | -$(RECURSIVE): % : $(foreach dir,$(SUBS),$(dir)/%) | |
14 | -$(SUBS) : % : %/all | |
15 | - | |
16 | -${RECURSIVE_TARGETS}: | |
17 | - $(MAKE) -C $(dir $@) $(notdir $@) | |
18 | - | |
19 | -# re-test: clean first, then test | |
20 | -retest : clean test | |
21 | -veryclean: cleanest | |
22 | - | |
23 | -help-local:: | |
24 | - @echo RECURSIVE: ${RECURSIVE} | |
25 | - @echo SUBS: ${SUBS} | |
26 | - @echo RECURSIVE_TARGETS: ${RECURSIVE_TARGETS} |