@@ -358,9 +358,9 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
358
358
var preprocErr error
359
359
var preprocStderr []byte
360
360
361
- var include string
361
+ var missingIncludeH string
362
362
if unchanged && cache .valid {
363
- include = cache .Next ().Include
363
+ missingIncludeH = cache .Next ().Include
364
364
if first && ctx .Verbose {
365
365
ctx .Info (tr ("Using cached library dependencies for file: %[1]s" , sourcePath ))
366
366
}
@@ -374,25 +374,25 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
374
374
// Unwrap error and see if it is an ExitError.
375
375
if preprocErr == nil {
376
376
// Preprocessor successful, done
377
- include = ""
377
+ missingIncludeH = ""
378
378
} else if _ , isExitErr := errors .Cause (preprocErr ).(* exec.ExitError ); ! isExitErr || preprocStderr == nil {
379
379
// Ignore ExitErrors (e.g. gcc returning non-zero status), but bail out on other errors
380
380
return errors .WithStack (preprocErr )
381
381
} else {
382
- include = IncludesFinderWithRegExp (string (preprocStderr ))
383
- if include == "" && ctx .Verbose {
382
+ missingIncludeH = IncludesFinderWithRegExp (string (preprocStderr ))
383
+ if missingIncludeH == "" && ctx .Verbose {
384
384
ctx .Info (tr ("Error while detecting libraries included by %[1]s" , sourcePath ))
385
385
}
386
386
}
387
387
}
388
388
389
- if include == "" {
389
+ if missingIncludeH == "" {
390
390
// No missing includes found, we're done
391
391
cache .ExpectEntry (sourcePath , "" , nil )
392
392
return nil
393
393
}
394
394
395
- library := ResolveLibrary (ctx , include )
395
+ library := ResolveLibrary (ctx , missingIncludeH )
396
396
if library == nil {
397
397
// Library could not be resolved, show error
398
398
if preprocErr == nil || preprocStderr == nil {
@@ -418,7 +418,7 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFileQu
418
418
// include path and queue its source files for further
419
419
// include scanning
420
420
ctx .ImportedLibraries = append (ctx .ImportedLibraries , library )
421
- appendIncludeFolder (ctx , cache , sourcePath , include , library .SourceDir )
421
+ appendIncludeFolder (ctx , cache , sourcePath , missingIncludeH , library .SourceDir )
422
422
sourceDirs := library .SourceDirs ()
423
423
for _ , sourceDir := range sourceDirs {
424
424
queueSourceFilesFromFolder (ctx , sourceFileQueue , library , sourceDir .Dir , sourceDir .Recurse )
0 commit comments