Mercurial > gemma
view Makefile @ 4680:976aedc195e5
Be more clever when triggering diff calculations.
If a diff calc is started bring it to its end.
Before starting look if it is done and in db notice it as ready.
When a calculation is on its way add to list of waiting calls
to avoid starting a calculation again.
Only do two diff calcs at a time.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 15 Oct 2019 18:25:40 +0200 |
parents | 7d2463c7b4ad |
children | c0eb491aaaa7 |
line wrap: on
line source
# Simple Makefile to build all of Gemma # # Authors: Sascha Wilde <wilde@intevation.de> basedir := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) BUILDBASE := $(basedir).buildbase GOPATH := $(BUILDBASE)/go GOCACHE := $(BUILDBASE)/gocache ENVWARPPER := $(BUILDBASE)/run-with-env.sh BINDIR := /usr/local/bin export BUILDBASE .PHONY: all gemma client clean all: gemma client tools $(ENVWARPPER): @echo "Preparing go build environment:" mkdir -p "$(GOPATH)" mkdir -p "$(GOCACHE)" @echo "Creating wrapper script:" echo '#!/bin/sh' >"$(ENVWARPPER)" echo 'export GOPATH=$(GOPATH)' >>"$(ENVWARPPER)" echo 'export GOCACHE=$(GOCACHE)' >>"$(ENVWARPPER)" echo 'exec "$$@"' >>"$(ENVWARPPER)" chmod +x "$(ENVWARPPER)" tools: oct2str gemma: $(ENVWARPPER) "$(ENVWARPPER)" go build -o ./cmd/gemma/gemma ./cmd/gemma oct2str: $(ENVWARPPER) "$(ENVWARPPER)" go build -o ./cmd/oct2str/oct2str ./cmd/oct2str client: $(MAKE) -f Makefile.build -C client install: gemma cp cmd/gemma/gemma $(BINDIR) tar: all v="gemma-$$(hg id -i)" ;\ tar --transform "s@^@$${v}/@" \ -cJf "../$${v}.tar.xz" \ cmd/gemma/gemma cmd/oct2str/oct2str schema style-templates \ web misc example_conf.toml clean: $(MAKE) -f Makefile.build -C client $@ rm -f "$(gemma-bin)" chmod -R u+w "$(BUILDBASE)" # This is neccessary for deletion to work... rm -rf "$(BUILDBASE)"