diff --git a/reactos/tools/rbuild/XML.cpp b/reactos/tools/rbuild/XML.cpp index f3317a2f8d3..3935dd3bc3c 100644 --- a/reactos/tools/rbuild/XML.cpp +++ b/reactos/tools/rbuild/XML.cpp @@ -1,8 +1,6 @@ // XML.cpp -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#endif//_MSC_VER +#include "pch.h" #include #include @@ -51,6 +49,8 @@ filelen ( FILE* f ) Path::Path() { + if ( !working_directory.size() ) + InitWorkingDirectory(); string s ( working_directory ); const char* p = strtok ( &s[0], "/\\" ); while ( p ) diff --git a/reactos/tools/rbuild/XML.h b/reactos/tools/rbuild/XML.h index f3cbec81cf5..f8fbd54609a 100644 --- a/reactos/tools/rbuild/XML.h +++ b/reactos/tools/rbuild/XML.h @@ -1,10 +1,9 @@ // XML.h -#ifndef __XML_H -#define __XML_H +#ifndef XML_H +#define XML_H -#include -#include +#include "pch.h" void InitWorkingDirectory(); @@ -80,4 +79,4 @@ XMLParse(XMLFile& f, const Path& path, bool* pend_tag = NULL); -#endif//__XML_H +#endif//XML_H diff --git a/reactos/tools/rbuild/backend/backend.cpp b/reactos/tools/rbuild/backend/backend.cpp index 148a5a5acf3..385d0ee7693 100644 --- a/reactos/tools/rbuild/backend/backend.cpp +++ b/reactos/tools/rbuild/backend/backend.cpp @@ -1,6 +1,5 @@ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#endif//_MSC_VER + +#include "../pch.h" #include "../Rbuild.h" #include "backend.h" diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index f72f780608c..1734c1ed742 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -1,8 +1,6 @@ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#endif//_MSC_VER -//#include // mingw proves it's insanity once again +#include "../../pch.h" + #include "mingw.h" MingwBackend::MingwBackend(Project& project) diff --git a/reactos/tools/rbuild/exception.cpp b/reactos/tools/rbuild/exception.cpp index 3ac9418e5ca..8895f0dbca7 100644 --- a/reactos/tools/rbuild/exception.cpp +++ b/reactos/tools/rbuild/exception.cpp @@ -1,8 +1,6 @@ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#endif//_MSC_VER -#include +#include "pch.h" + #include "rbuild.h" using std::string; diff --git a/reactos/tools/rbuild/exception.h b/reactos/tools/rbuild/exception.h index 8adec17e081..bd6525db11f 100644 --- a/reactos/tools/rbuild/exception.h +++ b/reactos/tools/rbuild/exception.h @@ -1,7 +1,7 @@ #ifndef __EXCEPTION_H #define __EXCEPTION_H -#include +#include "pch.h" class Exception { diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp index 29cb0e85911..736431438c1 100644 --- a/reactos/tools/rbuild/module.cpp +++ b/reactos/tools/rbuild/module.cpp @@ -1,8 +1,6 @@ // module.cpp -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#endif//_MSC_VER +#include "pch.h" #include "rbuild.h" diff --git a/reactos/tools/rbuild/pch.h b/reactos/tools/rbuild/pch.h new file mode 100644 index 00000000000..1274c0687a0 --- /dev/null +++ b/reactos/tools/rbuild/pch.h @@ -0,0 +1,15 @@ +// pre-compiled header stuff + +#ifndef PCH_H +#define PCH_H + +#ifdef _MSC_VER +#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information +#endif//_MSC_VER + +#include +#include + +#include + +#endif//PCH_H diff --git a/reactos/tools/rbuild/project.cpp b/reactos/tools/rbuild/project.cpp index dc56ee92f34..dfa1a29908f 100644 --- a/reactos/tools/rbuild/project.cpp +++ b/reactos/tools/rbuild/project.cpp @@ -1,6 +1,5 @@ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#endif//_MSC_VER + +#include "pch.h" #include "rbuild.h" diff --git a/reactos/tools/rbuild/rbuild.cpp b/reactos/tools/rbuild/rbuild.cpp index 722289f6ad2..f8604984bdd 100644 --- a/reactos/tools/rbuild/rbuild.cpp +++ b/reactos/tools/rbuild/rbuild.cpp @@ -1,12 +1,11 @@ // rbuild.cpp -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#endif//_MSC_VER +#include "pch.h" #include #include #include + #include "rbuild.h" using std::string; @@ -15,8 +14,6 @@ using std::vector; int main ( int argc, char** argv ) { - InitWorkingDirectory(); - try { string projectFilename ( "ReactOS.xml" ); @@ -31,7 +28,8 @@ main ( int argc, char** argv ) printf ( "\t%s in folder: %s\n", m.name.c_str(), m.path.c_str() ); - printf ( "\txml dependencies:\n\t\tReactOS.xml\n" ); + printf ( "\txml dependencies:\n\t\t%s\n", + projectFilename.c_str() ); const XMLElement* e = &m.node; while ( e ) { diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h index d1d5b93db21..af0314a69cc 100644 --- a/reactos/tools/rbuild/rbuild.h +++ b/reactos/tools/rbuild/rbuild.h @@ -1,8 +1,8 @@ #ifndef __RBUILD_H #define __RBUILD_H -#include -#include +#include "pch.h" + #include "ssprintf.h" #include "exception.h" #include "XML.h" diff --git a/reactos/tools/rbuild/tests/alltests.cpp b/reactos/tools/rbuild/tests/alltests.cpp index e4bd899bb45..4698a4ca640 100644 --- a/reactos/tools/rbuild/tests/alltests.cpp +++ b/reactos/tools/rbuild/tests/alltests.cpp @@ -1,4 +1,6 @@ -#include + +#include "pch.h" + #include "rbuild.h" #include "test.h"