@@ -39,21 +39,21 @@ func GCC(sourceFilePath *paths.Path, targetFilePath *paths.Path, includes paths.
39
39
includesStrings := f .Map (includes .AsStrings (), utils .WrapWithHyphenI )
40
40
gccBuildProperties .Set ("includes" , strings .Join (includesStrings , " " ))
41
41
42
- const GCC_PATTERN_PROPERTY = "recipe.preproc.macros"
43
- if gccBuildProperties .Get (GCC_PATTERN_PROPERTY ) == "" {
42
+ const gccPreprocRecipeProperty = "recipe.preproc.macros"
43
+ if gccBuildProperties .Get (gccPreprocRecipeProperty ) == "" {
44
44
// autogenerate preprocess macros recipe from compile recipe
45
45
preprocPattern := gccBuildProperties .Get ("recipe.cpp.o.pattern" )
46
46
// add {preproc.macros.flags} to {compiler.cpp.flags}
47
47
preprocPattern = strings .Replace (preprocPattern , "{compiler.cpp.flags}" , "{compiler.cpp.flags} {preproc.macros.flags}" , 1 )
48
48
// replace "{object_file}" with "{preprocessed_file_path}"
49
49
preprocPattern = strings .Replace (preprocPattern , "{object_file}" , "{preprocessed_file_path}" , 1 )
50
50
51
- gccBuildProperties .Set (GCC_PATTERN_PROPERTY , preprocPattern )
51
+ gccBuildProperties .Set (gccPreprocRecipeProperty , preprocPattern )
52
52
}
53
53
54
- pattern := gccBuildProperties .Get (GCC_PATTERN_PROPERTY )
54
+ pattern := gccBuildProperties .Get (gccPreprocRecipeProperty )
55
55
if pattern == "" {
56
- return nil , nil , errors .Errorf (tr ("%s pattern is missing" ), GCC_PATTERN_PROPERTY )
56
+ return nil , nil , errors .Errorf (tr ("%s pattern is missing" ), gccPreprocRecipeProperty )
57
57
}
58
58
59
59
commandLine := gccBuildProperties .ExpandPropsInString (pattern )
0 commit comments