Support for copying non-generated files to cd
authorCasper Hornstrup <chorns@users.sourceforge.net>
Thu, 3 Mar 2005 21:00:30 +0000 (21:00 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Thu, 3 Mar 2005 21:00:30 +0000 (21:00 +0000)
svn path=/branches/xmlbuildsystem/; revision=13807

21 files changed:
reactos/tools/rbuild/backend/mingw/modulehandler.cpp
reactos/tools/rbuild/backend/mingw/modulehandler.h
reactos/tools/rbuild/cdfile.cpp [new file with mode: 0644]
reactos/tools/rbuild/makefile
reactos/tools/rbuild/project.cpp
reactos/tools/rbuild/rbuild.h
reactos/tools/rbuild/rbuild.txt
reactos/tools/rbuild/test.h
reactos/tools/rbuild/tests/alltests.cpp
reactos/tools/rbuild/tests/cdfiletest.cpp [new file with mode: 0644]
reactos/tools/rbuild/tests/data/automaticdependency.xml
reactos/tools/rbuild/tests/data/automaticdependency_include.xml
reactos/tools/rbuild/tests/data/cdfile.xml [new file with mode: 0644]
reactos/tools/rbuild/tests/definetest.cpp
reactos/tools/rbuild/tests/iftest.cpp
reactos/tools/rbuild/tests/includetest.cpp
reactos/tools/rbuild/tests/invoketest.cpp
reactos/tools/rbuild/tests/linkerflagtest.cpp
reactos/tools/rbuild/tests/moduletest.cpp
reactos/tools/rbuild/tests/projecttest.cpp
reactos/tools/rbuild/tests/sourcefiletest.cpp

index a9e7dde..f8f2548 100644 (file)
@@ -1970,9 +1970,25 @@ MingwIsoModuleHandler::OutputBootstrapfileCopyCommands ( const string bootcdDire
        }\r
 }\r
 \r
+void\r
+MingwIsoModuleHandler::OutputCdfileCopyCommands ( const string bootcdDirectory,\r
+                                                     const Module& module ) const\r
+{\r
+       for ( size_t i = 0; i < module.project.cdfiles.size (); i++ )\r
+       {\r
+               const CDFile& cdfile = *module.project.cdfiles[i];\r
+               string targetFilenameNoFixup = bootcdDirectory + SSEP + cdfile.base + SSEP + cdfile.nameoncd;\r
+               string targetFilename = PassThruCacheDirectory ( FixupTargetFilename ( targetFilenameNoFixup ) );\r
+               fprintf ( fMakefile,\r
+                         "\t${cp} %s %s\n",\r
+                         cdfile.GetPath ().c_str (),\r
+                         targetFilename.c_str () );\r
+       }\r
+}\r
+\r
 string\r
-MingwIsoModuleHandler::GetCdDirectories ( const string bootcdDirectory,\r
-                                             const Module& module ) const\r
+MingwIsoModuleHandler::GetBootstrapCdDirectories ( const string bootcdDirectory,\r
+                                                      const Module& module ) const\r
 {\r
        string directories;\r
        for ( size_t i = 0; i < module.project.modules.size (); i++ )\r
@@ -1990,21 +2006,74 @@ MingwIsoModuleHandler::GetCdDirectories ( const string bootcdDirectory,
 }\r
 \r
 string\r
-MingwIsoModuleHandler::GetCdFiles ( const string bootcdDirectory,\r
-                                       const Module& module ) const\r
+MingwIsoModuleHandler::GetNonModuleCdDirectories ( const string bootcdDirectory,\r
+                                                      const Module& module ) const\r
+{\r
+       string directories;\r
+       for ( size_t i = 0; i < module.project.cdfiles.size (); i++ )\r
+       {\r
+               const CDFile& cdfile = *module.project.cdfiles[i];\r
+               string targetDirecctory = bootcdDirectory + SSEP + cdfile.base;\r
+               if ( directories.size () > 0 )\r
+                       directories += " ";\r
+               directories += FixupTargetFilename ( targetDirecctory );\r
+       }\r
+       return directories;\r
+}\r
+\r
+string\r
+MingwIsoModuleHandler::GetCdDirectories ( const string bootcdDirectory,\r
+                                             const Module& module ) const\r
+{\r
+       string directories = GetBootstrapCdDirectories ( bootcdDirectory,\r
+                                                        module );\r
+       directories += " " + GetNonModuleCdDirectories ( bootcdDirectory,\r
+                                                        module );\r
+       return directories;\r
+}\r
+\r
+string\r
+MingwIsoModuleHandler::GetBootstrapCdFiles ( const string bootcdDirectory,\r
+                                                const Module& module ) const\r
 {\r
-       string files;\r
+       string cdfiles;\r
        for ( size_t i = 0; i < module.project.modules.size (); i++ )\r
        {\r
                const Module& m = *module.project.modules[i];\r
                if ( m.bootstrap != NULL )\r
                {\r
-                       if ( files.size () > 0 )\r
-                               files += " ";\r
-                       files += FixupTargetFilename ( m.GetPath () );\r
+                       if ( cdfiles.size () > 0 )\r
+                               cdfiles += " ";\r
+                       cdfiles += FixupTargetFilename ( m.GetPath () );\r
                }\r
        }\r
-       return files;\r
+       return cdfiles;\r
+}\r
+\r
+string\r
+MingwIsoModuleHandler::GetNonModuleCdFiles ( const string bootcdDirectory,\r
+                                                const Module& module ) const\r
+{\r
+       string cdfiles;\r
+       for ( size_t i = 0; i < module.project.cdfiles.size (); i++ )\r
+       {\r
+               const CDFile& cdfile = *module.project.cdfiles[i];\r
+               if ( cdfiles.size () > 0 )\r
+                       cdfiles += " ";\r
+               cdfiles += NormalizeFilename ( cdfile.GetPath () );\r
+       }\r
+       return cdfiles;\r
+}\r
+\r
+string\r
+MingwIsoModuleHandler::GetCdFiles ( const string bootcdDirectory,\r
+                                       const Module& module ) const\r
+{\r
+       string cdfiles = GetBootstrapCdFiles ( bootcdDirectory,\r
+                                              module );\r
+       cdfiles += " " + GetNonModuleCdFiles ( bootcdDirectory,\r
+                                              module );\r
+       return cdfiles;\r
 }\r
 \r
 void\r
@@ -2044,6 +2113,8 @@ MingwIsoModuleHandler::GenerateIsoModuleTarget ( const Module& module )
                  reactosInf.c_str () );\r
        OutputBootstrapfileCopyCommands ( bootcdDirectory,\r
                                          module );\r
+       OutputCdfileCopyCommands ( bootcdDirectory,\r
+                                  module );\r
        fprintf ( fMakefile,\r
                  "\t${cdmake} -v -m -b %s %s REACTOS ReactOS.iso\n",\r
                  isoboot.c_str (),\r
index 37bb9a1..c1eb8e5 100644 (file)
@@ -291,12 +291,22 @@ public:
        virtual void Process ( const Module& module );\r
 private:\r
        void GenerateIsoModuleTarget ( const Module& module );\r
+       std::string GetBootstrapCdDirectories ( const std::string bootcdDirectory,\r
+                                               const Module& module ) const;\r
+       std::string GetNonModuleCdDirectories ( const std::string bootcdDirectory,\r
+                                               const Module& module ) const;\r
        std::string GetCdDirectories ( const std::string bootcdDirectory,\r
                                       const Module& module ) const;\r
+       std::string GetBootstrapCdFiles ( const std::string bootcdDirectory,\r
+                                         const Module& module ) const;\r
+       std::string GetNonModuleCdFiles ( const std::string bootcdDirectory,\r
+                                         const Module& module ) const;\r
        std::string GetCdFiles ( const std::string bootcdDirectory,\r
                                 const Module& module ) const;\r
        void OutputBootstrapfileCopyCommands ( const std::string bootcdDirectory,\r
                                               const Module& module ) const;\r
+       void OutputCdfileCopyCommands ( const std::string bootcdDirectory,\r
+                                       const Module& module ) const;\r
 };\r
 \r
 #endif /* MINGW_MODULEHANDLER_H */\r
diff --git a/reactos/tools/rbuild/cdfile.cpp b/reactos/tools/rbuild/cdfile.cpp
new file mode 100644 (file)
index 0000000..d11fe75
--- /dev/null
@@ -0,0 +1,42 @@
+#include "pch.h"\r
+#include <assert.h>\r
+\r
+#include "rbuild.h"\r
+\r
+using std::string;\r
+\r
+CDFile::CDFile ( const Project& project_,\r
+                    const XMLElement& cdfileNode,\r
+                    const string& path )\r
+       : project ( project_ ),\r
+         node ( cdfileNode )\r
+{\r
+       const XMLAttribute* att = node.GetAttribute ( "base", false );\r
+       if ( att != NULL )\r
+               base = att->value;\r
+       else\r
+               base = "";\r
+\r
+       att = node.GetAttribute ( "nameoncd", false );\r
+       if ( att != NULL )\r
+               nameoncd = att->value;\r
+       else\r
+               nameoncd = node.value;\r
+       name = node.value;\r
+       this->path = path;\r
+}\r
+\r
+CDFile::~CDFile ()\r
+{\r
+}\r
+\r
+string\r
+CDFile::GetPath () const\r
+{\r
+       return path + SSEP + name;\r
+}\r
+\r
+void\r
+CDFile::ProcessXML()\r
+{\r
+}\r
index 5a0fb31..dfb1981 100644 (file)
@@ -22,6 +22,7 @@ RBUILD_BASE_SOURCES = \
        $(RBUILD_BACKEND_BASE_SOURCES) \\r
        automaticdependency.cpp \\r
        bootstrap.cpp \\r
+       cdfile.cpp \\r
        compilerflag.cpp \\r
        define.cpp \\r
        exception.cpp \\r
@@ -61,7 +62,8 @@ RBUILD_TESTS = \
        tests$(SEP)linkerflagtest.cpp \\r
        tests$(SEP)moduletest.cpp \\r
        tests$(SEP)projecttest.cpp \\r
-       tests$(SEP)sourcefiletest.cpp\r
+       tests$(SEP)sourcefiletest.cpp \\r
+       tests$(SEP)cdfiletest.cpp\r
 \r
 RBUILD_TEST_SPECIAL_SOURCES = \\r
        $(addprefix $(RBUILD_BASE)$(SEP), $(RBUILD_TESTS)) \\r
index 9800323..50b4d22 100644 (file)
@@ -30,6 +30,8 @@ Project::~Project ()
                delete properties[i];\r
        for ( i = 0; i < ifs.size (); i++ )\r
                delete ifs[i];\r
+       for ( i = 0; i < cdfiles.size (); i++ )\r
+               delete cdfiles[i];\r
        delete head;\r
 }\r
 \r
@@ -216,26 +218,28 @@ Project::ProcessXML ( const string& path )
        makefile = att->value;\r
 \r
        size_t i;\r
-       for ( i = 0; i < node->subElements.size(); i++ )\r
+       for ( i = 0; i < node->subElements.size (); i++ )\r
                ProcessXMLSubElement ( *node->subElements[i], path );\r
-       for ( i = 0; i < modules.size(); i++ )\r
-               modules[i]->ProcessXML();\r
-       for ( i = 0; i < includes.size(); i++ )\r
-               includes[i]->ProcessXML();\r
-       for ( i = 0; i < defines.size(); i++ )\r
-               defines[i]->ProcessXML();\r
-       for ( i = 0; i < linkerFlags.size(); i++ )\r
-               linkerFlags[i]->ProcessXML();\r
+       for ( i = 0; i < modules.size (); i++ )\r
+               modules[i]->ProcessXML ();\r
+       for ( i = 0; i < includes.size (); i++ )\r
+               includes[i]->ProcessXML ();\r
+       for ( i = 0; i < defines.size (); i++ )\r
+               defines[i]->ProcessXML ();\r
+       for ( i = 0; i < linkerFlags.size (); i++ )\r
+               linkerFlags[i]->ProcessXML ();\r
        for ( i = 0; i < properties.size(); i++ )\r
-               properties[i]->ProcessXML();\r
-       for ( i = 0; i < ifs.size(); i++ )\r
-               ifs[i]->ProcessXML();\r
+               properties[i]->ProcessXML ();\r
+       for ( i = 0; i < ifs.size (); i++ )\r
+               ifs[i]->ProcessXML ();\r
+       for ( i = 0; i < cdfiles.size (); i++ )\r
+               ifs[i]->ProcessXML ();\r
 }\r
 \r
 void\r
 Project::ProcessXMLSubElement ( const XMLElement& e,\r
                                 const string& path,\r
-                                If* pIf /*= NULL*/ )\r
+                                If* pIf )\r
 {\r
        bool subs_invalid = false;\r
        string subpath(path);\r
@@ -255,6 +259,12 @@ Project::ProcessXMLSubElement ( const XMLElement& e,
                modules.push_back ( module );\r
                return; // defer processing until later\r
        }\r
+       else if ( e.name == "cdfile" )\r
+       {\r
+               CDFile* cdfile = new CDFile ( *this, e, path );\r
+               cdfiles.push_back ( cdfile );\r
+               subs_invalid = true;\r
+       }\r
        else if ( e.name == "directory" )\r
        {\r
                const XMLAttribute* att = e.GetAttribute ( "name", true );\r
index 4d8572a..fd38de8 100644 (file)
@@ -52,6 +52,7 @@ class LinkerFlag;
 class Property;\r
 class AutomaticDependency;\r
 class Bootstrap;\r
+class CDFile;\r
 \r
 class SourceFileTest;\r
 \r
@@ -68,6 +69,7 @@ public:
        std::vector<LinkerFlag*> linkerFlags;\r
        std::vector<Property*> properties;\r
        std::vector<If*> ifs;\r
+       std::vector<CDFile*> cdfiles;\r
 \r
        Project ( const std::string& filename );\r
        ~Project ();\r
@@ -472,6 +474,25 @@ private:
 };\r
 \r
 \r
+class CDFile\r
+{\r
+public:\r
+       const Project& project;\r
+       const XMLElement& node;\r
+       std::string name;\r
+       std::string base;\r
+       std::string nameoncd;\r
+       std::string path;\r
+\r
+       CDFile ( const Project& project,\r
+                const XMLElement& bootstrapNode,\r
+                const std::string& path );\r
+       ~CDFile ();\r
+       void ProcessXML();\r
+       std::string GetPath () const;\r
+};\r
+\r
+\r
 extern std::string\r
 FixSeparator ( const std::string& s );\r
 \r
index a5dcc76..74ae806 100644 (file)
@@ -161,6 +161,24 @@ Elements:
        None.\r
 \r
 \r
+CDFile element\r
+--------------\r
+A cdfile element specifies the name of a file that is to be put on the bootable CD.\r
+\r
+Syntax:\r
+       <cdfile base="reactos" nameoncd="ReadMe.txt">ReadMe.txt</cdfile>\r
+\r
+Attributes:\r
+       base - Put file in this directory on the bootable CD. This attribute is optional.\r
+       nameoncd - Name of file on the bootable CD. This attribute is optional.\r
+\r
+Value:\r
+       Name of file.\r
+\r
+Elements:\r
+       None.\r
+\r
+\r
 Define element\r
 --------------\r
 A define element specifies the name and (optionally) value of a define for the C/C++ compiler and resource compiler.\r
@@ -211,7 +229,7 @@ Value:
        None.\r
 \r
 Elements:\r
-       directory, file, if, property.\r
+       cdfile, directory, file, if, property.\r
 \r
 \r
 File element\r
index fe5becc..a18d223 100644 (file)
@@ -4,6 +4,8 @@
 #include "rbuild.h"\r
 #include "backend/mingw/mingw.h"\r
 \r
+#define RBUILD_BASE "tools" SSEP "rbuild" SSEP\r
+       \r
 class BaseTest\r
 {\r
 public:\r
@@ -117,4 +119,11 @@ private:
 \r
 };\r
 \r
+\r
+class CDFileTest : public BaseTest\r
+{\r
+public:\r
+       void Run ();\r
+};\r
+\r
 #endif /* __TEST_H */\r
index 228141a..48a538f 100644 (file)
@@ -178,6 +178,7 @@ private:
                tests.push_back(new IfTest());\r
                tests.push_back(new FunctionTest());\r
                tests.push_back(new SourceFileTest());\r
+               tests.push_back(new CDFileTest());\r
        }\r
 };\r
 \r
diff --git a/reactos/tools/rbuild/tests/cdfiletest.cpp b/reactos/tools/rbuild/tests/cdfiletest.cpp
new file mode 100644 (file)
index 0000000..7172099
--- /dev/null
@@ -0,0 +1,22 @@
+#include "test.h"\r
+\r
+using std::string;\r
+\r
+void CDFileTest::Run()\r
+{\r
+       string projectFilename ( RBUILD_BASE "tests/data/cdfile.xml" );\r
+       Project project( projectFilename );\r
+       ARE_EQUAL ( 3, project.cdfiles.size () );\r
+\r
+       CDFile& cdfile1 = *project.cdfiles[0];\r
+       ARE_EQUAL("dir1", cdfile1.base);\r
+       ARE_EQUAL("ReadMe1.txt", cdfile1.nameoncd);\r
+\r
+       CDFile& cdfile2 = *project.cdfiles[1];\r
+       ARE_EQUAL("dir2", cdfile2.base);\r
+       ARE_EQUAL("readme2.txt", cdfile2.nameoncd);\r
+\r
+       CDFile& cdfile3 = *project.cdfiles[2];\r
+       //ARE_EQUAL("", cdfile3.base);\r
+       ARE_EQUAL("readme3.txt", cdfile3.nameoncd);\r
+}\r
index 646dc52..6fa14b1 100644 (file)
@@ -1,11 +1,15 @@
 <?xml version="1.0" ?>\r
 <project name="Project" makefile="Makefile">\r
-       <directory name="tests">\r
-               <directory name="data">\r
-                       <module name="module1" type="buildtool">\r
-                               <include base="module1">.</include>\r
-                               <file>sourcefile1.c</file>\r
-                       </module>\r
+       <directory name="tools">\r
+               <directory name="rbuild">\r
+                       <directory name="tests">\r
+                               <directory name="data">\r
+                                       <module name="module1" type="buildtool">\r
+                                               <include base="module1">.</include>\r
+                                               <file>sourcefile1.c</file>\r
+                                       </module>\r
+                               </directory>\r
+                       </directory>\r
                </directory>\r
        </directory>\r
 </project>\r
index 8dcf720..de713cf 100644 (file)
@@ -1,12 +1,16 @@
 <?xml version="1.0" ?>\r
 <project name="Project" makefile="Makefile">\r
-       <directory name="tests">\r
-               <directory name="data">\r
-                       <module name="module1" type="buildtool">\r
-                               <include base="module1">.</include>\r
-                               <include base="module1">sourcefile1</include>\r
-                               <file>sourcefile_include.c</file>\r
-                       </module>\r
+       <directory name="tools">\r
+               <directory name="rbuild">\r
+                       <directory name="tests">\r
+                               <directory name="data">\r
+                                       <module name="module1" type="buildtool">\r
+                                               <include base="module1">.</include>\r
+                                               <include base="module1">sourcefile1</include>\r
+                                               <file>sourcefile_include.c</file>\r
+                                       </module>\r
+                               </directory>\r
+                       </directory>\r
                </directory>\r
        </directory>\r
 </project>\r
diff --git a/reactos/tools/rbuild/tests/data/cdfile.xml b/reactos/tools/rbuild/tests/data/cdfile.xml
new file mode 100644 (file)
index 0000000..ef69d76
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" ?>\r
+<project name="Project" makefile="Makefile">\r
+       <directory name="dir1">\r
+               <cdfile base="dir1" nameoncd="ReadMe1.txt">readme1.txt</cdfile>\r
+               <cdfile base="dir2">readme2.txt</cdfile>\r
+               <cdfile>readme3.txt</cdfile>\r
+       </directory>\r
+</project>\r
index ad05946..a368891 100644 (file)
@@ -4,7 +4,7 @@ using std::string;
 \r
 void DefineTest::Run()\r
 {\r
-       string projectFilename ( "tests/data/define.xml" );\r
+       string projectFilename ( RBUILD_BASE "tests/data/define.xml" );\r
        Project project ( projectFilename );\r
        ARE_EQUAL(1, project.defines.size());\r
        Define& define1 = *project.defines[0];\r
index 2f4133d..adc82e3 100644 (file)
@@ -4,7 +4,7 @@ using std::string;
 \r
 void IfTest::Run()\r
 {\r
-       string projectFilename ( "tests/data/if.xml" );\r
+       string projectFilename ( RBUILD_BASE "tests/data/if.xml" );\r
        Project project ( projectFilename );\r
 \r
        ARE_EQUAL ( 1, project.modules.size () );\r
index aa6891f..338bf21 100644 (file)
@@ -4,7 +4,7 @@ using std::string;
 \r
 void IncludeTest::Run()\r
 {\r
-       string projectFilename ( "tests/data/include.xml" );\r
+       string projectFilename ( RBUILD_BASE "tests/data/include.xml" );\r
        Project project ( projectFilename );\r
        ARE_EQUAL(1, project.includes.size());\r
        Include& include1 = *project.includes[0];\r
index bfefc6a..b129ac1 100644 (file)
@@ -4,7 +4,7 @@ using std::string;
 \r
 void InvokeTest::Run()\r
 {\r
-       string projectFilename ( "tests/data/invoke.xml" );\r
+       string projectFilename ( RBUILD_BASE "tests/data/invoke.xml" );\r
        Project project ( projectFilename );\r
        ARE_EQUAL(1, project.modules.size());\r
 \r
index 1445fa8..4e80452 100644 (file)
@@ -4,7 +4,7 @@ using std::string;
 \r
 void LinkerFlagTest::Run()\r
 {\r
-       string projectFilename ( "tests/data/linkerflag.xml" );\r
+       string projectFilename ( RBUILD_BASE "tests/data/linkerflag.xml" );\r
        Project project ( projectFilename );\r
        ARE_EQUAL(1, project.linkerFlags.size());\r
        LinkerFlag& linkerFlag1 = *project.linkerFlags[0];\r
index 42777d2..949f922 100644 (file)
@@ -4,7 +4,7 @@ using std::string;
 \r
 void ModuleTest::Run()\r
 {\r
-       string projectFilename ( "tests/data/module.xml" );\r
+       string projectFilename ( RBUILD_BASE "tests/data/module.xml" );\r
        Project project ( projectFilename );\r
        ARE_EQUAL(2, project.modules.size());\r
 \r
index 6b66b87..71d5b54 100644 (file)
@@ -4,7 +4,7 @@ using std::string;
 \r
 void ProjectTest::Run()\r
 {\r
-       string projectFilename ( "tests/data/project.xml" );\r
+       string projectFilename ( RBUILD_BASE "tests/data/project.xml" );\r
        Project project( projectFilename );\r
        ARE_EQUAL(2, project.modules.size());\r
 }\r
index b67c961..2f5c990 100644 (file)
@@ -34,26 +34,26 @@ SourceFileTest::IsParentOf ( const SourceFile* parent,
 void\r
 SourceFileTest::IncludeTest ()\r
 {\r
-       const Project project ( "tests" SSEP "data" SSEP "automaticdependency_include.xml" );\r
+       const Project project ( RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency_include.xml" );\r
        AutomaticDependency automaticDependency ( project );\r
        automaticDependency.Process ();\r
        ARE_EQUAL( 4, automaticDependency.sourcefile_map.size () );\r
-       const SourceFile* include = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile_include.h" );\r
+       const SourceFile* include = automaticDependency.RetrieveFromCache ( "." SSEP RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile_include.h" );\r
        IS_NOT_NULL( include );\r
-       const SourceFile* includenext = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile1" SSEP "sourcefile_includenext.h" );\r
+       const SourceFile* includenext = automaticDependency.RetrieveFromCache ( "." SSEP RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile1" SSEP "sourcefile_includenext.h" );\r
        IS_NOT_NULL( includenext );\r
 }\r
 \r
 void\r
 SourceFileTest::FullParseTest ()\r
 {\r
-       const Project project ( "tests" SSEP "data" SSEP "automaticdependency.xml" );\r
+       const Project project ( RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency.xml" );\r
        AutomaticDependency automaticDependency ( project );\r
        automaticDependency.Process ();\r
        ARE_EQUAL( 5, automaticDependency.sourcefile_map.size () );\r
-       const SourceFile* header1 = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile1_header1.h" );\r
+       const SourceFile* header1 = automaticDependency.RetrieveFromCache ( "." SSEP RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile1_header1.h" );\r
        IS_NOT_NULL( header1 );\r
-       const SourceFile* recurse = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile1_recurse.h" );\r
+       const SourceFile* recurse = automaticDependency.RetrieveFromCache ( "." SSEP RBUILD_BASE"tests" SSEP "data" SSEP "sourcefile1_recurse.h" );\r
        IS_NOT_NULL( recurse );\r
        IS_TRUE( IsParentOf ( header1,\r
                              recurse ) );\r