aboutsummaryrefslogtreecommitdiff
path: root/Makefiles/go.mk
blob: a0c7c23e2cd2bf0c50e17f3d3d4542faa3538272 (plain) (blame)
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]