Author: hpoussin
Date: Sun Jul 27 03:26:42 2008
New Revision: 34830
URL:
http://svn.reactos.org/svn/reactos?rev=34830&view=rev
Log:
Preprocess kernel .spec files
Modified:
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Sun Jul 27
03:26:42 2008
@@ -334,13 +334,6 @@
ReplaceExtension ( module.name, ".temp.a" ) );
}
-bool
-MingwModuleHandler::IsGeneratedFile ( const File& file ) const
-{
- string extension = GetExtension ( file.file );
- return ( extension == ".spec" || extension == ".SPEC" );
-}
-
/*static*/ bool
MingwModuleHandler::ReferenceObjects (
const Module& module )
@@ -1201,6 +1194,20 @@
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).rc",
"$(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
+Rule winebuildKMRule (
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def:
$(source)$(dependencies) $(WINEBUILD_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
+ "\t$(ECHO_WINEBLD)\n"
+ "\t${gcc} -xc -E $(source) -I. >
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec\n"
+ "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o
$(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext).spec.def --def -E
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec\n"
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c:\n"
+ "\t${cp} $(NUL) $@ 1>$(NUL)\n"
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.o:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c$(dependencies) |
$(INTERMEDIATE)$(SEP)$(source_dir)\n"
+ "\t$(ECHO_CC)\n"
+ "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.o",
+ "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule winebuildRule (
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def:
$(source)$(dependencies) $(WINEBUILD_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WINEBLD)\n"
"\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o
$(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext).spec.def --def -E
$(source)\n"
@@ -1384,6 +1391,8 @@
{ HostDontCare, TypeDontCare, ".asm", &nasmRule },
{ HostDontCare, TypeDontCare, ".rc", &windresRule },
{ HostDontCare, TypeDontCare, ".mc", &wmcRule },
+ { HostFalse, Kernel, ".spec", &winebuildKMRule },
+ { HostFalse, KernelModeDLL, ".spec", &winebuildKMRule },
{ HostDontCare, TypeDontCare, ".spec", &winebuildRule },
{ HostDontCare, RpcServer, ".idl", &widlServerRule },
{ HostDontCare, RpcClient, ".idl", &widlClientRule },
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h [iso-8859-1] Sun Jul 27
03:26:42 2008
@@ -87,7 +87,6 @@
std::string GetExtraDependencies ( const FileLocation *file ) const;
std::string GetCompilationUnitDependencies ( const CompilationUnit& compilationUnit
) const;
const FileLocation* GetModuleArchiveFilename () const;
- bool IsGeneratedFile ( const File& file ) const;
std::string GetImportLibraryDependency ( const Module& importedModule );
void GetTargets ( const Module& dependencyModule,
string_list& targets );