forked from metamath/set.mm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjobs.makefile
35 lines (28 loc) · 868 Bytes
/
jobs.makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Makefile to minimize Metamath proofs. Requires GNU make.
# "work" is a space-separated list of simple numbers.
all: alljobs
@echo 'Completion time:'
@date
@echo
@echo 'DONE.'
.PHONY: all
MMFILE ?= set.mm
JOBSDIR ?= metamathjobs
DONE_LIST := \
$(foreach num, $(work), $(JOBSDIR)/job$(num).done)
$(JOBSDIR)/job%.done: $(JOBSDIR)/job%.cmd
@echo 'Running job $(*)'
@rm -f '$(JOBSDIR)/job$(*).log'
time metamath 'read $(MMFILE)' \
"open log '$(JOBSDIR)/job$(*).log'" \
"submit '$(JOBSDIR)/job$(*).cmd' /silent" quit 2>&1
@echo 'Completed job $(*)'
@touch '$(JOBSDIR)/job$(*).done'
alljobs: $(DONE_LIST)
.PHONY: alljobs
# Delete what we're creating on error.
# NOTE: We do *NOT* delete partial logs, since they are not make targets.
# Keeping logs around simplifies debugging.
.DELETE_ON_ERROR:
$(info Began running make on:)
$(info $(shell date))