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
|
Rev | Line | |
---|
[25964] | 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 |
---|
[22687] | 8 | |
---|
[25964] | 9 | STAMPS := /afs/sipb.mit.edu/project/debathena/machines/awesome-build-server/stamps.$(suite) |
---|
| 10 | |
---|
[22687] | 11 | package = $(STAMPS)/$(1).done |
---|
| 12 | |
---|
| 13 | all: build-all |
---|
| 14 | |
---|
| 15 | deps.mk: gen-build-deps |
---|
[22944] | 16 | ./gen-build-deps $(psuite) > $@ |
---|
[22687] | 17 | include deps.mk |
---|
| 18 | |
---|
| 19 | build/%: $(call package,%) |
---|
| 20 | : |
---|
| 21 | |
---|
[23584] | 22 | $(call package,%): |
---|
[25794] | 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') && \ |
---|
[22944] | 27 | echo "screen sh -c '$(CURDIR)/do-build $* $(STAMPS)/$* $(suite) $(psuite)'" > "$$file" && \ |
---|
[22687] | 28 | echo "other" >> "$$file" && \ |
---|
| 29 | screen -X source "$$file" && \ |
---|
[24418] | 30 | sleep 2 && \ |
---|
[22952] | 31 | rm -f "$$file" |
---|
[25794] | 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 ] |
---|
[22687] | 39 | |
---|
| 40 | clean: |
---|
| 41 | rm -f deps.mk $(STAMPS)/*.started $(STAMPS)/*.error |
---|
Note: See
TracBrowser
for help on using the repository browser.