forked from COVESA/vehicle_signal_specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (57 loc) · 3.54 KB
/
Makefile
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
#
# Makefile to generate specifications
#
.PHONY: clean all travis_targets json franca yaml csv ddsidl tests binary protobuf ttl graphql ocf c install overlays
all: clean json franca yaml csv ddsidl binary tests protobuf graphql overlays ttl
# All mandatory targets that shall be built and pass on each pull request for
# vehicle-signal-specification or vss-tools
travis_targets: clean json franca yaml binary csv graphql ddsidl overlays tests tar
# Additional targets that shall be built by travis, but where it is not mandatory
# that the builds shall pass.
# This is typically intended for less maintainted tools that are allowed to break
# from time to time
# Can be run from e.g. travis with "make -k travis_optional || true" to continue
# even if errors occur and not do not halt travis build if errors occur
travis_optional: clean protobuf ttl
DESTDIR?=/usr/local
TOOLSDIR?=./vss-tools
json:
${TOOLSDIR}/vspec2json.py -I ./spec --uuid -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).json
franca:
${TOOLSDIR}/vspec2franca.py -v $$(cat VERSION) -I ./spec --uuid -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).fidl
yaml:
${TOOLSDIR}/vspec2yaml.py -I ./spec --uuid -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).yaml
csv:
${TOOLSDIR}/vspec2csv.py -I ./spec --uuid -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).csv
ddsidl:
${TOOLSDIR}/vspec2ddsidl.py -I ./spec --uuid -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).idl
# Verifies that supported overlay combinations are syntactically correct.
overlays:
${TOOLSDIR}/vspec2json.py -I ./spec --uuid -u ./spec/units.yaml -o overlays/profiles/motorbike.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_motorbike.json
${TOOLSDIR}/vspec2json.py -I ./spec --uuid -u ./spec/units.yaml -o overlays/extensions/dual_wiper_systems.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_dualwiper.json
tests:
PYTHONPATH=${TOOLSDIR} pytest
binary:
gcc -shared -o ${TOOLSDIR}/binary/binarytool.so -fPIC ${TOOLSDIR}/binary/binarytool.c
${TOOLSDIR}/vspec2binary.py --uuid -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).binary
protobuf:
${TOOLSDIR}/vspec2protobuf.py -I ./spec -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).proto
graphql:
${TOOLSDIR}/vspec2graphql.py -I ./spec --uuid -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).graphql.ts
ttl:
${TOOLSDIR}/contrib/vspec2ttl/vspec2ttl.py -I ./spec -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).ttl
# Include all offically supported outputs (i.e. those created by travis_targets).
# Exception is binary as it might be target specific and library anyway needs to be rebuilt.
# As of today all artifacts generated for release shall include UUID if supported.
# Note: From VSS 3.1 individual files are uploaded instead of tar file, but this command kept for now anyway
tar:
tar -czvf vss_rel_$$(cat VERSION).tar.gz vss_rel_$$(cat VERSION).json vss_rel_$$(cat VERSION).fidl vss_rel_$$(cat VERSION).yaml \
vss_rel_$$(cat VERSION).csv vss_rel_$$(cat VERSION).graphql.ts vss_rel_$$(cat VERSION).idl
clean:
rm -f vss_rel_*
install:
git submodule init
git submodule update
(cd ${TOOLSDIR}/; python3 setup.py install --install-scripts=${DESTDIR}/bin)
install -d ${DESTDIR}/share/vss
(cd spec; cp -r * ${DESTDIR}/share/vss)