Commit cf8e85517ef854e2db43c4668851dc1b9c368883

Authored by Arthur Bikmullin
1 parent 8f229356

Improved metadata generation

Showing 1 changed file with 6 additions and 5 deletions
... ... @@ -70,9 +70,11 @@ Class Builder
70 70
71 71 Local targetPath:= buildPath + "/" + tcc.target.dir 'ENV_TARGET
72 72
  73 + Local buildMetaPath:String
  74 + Local buildMetaData:JsonObject = Null
  75 +
73 76 If Not tcc.opt_builddir
74   - Local buildMetaPath:String = buildPath + "/build.meta.json"
75   - Local buildMetaData:JsonObject = Null
  77 + buildMetaPath = buildPath + "/build.meta.json"
76 78
77 79 If FileType(buildMetaPath) = FILETYPE_FILE
78 80 buildMetaData = New JsonObject(LoadString(buildMetaPath))
... ... @@ -116,8 +118,6 @@ Class Builder
116 118 End
117 119
118 120 targets.SetString(tcc.target.name, tcc.target.version)
119   - If FileType( buildPath ) = FILETYPE_NONE CreateDir buildPath
120   - SaveString(buildMetaData.ToJson(), buildPath + "/build.meta.json")
121 121 End
122 122
123 123 Local cfgPath:= targetPath + "/CONFIG.MONKEY"
... ... @@ -189,7 +189,8 @@ Class Builder
189 189 ChangeDir targetPath
190 190 Self.MakeTarget
191 191 ChangeDir cd
192   -
  192 +
  193 + If buildMetaData Then SaveString(buildMetaData.ToJson(), buildPath + "/build.meta.json")
193 194 End
194 195
195 196 Field tcc:TransCC
... ...