NUL = NUL
endif
-ifneq ($(ROS_INTERMEDIATE),)
-$(ROS_INTERMEDIATE)tools: $(ROS_INTERMEDIATE)
- ${nmkdir} $(ROS_INTERMEDIATE)tools
-endif
-
ifneq ($(ROS_INTERMEDIATE),)
$(ROS_INTERMEDIATE):
${nmkdir} $(ROS_INTERMEDIATE)
+$(ROS_INTERMEDIATE)tools: $(ROS_INTERMEDIATE)
+ ${nmkdir} $@
+$(ROS_INTERMEDIATE)dk: $(ROS_INTERMEDIATE)
+ ${nkmdir} $@
+$(ROS_INTERMEDIATE)dk$(SEP)nkm: $(ROS_INTERMEDIATE)dk
+ ${nkmdir} $@
endif
+$(ROS_INTERMEDIATE)dk$(SEP)nkm$(SEP)lib: $(ROS_INTERMEDIATE)dk$(SEP)nkm
+ ${nmkdir} $@
+
NTOSKRNL_MC = .$(SEP)ntoskrnl$(SEP)ntoskrnl.mc
KERNEL32_MC = .$(SEP)lib$(SEP)kernel32$(SEP)kernel32.mc
BUILDNO_H = .$(SEP)include$(SEP)reactos$(SEP)buildno.h
vout.push_back ( vpath[i++] );\r
\r
// now merge vout into a string again\r
- string out = ".";\r
- for ( i = 0; i < vout.size(); i++ )\r
+ string out = vout[0];\r
+ for ( i = 1; i < vout.size(); i++ )\r
{\r
out += "/" + vout[i];\r
}\r
return s2;\r
}\r
\r
+string\r
+GetSubPath (\r
+ const string& location,\r
+ const string& path,\r
+ const string& att_value )\r
+{\r
+ if ( !att_value.size() )\r
+ throw InvalidBuildFileException (\r
+ location,\r
+ "<directory> tag has empty 'name' attribute" );\r
+ if ( strpbrk ( att_value.c_str (), "/\\?*:<>|" ) )\r
+ throw InvalidBuildFileException (\r
+ location,\r
+ "<directory> tag has invalid characters in 'name' attribute" );\r
+ if ( !path.size() )\r
+ return att_value;\r
+ return FixSeparator(path + CSEP + att_value);\r
+}\r
+\r
string\r
GetExtension ( const string& filename )\r
{\r
{\r
const XMLAttribute* att = e.GetAttribute ( "name", true );\r
assert(att);\r
- subpath = FixSeparator ( path + CSEP + att->value );\r
+ subpath = GetSubPath ( e.location, path, att->value );\r
}\r
else if ( e.name == "include" )\r
{\r
{\r
if ( HasImportLibrary () )\r
{\r
- return ssprintf ( "dk%snkm%slib%slib%s.a",\r
- SSEP,\r
- SSEP,\r
- SSEP,\r
+ return ssprintf ( "dk%cnkm%clib%clib%s.a",\r
+ CSEP,\r
+ CSEP,\r
+ CSEP,\r
name.c_str () );\r
}\r
else\r
if ( head->subElements[i]->name == "project" )\r
{\r
node = head->subElements[i];\r
- this->ProcessXML ( "." );\r
+ string path;\r
+ this->ProcessXML ( path );\r
return;\r
}\r
}\r
{\r
const XMLAttribute* att = e.GetAttribute ( "name", true );\r
assert(att);\r
- subpath = path + CSEP + att->value;\r
+ subpath = GetSubPath ( e.location, path, att->value );\r
}\r
else if ( e.name == "include" )\r
{\r
#ifdef WIN32\r
#include <direct.h>\r
#include <io.h>\r
-#endif\r
+#endif/*WIN32*/\r
#include <sys/stat.h>\r
#include <time.h>\r
#ifdef _MSC_VER\r
#include <sys/utime.h>\r
-#else\r
+#else/*_MSC_VER*/\r
#include <utime.h>\r
+#ifdef WIN32\r
#include <process.h>\r
-#endif\r
+#endif/*WIN32*/\r
+#endif/*_MSC_VER*/\r
\r
#include "ssprintf.h"\r
#include "exception.h"\r
void ProcessXML();\r
};\r
\r
-\r
extern std::string\r
FixSeparator ( const std::string& s );\r
\r
+extern std::string\r
+GetSubPath (\r
+ const std::string& location,\r
+ const std::string& path,\r
+ const std::string& att_value );\r
+\r
extern std::string\r
GetExtension ( const std::string& filename );\r
\r