diff --git a/new/targets.jam b/new/targets.jam index e03b39bd8..f9123ba91 100644 --- a/new/targets.jam +++ b/new/targets.jam @@ -569,7 +569,7 @@ rule main-target-requirements ( local loc = [ project.attribute $(project) location ] ; local requirements = [ property.translate-paths $(specification) : $(loc) ] ; local project-requirements = [ project.attribute $(project) requirements ] ; - requirements = [ property.refine $(project-requirements) : $(specification) ] ; + requirements = [ property.refine $(project-requirements) : $(requirements) ] ; if $(requirements[1]) = "@error" { errors.error "Conflicting requirements for target:" $(requirements) ; diff --git a/test/path_features.py b/test/path_features.py index 6a2276009..975947387 100644 --- a/test/path_features.py +++ b/test/path_features.py @@ -5,7 +5,10 @@ t = Tester() t.write("project-root.jam", "import gcc ;") t.write("Jamfile", "lib a : a.cpp : . ;") -t.write("a.cpp", "void foo() {}") +t.write("a.cpp", """ +#include +void foo() {} +""") t.write("a.h", "") t.write("d/Jamfile", "exe b : b.cpp ../a ; ") diff --git a/v2/build/targets.jam b/v2/build/targets.jam index e03b39bd8..f9123ba91 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -569,7 +569,7 @@ rule main-target-requirements ( local loc = [ project.attribute $(project) location ] ; local requirements = [ property.translate-paths $(specification) : $(loc) ] ; local project-requirements = [ project.attribute $(project) requirements ] ; - requirements = [ property.refine $(project-requirements) : $(specification) ] ; + requirements = [ property.refine $(project-requirements) : $(requirements) ] ; if $(requirements[1]) = "@error" { errors.error "Conflicting requirements for target:" $(requirements) ; diff --git a/v2/test/path_features.py b/v2/test/path_features.py index 6a2276009..975947387 100644 --- a/v2/test/path_features.py +++ b/v2/test/path_features.py @@ -5,7 +5,10 @@ t = Tester() t.write("project-root.jam", "import gcc ;") t.write("Jamfile", "lib a : a.cpp : . ;") -t.write("a.cpp", "void foo() {}") +t.write("a.cpp", """ +#include +void foo() {} +""") t.write("a.h", "") t.write("d/Jamfile", "exe b : b.cpp ../a ; ")