Revision 25964,
1.2 KB
checked in by jdreed, 11 years ago
(diff) |
- Don't hardcode suite and psuite, require specifying them at build time
|
Line | |
---|
1 | ifndef suite |
---|
2 | $(error FATAL: 'suite' is not set (e.g. make suite=foo [psuite=bar] target)) |
---|
3 | endif |
---|
4 | ifndef psuite |
---|
5 | $(warning WARNING: 'psuite' is not defined. Assuming a rebuild (psuite=$(suite))) |
---|
6 | psuite:= $(suite) |
---|
7 | endif |
---|
8 | |
---|
9 | STAMPS := /afs/sipb.mit.edu/project/debathena/machines/awesome-build-server/stamps.$(suite) |
---|
10 | |
---|
11 | package = $(STAMPS)/$(1).done |
---|
12 | |
---|
13 | all: build-all |
---|
14 | |
---|
15 | deps.mk: gen-build-deps |
---|
16 | ./gen-build-deps $(psuite) > $@ |
---|
17 | include deps.mk |
---|
18 | |
---|
19 | build/%: $(call package,%) |
---|
20 | : |
---|
21 | |
---|
22 | $(call package,%): |
---|
23 | @echo "Starting build of $*" |
---|
24 | @if [ -e $(STAMPS)/$*.started ]; then echo "Error, remove 'started' stamp and try again."; false; fi |
---|
25 | @rm -f $(STAMPS)/$*.error |
---|
26 | @file=$$(mktemp -t 'stupid.XXXXXX') && \ |
---|
27 | echo "screen sh -c '$(CURDIR)/do-build $* $(STAMPS)/$* $(suite) $(psuite)'" > "$$file" && \ |
---|
28 | echo "other" >> "$$file" && \ |
---|
29 | screen -X source "$$file" && \ |
---|
30 | sleep 2 && \ |
---|
31 | rm -f "$$file" |
---|
32 | @[ -e $(STAMPS)/$*.started ] |
---|
33 | @echo -n "Building $*..." |
---|
34 | @while ! [ -e $(STAMPS)/$*.done ] && ! [ -e $(STAMPS)/$*.error ]; do sleep 1; done |
---|
35 | @if [ -e $(STAMPS)/$*.done ]; then echo "OK"; else echo "FAILED"; fi |
---|
36 | @rm -f $(STAMPS)/$*.started |
---|
37 | @rm -f $(STAMPS)/$*.error |
---|
38 | @[ -e $(STAMPS)/$*.done ] |
---|
39 | |
---|
40 | clean: |
---|
41 | rm -f deps.mk $(STAMPS)/*.started $(STAMPS)/*.error |
---|
Note: See
TracBrowser
for help on using the repository browser.