FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
simple-binary-encoding/gocode/Makefile at revert-667-python · michael-ameri/simple-binary-encoding · GitHub
michael-ameri
/
simple-binary-encoding
Public
forked from
aeron-io/simple-binary-encoding
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
simple-binary-encoding
/
gocode
/
Makefile
Copy path
More file actions
More file actions
Latest commit
History
History
History
83 lines (73 loc) · 2.38 KB
Breadcrumbs
simple-binary-encoding
/
gocode
/
Makefile
Copy path
File metadata and controls
83 lines (73 loc) · 2.38 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
ROOT
=..
SBE_TOOL_VERSION
=
$(
shell
cat
$(
ROOT
)
/version.txt)
SBE_JAR
=
$(
ROOT
)
/sbe-all/build/libs/sbe-all-${SBE_TOOL_VERSION}.jar
#
FIXME: Go doesn't like relative paths so us a gnumake extension for now
GOPATH
=
$(
realpath
$(
ROOT
)
/gocode)
#
Convenience during development
#
SAVE_FORMAT=mkdir -p fmt && cp *.go fmt &&
SAVE_FORMAT
=
all
: example test
#
bench
#
This target is used to build golang files using parent gradle
#
script's invocation of sbe-tool in case it needs to be run again. We
#
use this one output file to check that dependency as it's simple
DEP
=src/simple/SbeMarshalling.go
$(
DEP
)
:
$(
SBE_JAR
)
(cd ..
;
./gradlew generateGolangCodecs)
(export GOPATH=
$(
GOPATH
)
&&
\
cd
src/simple
&&
\
go build
&&
\
$(
SAVE_FORMAT
)
\
go fmt
&&
\
go test)
#
Wil regenerate codecs by removing dependencies
clean
:
rm -f src/
*
/SbeMarshalling.go src/
*
/
*
/SbeMarshalling.go
#
Example code and benchmarking
example
: src/example-schema/example-schema
src/example-schema/example-schema
:
$(
DEP
)
(export GOPATH=
$(
GOPATH
)
&&
\
cd
src/example-schema
&&
\
go build
&&
\
go fmt
&&
\
./example-schema)
bench
:
$(
DEP
)
(export GOPATH=
$(
GOPATH
)
&&
\
cd src/example-schema && \
go test --bench . -cpuprofile=cpu.out && \
go tool pprof -text example-schema.test cpu.out)
src/baseline/SbeMarshalling.go
:
$(
DEP
)
$(
GOPATH
)
/sbe-tool -d src -s
$(
EXAMPLES_SCHEMA
)
(export GOPATH=
$(
GOPATH
)
&&
\
cd src/baseline && \
go build && \
go fmt && \
go test && \
go install)
#
The first set does a make install as there is a test that uses
#
multiple packages and needs them in GOPATH The second set work in
#
src/foo, and the third need a GOPATH addition as for Java and C++
#
they geenrate into the same directory but golang doesn't allow that
test
:
$(
DEP
)
(export GOPATH=
$(
GOPATH
)
&&
\
(for t
in
baseline extension extension2
;
do
\
export
GOPATH=
$(
GOPATH
)
&&
\
cd
$(
GOPATH
)
/src/
$$
t
&&
\
go build
&&
\
go fmt
&&
\
go
test
&&
\
go install
\
;
done))
(export GOPATH=
$(
GOPATH
)
&&
\
(for t
in
baseline-bigendian mktdata group_with_data group_with_data_extension composite_elements composite since-deprecated simple issue435 issue472 issue483 issue488 issue560
;
do
\
cd
$(
GOPATH
)
/src/
$$
t
&&
\
go build
&&
\
go fmt
&&
\
go
test
\
;
done))
(for t
in
vardata group basic
;
do
\
export
GOPATH=
$(
GOPATH
)
/
$$
t
&&
\
cd
$(
GOPATH
)
/src/
$$
t/
'
SBE tests
'
&&
\
go build
&&
\
go fmt
&&
\
go
test
\
;
done)
Back
|
FazBrowse Home
|
New Git URL