From b0f162b7ddb76694e96125424beecca48a824dfa Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Tue, 18 Dec 2012 02:12:30 +0100 Subject: add tagbased build too --- bibisect/Makefile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'bibisect/Makefile') diff --git a/bibisect/Makefile b/bibisect/Makefile index f90cde9d..79f61029 100755 --- a/bibisect/Makefile +++ b/bibisect/Makefile @@ -32,6 +32,14 @@ include bibisect.cfg BINREPO:=$(WORKDIR)/binrepo BUILDDIR:=$(WORKDIR)/build ARTIFACTDIR:=$(WORKDIR)/artifact +ORDERMODE?=master + +ifeq ($(ORDERMODE),master) +SOURCETYPE:=hash +endif +ifeq ($(ORDERMODE),tags) +SOURCETYPE:=tag +endif .DEFAULT_GOAL=all .PHONY: all clean @@ -47,7 +55,7 @@ cd $(BINREPO) && git checkout -f $(1) && \ cd $(ARTIFACTDIR) && \ git --git-dir=$(BINREPO)/.git --work-tree=$(ARTIFACTDIR) add -A && \ git --git-dir=$(BINREPO)/.git --work-tree=$(ARTIFACTDIR) commit -F $(ARTIFACTDIR)/commitmsg && \ -git --git-dir=$(BINREPO)/.git tag source-hash-$(2) && \ +git --git-dir=$(BINREPO)/.git tag source-$(SOURCETYPE)-$(2) && \ echo "$(2) $(3)" > $@; endef @@ -69,6 +77,8 @@ ifneq ($(MAKECMDGOALS),clean) include $(WORKDIR)/buildorder endif + +ifeq ($(ORDERMODE),master) $(WORKDIR)/buildorder: $(WORKDIR)/init git --git-dir=$(SOURCEREPO) rev-list --reverse $(FROM)..$(TO) | \ awk \ @@ -76,6 +86,14 @@ $(WORKDIR)/buildorder: $(WORKDIR)/init NR % $(INTERVAL) == 1 { current="$(WORKDIR)/milestone/" $$0; printf "%s: %s\n", current, last; last = current} \ END { printf "$(TO): %s\nall: $(TO)", last }' > $@ +endif + +ifeq ($(ORDERMODE),tags) +$(WORKDIR)/buildorder: $(WORKDIR)/init + git --git-dir=$(SOURCEREPO) tag|grep ^libreoffice|sed -e 's/\./-/g'|paste - <(git --git-dir=$(SOURCEREPO) tag|grep ^libreoffice)|sort|cut -f2 > $@ + +endif + $(WORKDIR)/init: mkdir -p $(WORKDIR)/milestone mkdir -p $(BUILDDIR) -- cgit v1.2.3