Mercurial > gemma
annotate Makefile @ 5343:bb6761abd81d extented-report
XLSX template: Copy column and row height explicitly.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 18 Jun 2021 13:43:21 +0200 |
parents | fa91bb7a4e7a |
children | 983d6efc04e9 |
rev | line source |
---|---|
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
1 # Simple Makefile to build all of Gemma |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
2 # |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
3 # Authors: Sascha Wilde <wilde@intevation.de> |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
4 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
5 basedir := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
6 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
7 BUILDBASE := $(basedir).buildbase |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
8 GOPATH := $(BUILDBASE)/go |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
9 GOCACHE := $(BUILDBASE)/gocache |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
10 ENVWARPPER := $(BUILDBASE)/run-with-env.sh |
402
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
303
diff
changeset
|
11 BINDIR := /usr/local/bin |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
12 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
13 export BUILDBASE |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
14 |
4464
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
15 .PHONY: all gemma client clean |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
16 |
4824
c0eb491aaaa7
Removed octree from octree package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4664
diff
changeset
|
17 all: gemma client |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
18 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
19 $(ENVWARPPER): |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
20 @echo "Preparing go build environment:" |
4464
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
21 mkdir -p "$(GOPATH)" |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
22 mkdir -p "$(GOCACHE)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
23 @echo "Creating wrapper script:" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
24 echo '#!/bin/sh' >"$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
25 echo 'export GOPATH=$(GOPATH)' >>"$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
26 echo 'export GOCACHE=$(GOCACHE)' >>"$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
27 echo 'exec "$$@"' >>"$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
28 chmod +x "$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
29 |
4464
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
30 gemma: $(ENVWARPPER) |
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
31 "$(ENVWARPPER)" go build -o ./cmd/gemma/gemma ./cmd/gemma |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
32 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
33 client: |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
34 $(MAKE) -f Makefile.build -C client |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
35 |
402
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
303
diff
changeset
|
36 install: gemma |
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
303
diff
changeset
|
37 cp cmd/gemma/gemma $(BINDIR) |
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
303
diff
changeset
|
38 |
537
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
39 tar: all |
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
40 v="gemma-$$(hg id -i)" ;\ |
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
41 tar --transform "s@^@$${v}/@" \ |
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
42 -cJf "../$${v}.tar.xz" \ |
4838
fa91bb7a4e7a
Re added gemma executable to tar.
Sascha Wilde <wilde@intevation.de>
parents:
4824
diff
changeset
|
43 cmd/gemma/gemma schema style-templates \ |
4664
7d2463c7b4ad
Added cmd/oct2str/oct2str to Makefile.
Sascha Wilde <wilde@intevation.de>
parents:
4494
diff
changeset
|
44 web misc example_conf.toml |
537
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
45 |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
46 clean: |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
47 $(MAKE) -f Makefile.build -C client $@ |
214
da24df80c25d
Fix Makefile clean target: don't fail if no back end bin to delete.
Sascha Wilde <wilde@intevation.de>
parents:
206
diff
changeset
|
48 rm -f "$(gemma-bin)" |
4464
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
49 chmod -R u+w "$(BUILDBASE)" # This is neccessary for deletion to work... |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
50 rm -rf "$(BUILDBASE)" |