CHECK(block);
scoped_ptr<Scope> scope(new Scope(settings->base_config()));
- ScopePerFileProvider per_file_provider(scope.get());
scope->set_source_dir(file.GetDir());
+
+ // Don't allow ScopePerFileProvider to provide target-related variables.
+ // These will be relative to the imported file, which is probably not what
+ // people mean when they use these.
+ ScopePerFileProvider per_file_provider(scope.get(), false);
+
scope->SetProcessingImport();
block->ExecuteBlockInScope(scope.get(), err);
if (err->has_error())