-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·91 lines (61 loc) · 2.49 KB
/
Copy pathMakefile
File metadata and controls
executable file
·91 lines (61 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Git variables
# Detect the operating system and architecture.
include makefiles/osdetect.mk
# -----------------------------------------------------------------------------
# Variables
# -----------------------------------------------------------------------------
GIT_REPOSITORY_NAME := $(shell basename `git rev-parse --show-toplevel`)
GIT_VERSION := $(shell git describe --always --tags --long --dirty | sed -e 's/\-0//' -e 's/\-g.......//')
# -----------------------------------------------------------------------------
# The first "make" target runs as default.
# -----------------------------------------------------------------------------
.PHONY: default
default: help
# -----------------------------------------------------------------------------
# Operating System / Architecture targets
# -----------------------------------------------------------------------------
-include makefiles/$(OSTYPE).mk
-include makefiles/$(OSTYPE)_$(OSARCH).mk
.PHONY: hello-world
hello-world: hello-world-osarch-specific
# -----------------------------------------------------------------------------
# Build
# -----------------------------------------------------------------------------
.PHONY: build-csharp
build-csharp:
./bin/generate_csharp.py
.PHONY: build-go
build-go:
./bin/generate_go.py
gofmt -w go/szerrortypes.go
.PHONY: build-java
build-java:
./bin/generate_java.py
.PHONY: build-python
build-python:
./bin/generate_python.py
.PHONY: build
build: build-csharp build-go build-java build-python
# -----------------------------------------------------------------------------
# Lint
# -----------------------------------------------------------------------------
.PHONY: lint
lint:
@pylint $(shell git ls-files '*.py')
# -----------------------------------------------------------------------------
# Utility targets
# -----------------------------------------------------------------------------
.PHONY: clean
clean: clean-osarch-specific
.PHONY: help
help:
@echo "Build $(PROGRAM_NAME) version $(BUILD_VERSION)-$(BUILD_ITERATION)".
@echo "Makefile targets:"
@$(MAKE) -pRrq -f $(firstword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
.PHONY: print-make-variables
print-make-variables:
@$(foreach V,$(sort $(.VARIABLES)), \
$(if $(filter-out environment% default automatic, \
$(origin $V)),$(warning $V=$($V) ($(value $V)))))
.PHONY: setup
setup: setup-osarch-specific