1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
.POSIX: all: f() { \ n=$$(expr \( $$1 - 1 \| 2 \)); \ sed "/START PART $$n/,/END PART $$n/d" puzzles.go >tmp$$1.go; \ go build tmp$$1.go; \ mv tmp$$1 puzzle-$$1; \ rm -f tmp$$1; \ }; \ f 1; \ f 2; clean: rm -f puzzle-[12]