forked from FOME-Tech/fome-fw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen_enum_to_string.sh
executable file
·42 lines (31 loc) · 1.67 KB
/
gen_enum_to_string.sh
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
#!/bin/bash
# This script reads various C/C++ enums and produces auto_generated_enums.* files"
set -euo pipefail
rm -f gen_enum_to_string.log
java -DSystemOut.name=logs/gen_java_enum -cp ../java_tools/enum2string.jar com.rusefi.ToJavaEnum -enumInputFile controllers/sensors/sensor_type.h -outputPath ../java_console/io/src/main/java/com/rusefi/enums
java -DSystemOut.name=logs/gen_java_enum -cp ../java_tools/enum2string.jar com.rusefi.ToJavaEnum -enumInputFile controllers/algo/engine_types.h -outputPath ../java_console/io/src/main/java/com/rusefi/enums -definition integration/rusefi_config.txt
java -DSystemOut.name=logs/gen_enum_to_string \
-jar ../java_tools/enum2string.jar \
-outputPath controllers/algo \
-generatedFile commonenum \
-enumInputFile controllers/algo/rusefi_enums.h
java -DSystemOut.name=logs/gen_enum_to_string \
-jar ../java_tools/enum2string.jar \
-outputPath controllers/trigger/decoders \
-generatedFile sync_edge \
-enumInputFile controllers/trigger/decoders/sync_edge.h
java -DSystemOut.name=logs/gen_enum_to_string \
-jar ../java_tools/enum2string.jar \
-outputPath controllers/algo \
-generatedFile enginetypes \
-enumInputFile controllers/algo/engine_types.h
# TODO: rearrange enums so that we have WAY less duplicated generated code? at the moment too many enums are generated 4 times
java -DSystemOut.name=logs/gen_enum_to_string \
-jar ../java_tools/enum2string.jar \
-outputPath controllers/algo \
-enumInputFile controllers/algo/rusefi_hw_enums.h \
java -DSystemOut.name=logs/gen_enum_to_string \
-jar ../java_tools/enum2string.jar \
-outputPath controllers/sensors \
-generatedFile sensor \
-enumInputFile controllers/sensors/sensor_type.h