djfz-2020-s450026/Makefile

36 lines
655 B
Makefile
Raw Normal View History

2020-10-10 21:20:34 +02:00
# gathering solved tasks
solutions:=$(shell ls Task???/Makefile)
reports:=$(solutions:Makefile=report.txt)
all: summary.txt
.PRECIOUS: %.out %.res
.SECONDEXPANSION:
summary.txt: $(reports)
perl count-points.pl $^ | tee $@
%/report.txt: $$(subst .in,.res,$$(wildcard %/*.in))
echo CREATING REPORT FOR $@
perl create-report.pl $^ > $@
%.res: %.out %.exp
(diff $^ > $@ || exit 0)
%.out: $$(@D)/run %.in
chmod u+x $<
$< $*.arg < $(word 2,$^) > $@
clean:
rm -f $(BINARIES)
rm -f summary.txt
find . -name '*.out' -exec rm '{}' ';'
find . -name '*.res' -exec rm '{}' ';'
find . -name 'report.txt' -exec rm '{}' ';'
-include Task*/Makefile