1# Test namingstyle option 2 3Import('env') 4 5env = env.Clone() 6env.Replace(NANOPBFLAGS = "--custom-style=custom_naming_style.CustomNamingStyle") 7 8style = Command("custom_naming_style.py", "../../namingstyle_custom/custom_naming_style.py", Copy("$TARGET", "$SOURCE")) 9 10proto = env.NanopbProto(["custom_naming_style", "custom_naming_style.options"]) 11Depends(proto, style) 12proto = env.NanopbProto(["custom_naming_style_package", "custom_naming_style_package.options"]) 13Depends(proto, style) 14proto = env.NanopbProto(["custom_naming_style_mangle", "custom_naming_style_mangle.options"]) 15Depends(proto, style) 16 17proto = env.NanopbProto(["custom_naming_style_other", "custom_naming_style_other.options"]) 18Depends(proto, style) 19proto = env.NanopbProto(["custom_naming_style_importer", "custom_naming_style_importer.options", "custom_naming_style_other", "custom_naming_style_other.options"]) 20Depends(proto, style) 21 22test = env.Program(["test_custom_naming_style_c.c", "custom_naming_style.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) 23mangle = env.Program(["test_custom_naming_style_mangle_c.c", "custom_naming_style_mangle.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) 24package = env.Program(["test_custom_naming_style_package_c.c", "custom_naming_style_package.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) 25importer = env.Program(["test_custom_naming_style_importer_c.c", "custom_naming_style_importer.pb.c", "custom_naming_style_other.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) 26 27env.RunTest(test) 28env.RunTest(mangle) 29env.RunTest(package) 30env.RunTest(importer) 31