mid-kid
1 year ago
5 changed files with 40 additions and 0 deletions
@ -0,0 +1,32 @@ |
|||
progs_sh := d01 |
|||
progs_py := d02 d04 |
|||
progs_go := d05 |
|||
|
|||
progs := $(progs_sh) $(progs_py) $(progs_go) |
|||
|
|||
.PHONY: all |
|||
all: $(addsuffix _ok.txt,$(progs)) |
|||
|
|||
.PHONY: clean |
|||
clean: |
|||
rm -f $(addsuffix _out.txt,$(progs)) $(progs_go) |
|||
|
|||
.PHONY: ok-% |
|||
ok-%: %_out.txt |
|||
@cp -v $< $*_ok.txt |
|||
|
|||
%_ok.txt: %_out.txt |
|||
@test -f $@ || (echo $*:; cat $<) |
|||
@test -f $@ && (diff -u $@ $< && touch $@) || exit 0 |
|||
|
|||
$(addsuffix _out.txt,$(progs_sh)): %_out.txt: %.sh |
|||
./$< $*_input.txt > $@ |
|||
|
|||
$(addsuffix _out.txt,$(progs_py)): %_out.txt: %.py |
|||
./$< $*_input.txt > $@ |
|||
|
|||
$(addsuffix _out.txt,$(progs_go)): %_out.txt: % |
|||
./$< $*_input.txt > $@ |
|||
|
|||
$(progs_go): %: %.go |
|||
go build -o $@ $< |
@ -0,0 +1,2 @@ |
|||
56397 |
|||
55701 |
@ -0,0 +1,2 @@ |
|||
2169 |
|||
60948 |
@ -0,0 +1,2 @@ |
|||
26346 |
|||
8467762 |
@ -0,0 +1,2 @@ |
|||
579439039 |
|||
7873084 |
Loading…
Reference in new issue