From 092ba549582fd2ea9e8598bfc1678def9731636b Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Wed, 11 Jul 2012 14:41:33 +0000 Subject: Merge branch 'master' of git.sugarlabs.org:sugar-build/sugar-build --- (limited to 'Makefile') diff --git a/Makefile b/Makefile index 569f320..399d6fb 100644 --- a/Makefile +++ b/Makefile @@ -3,12 +3,7 @@ LOGFILE = $(CURDIR)/logs/build-$(TIMESTAMP).log SCRIPTS = $(CURDIR)/scripts JHBUILD = $(CURDIR)/install/bin/jhbuild -f $(SCRIPTS)/jhbuildrc LOG = $(SCRIPTS)/log-command - -ifdef SUGAR_SESSION -XINITDISPLAY = :100 -else -XINITDISPLAY = :99 -endif +XINITDISPLAY = `$(SCRIPTS)/find-free-display` # The buildbot shell does not handle script properly. It's unnecessary # anyway because we can't use interactive scripts there. @@ -25,10 +20,16 @@ submodules: git submodule update XRANDR_LIBS = $(shell pkg-config --libs xrandr x11) +X11_LIBS = $(shell pkg-config --libs x11) -scripts/list-outputs: +scripts/list-outputs: scripts/list-outputs.c gcc -o scripts/list-outputs scripts/list-outputs.c $(XRANDR_LIBS) +scripts/find-free-display: scripts/find-free-display.c + gcc -o scripts/find-free-display scripts/find-free-display.c $(X11_LIBS) + +x11-utils: scripts/list-outputs scripts/find-free-display + check-system: $(TYPESCRIPT) $(SCRIPTS)/check-system $(LOGFILE) @@ -48,13 +49,13 @@ build: build-glucose build-fructose build-%: $(TYPESCRIPT) "$(JHBUILD) buildone $*" $(LOGFILE) -run: scripts/list-outputs +run: x11-utils xinit $(SCRIPTS)/xinitrc -- $(XINITDISPLAY) &>>$(LOGFILE) -test: scripts/list-outputs +test: x11-utils $(LOG) "$(SCRIPTS)/run-dogtail-tests" $(LOGFILE) -shell: +shell: x11-utils @cd source; \ PS1="[sugar-build \W]$$ " \ PATH=$(PATH):$(SCRIPTS)/shell \ -- cgit v0.9.1