Commit 6eb58500 by Miodrag Milanovic

Make multiple make tasks at once possible

parent 6d110b70
PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi) PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
all:: all:
run-test.mk: ../generate.py run-test.mk: ../generate.py
@$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk @$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk
......
PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi) PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
all:: all:
run-test.mk: ../generate.py run-test.mk: ../generate.py
@$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk @$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk
......
define template define template
$(foreach design,$(1), $(foreach design,$(1),
all:: $(design)/work_sim/.stamp all: $(design)/work_sim/.stamp
$(design)/work_sim/.stamp: $(design)/work_sim/.stamp:
@echo 'Running $(design)/sim..' @echo 'Running $(design)/sim..'
@bash run.sh $(design) sim @bash run.sh $(design) sim
clean:: clean:
@echo 'Cleaning $(design)/sim..' @echo 'Cleaning $(design)/sim..'
@rm -rf $(design)/work_sim @rm -rf $(design)/work_sim
all:: $(design)/work_falsify/.stamp all: $(design)/work_falsify/.stamp
$(design)/work_falsify/.stamp: $(design)/work_falsify/.stamp:
@echo 'Running $(design)/falsify..' @echo 'Running $(design)/falsify..'
@bash run.sh $(design) falsify @bash run.sh $(design) falsify
clean:: clean:
@echo 'Cleaning $(design)/falsify..' @echo 'Cleaning $(design)/falsify..'
@rm -rf $(design)/work_falsify @rm -rf $(design)/work_falsify
$(foreach script,$(2), $(foreach script,$(2),
all:: $(design)/work_$(script)/.stamp all: $(design)/work_$(script)/.stamp
$(design)/work_$(script)/.stamp: $(design)/work_sim/.stamp $(design)/work_$(script)/.stamp: $(design)/work_sim/.stamp
@echo 'Running $(design)/$(script)..' @echo 'Running $(design)/$(script)..'
@bash run.sh $(design) $(script) @bash run.sh $(design) $(script)
clean:: clean:
@echo 'Cleaning $(design)/$(script)..' @echo 'Cleaning $(design)/$(script)..'
@rm -rf $(design)/work_$(script) @rm -rf $(design)/work_$(script)
)) ))
......
PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi) PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
all:: all:
run-test.mk: ../generate.py run-test.mk: ../generate.py
@$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk @$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk
......
PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi) PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
all:: all:
run-test.mk: ../generate.py run-test.mk: ../generate.py
@$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk @$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk
......
...@@ -7,7 +7,7 @@ for root, dirs, files in sorted(os.walk(".")): ...@@ -7,7 +7,7 @@ for root, dirs, files in sorted(os.walk(".")):
work = os.path.splitext(file)[0] work = os.path.splitext(file)[0]
heavy = os.path.exists(os.path.join(dir, "heavy_test")) heavy = os.path.exists(os.path.join(dir, "heavy_test"))
is_disabled = os.path.exists(os.path.join(dir, work + ".disable")) is_disabled = os.path.exists(os.path.join(dir, work + ".disable"))
print("all:: {0}/work_{1}/.stamp\n" print("all: {0}/work_{1}/.stamp\n"
"{0}/work_{1}/.stamp:".format(dir, work)) "{0}/work_{1}/.stamp:".format(dir, work))
if (is_disabled): if (is_disabled):
print("\t@echo 'Skipping disabled test {0}..'".format(dir, work)) print("\t@echo 'Skipping disabled test {0}..'".format(dir, work))
...@@ -17,7 +17,7 @@ for root, dirs, files in sorted(os.walk(".")): ...@@ -17,7 +17,7 @@ for root, dirs, files in sorted(os.walk(".")):
continue continue
print("\t@echo 'Running {2}{1}..'\n" print("\t@echo 'Running {2}{1}..'\n"
"\t@../run.sh {0} {1}\n" "\t@../run.sh {0} {1}\n"
"clean::\n" "clean:\n"
"\t@echo 'Cleaning {1}..'\n" "\t@echo 'Cleaning {1}..'\n"
"\t@rm -rf {0}/work_{1}".format(dir, work, "heavy " if heavy else "")) "\t@rm -rf {0}/work_{1}".format(dir, work, "heavy " if heavy else ""))
print(".PHONY: all clean") print(".PHONY: all clean")
\ No newline at end of file
PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi) PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
all:: all:
run-test.mk: ../generate.py run-test.mk: ../generate.py
@$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk @$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk
......
PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi) PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
all:: all:
run-test.mk: ../generate.py run-test.mk: ../generate.py
@$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk @$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk
......
PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi) PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
all:: all:
run-test.mk: ../generate.py run-test.mk: ../generate.py
@$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk @$(PYTHON_EXECUTABLE) ../generate.py > run-test.mk
......
PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi) PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
all:: all:
run-test.mk: ./generate.py run-test.mk: ./generate.py
@$(PYTHON_EXECUTABLE) ./generate.py > run-test.mk @$(PYTHON_EXECUTABLE) ./generate.py > run-test.mk
......
...@@ -7,7 +7,7 @@ for root, dirs, files in sorted(os.walk(".")): ...@@ -7,7 +7,7 @@ for root, dirs, files in sorted(os.walk(".")):
work = os.path.splitext(file)[0] work = os.path.splitext(file)[0]
heavy = os.path.exists(os.path.join(dir, "heavy_test")) heavy = os.path.exists(os.path.join(dir, "heavy_test"))
is_disabled = os.path.exists(os.path.join(dir, work + ".disable")) is_disabled = os.path.exists(os.path.join(dir, work + ".disable"))
print("all:: {0}/work_{1}/.stamp\n" print("all: {0}/work_{1}/.stamp\n"
"{0}/work_{1}/.stamp:".format(dir, work)) "{0}/work_{1}/.stamp:".format(dir, work))
if (is_disabled): if (is_disabled):
print("\t@echo 'Skipping disabled test {0}..'".format(dir, work)) print("\t@echo 'Skipping disabled test {0}..'".format(dir, work))
...@@ -17,7 +17,7 @@ for root, dirs, files in sorted(os.walk(".")): ...@@ -17,7 +17,7 @@ for root, dirs, files in sorted(os.walk(".")):
continue continue
print("\t@echo 'Running {2}{1}..'\n" print("\t@echo 'Running {2}{1}..'\n"
"\t@../run.sh {0} {1}\n" "\t@../run.sh {0} {1}\n"
"clean::\n" "clean:\n"
"\t@echo 'Cleaning {1}..'\n" "\t@echo 'Cleaning {1}..'\n"
"\t@rm -rf {0}/work_{1}".format(dir, work, "heavy " if heavy else "")) "\t@rm -rf {0}/work_{1}".format(dir, work, "heavy " if heavy else ""))
print(".PHONY: all clean") print(".PHONY: all clean")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment