7 #include "modulehandler.h"
10 #define MKDIR(s) mkdir(s)
12 #define MKDIR(s) mkdir(s, 0755)
20 typedef set
<string
> set_string
;
24 v2s ( const string_list
& v
, int wrap_at
)
30 for ( size_t i
= 0; i
< v
.size(); i
++ )
34 if ( wrap_at
> 0 && wrap_count
++ == wrap_at
)
44 Directory::Directory ( const string
& name_
)
50 Directory::Add ( const char* subdir
)
53 string s1
= string ( subdir
);
54 if ( ( i
= s1
.find ( '$' ) ) != string::npos
)
56 throw InvalidOperationException ( __FILE__
,
58 "No environment variables can be used here. Path was %s",
62 const char* p
= strpbrk ( subdir
, "/\\" );
64 p
= subdir
+ strlen(subdir
);
65 string
s ( subdir
, p
-subdir
);
66 if ( subdirs
.find(s
) == subdirs
.end() )
67 subdirs
[s
] = new Directory(s
);
69 subdirs
[s
]->Add ( p
);
73 Directory::mkdir_p ( const char* path
)
76 directory
= opendir ( path
);
77 if ( directory
!= NULL
)
79 closedir ( directory
);
83 if ( MKDIR ( path
) != 0 )
84 throw AccessDeniedException ( string ( path
) );
89 Directory::CreateDirectory ( string path
)
93 if ( isalpha ( path
[0] ) && path
[1] == ':' && path
[2] == CSEP
)
95 nextIndex
= path
.find ( CSEP
, 3);
98 nextIndex
= path
.find ( CSEP
);
100 bool directoryWasCreated
= false;
101 while ( nextIndex
!= string::npos
)
103 nextIndex
= path
.find ( CSEP
, index
+ 1 );
104 directoryWasCreated
= mkdir_p ( path
.substr ( 0, nextIndex
).c_str () );
107 return directoryWasCreated
;
111 Directory::ReplaceVariable ( string name
,
115 size_t i
= path
.find ( name
);
116 if ( i
!= string::npos
)
117 return path
.replace ( i
, name
.length (), value
);
123 Directory::ResolveVariablesInPath ( char* buf
,
126 string s
= ReplaceVariable ( "$(INTERMEDIATE)", Environment::GetIntermediatePath (), path
);
127 s
= ReplaceVariable ( "$(OUTPUT)", Environment::GetOutputPath (), s
);
128 s
= ReplaceVariable ( "$(INSTALL)", Environment::GetInstallPath (), s
);
129 strcpy ( buf
, s
.c_str () );
133 Directory::GenerateTree ( const string
& parent
,
138 if ( parent
.size () > 0 )
142 path
= parent
+ SSEP
+ name
;
143 ResolveVariablesInPath ( buf
, path
);
144 if ( CreateDirectory ( buf
) && verbose
)
145 printf ( "Created %s\n", buf
);
150 for ( directory_map::iterator i
= subdirs
.begin ();
154 i
->second
->GenerateTree ( path
, verbose
);
159 Directory::EscapeSpaces ( string path
)
166 newpath
= newpath
+ "\\ ";
168 newpath
= newpath
+ *p
;
175 Directory::CreateRule ( FILE* f
,
176 const string
& parent
)
180 if ( parent
.size() > 0 )
182 string escapedParent
= EscapeSpaces ( parent
);
185 escapedParent
.c_str (),
187 EscapeSpaces ( name
).c_str (),
188 escapedParent
.c_str () );
191 "\t$(ECHO_MKDIR)\n" );
196 path
= parent
+ SSEP
+ name
;
201 for ( directory_map::iterator i
= subdirs
.begin();
205 i
->second
->CreateRule ( f
, path
);
210 static class MingwFactory
: public Backend::Factory
213 MingwFactory() : Factory ( "mingw" ) {}
214 Backend
* operator() ( Project
& project
,
215 Configuration
& configuration
)
217 return new MingwBackend ( project
,
223 MingwBackend::MingwBackend ( Project
& project
,
224 Configuration
& configuration
)
225 : Backend ( project
, configuration
),
226 intermediateDirectory ( new Directory ("$(INTERMEDIATE)" ) ),
227 outputDirectory ( new Directory ( "$(OUTPUT)" ) ),
228 installDirectory ( new Directory ( "$(INSTALL)" ) )
233 MingwBackend::~MingwBackend()
235 delete intermediateDirectory
;
236 delete outputDirectory
;
237 delete installDirectory
;
241 MingwBackend::AddDirectoryTarget ( const string
& directory
,
242 Directory
* directoryTree
)
244 if ( directory
.length () > 0)
245 directoryTree
->Add ( directory
.c_str() );
246 return directoryTree
->name
;
250 MingwBackend::ProcessModules ()
252 printf ( "Processing modules..." );
254 vector
<MingwModuleHandler
*> v
;
256 for ( i
= 0; i
< ProjectNode
.modules
.size (); i
++ )
258 Module
& module
= *ProjectNode
.modules
[i
];
259 MingwModuleHandler
* h
= MingwModuleHandler::InstanciateHandler (
262 if ( module
.host
== HostDefault
)
264 module
.host
= h
->DefaultHost();
265 assert ( module
.host
!= HostDefault
);
270 size_t iend
= v
.size ();
272 for ( i
= 0; i
< iend
; i
++ )
273 v
[i
]->GenerateObjectMacro();
274 fprintf ( fMakefile
, "\n" );
275 for ( i
= 0; i
< iend
; i
++ )
276 v
[i
]->GenerateTargetMacro();
277 fprintf ( fMakefile
, "\n" );
279 GenerateAllTarget ( v
);
280 GenerateInitTarget ();
281 GenerateRegTestsRunTarget ();
283 for ( i
= 0; i
< iend
; i
++ )
284 v
[i
]->GenerateOtherMacros();
286 for ( i
= 0; i
< iend
; i
++ )
288 MingwModuleHandler
& h
= *v
[i
];
289 h
.GeneratePreconditionDependencies ();
291 h
.GenerateInvocations ();
292 h
.GenerateCleanTarget ();
293 h
.GenerateInstallTarget ();
301 MingwBackend::Process ()
304 DetectNetwideAssembler ();
305 DetectPipeSupport ();
309 GenerateGlobalVariables ();
310 GenerateXmlBuildFilesMacro ();
312 GenerateInstallTarget ();
313 GenerateTestTarget ();
314 GenerateDirectoryTargets ();
315 GenerateDirectories ();
316 UnpackWineResources ();
317 GenerateTestSupportCode ();
318 GenerateProxyMakefiles ();
319 CheckAutomaticDependencies ();
324 MingwBackend::CreateMakefile ()
326 fMakefile
= fopen ( ProjectNode
.makefile
.c_str (), "w" );
328 throw AccessDeniedException ( ProjectNode
.makefile
);
329 MingwModuleHandler::SetBackend ( this );
330 MingwModuleHandler::SetMakefile ( fMakefile
);
331 MingwModuleHandler::SetUsePch ( use_pch
);
335 MingwBackend::CloseMakefile () const
338 fclose ( fMakefile
);
342 MingwBackend::GenerateHeader () const
344 fprintf ( fMakefile
, "# THIS FILE IS AUTOMATICALLY GENERATED, EDIT 'ReactOS.xml' INSTEAD\n\n" );
348 MingwBackend::GenerateIncludesAndDefines ( IfableData
& data
) const
350 string includeParameters
= MingwModuleHandler::GenerateGccIncludeParametersFromVector ( data
.includes
);
351 string defineParameters
= MingwModuleHandler::GenerateGccDefineParametersFromVector ( data
.defines
);
352 return includeParameters
+ " " + defineParameters
;
356 MingwBackend::GenerateProjectCFlagsMacro ( const char* assignmentOperation
,
357 IfableData
& data
) const
362 assignmentOperation
);
366 GenerateIncludesAndDefines ( data
).c_str() );
368 fprintf ( fMakefile
, "\n" );
372 MingwBackend::GenerateGlobalCFlagsAndProperties (
373 const char* assignmentOperation
,
374 IfableData
& data
) const
378 for ( i
= 0; i
< data
.properties
.size(); i
++ )
380 Property
& prop
= *data
.properties
[i
];
381 fprintf ( fMakefile
, "%s := %s\n",
383 prop
.value
.c_str() );
386 if ( data
.includes
.size() || data
.defines
.size() )
388 GenerateProjectCFlagsMacro ( assignmentOperation
,
392 for ( i
= 0; i
< data
.ifs
.size(); i
++ )
394 If
& rIf
= *data
.ifs
[i
];
395 if ( rIf
.data
.defines
.size()
396 || rIf
.data
.includes
.size()
397 || rIf
.data
.ifs
.size() )
401 "ifeq (\"$(%s)\",\"%s\")\n",
402 rIf
.property
.c_str(),
404 GenerateGlobalCFlagsAndProperties (
415 MingwBackend::GenerateProjectGccOptionsMacro ( const char* assignmentOperation
,
416 IfableData
& data
) const
422 "PROJECT_GCCOPTIONS %s",
423 assignmentOperation
);
425 for ( i
= 0; i
< data
.compilerFlags
.size(); i
++ )
430 data
.compilerFlags
[i
]->flag
.c_str() );
433 fprintf ( fMakefile
, "\n" );
437 MingwBackend::GenerateProjectGccOptions (
438 const char* assignmentOperation
,
439 IfableData
& data
) const
443 if ( data
.compilerFlags
.size() )
445 GenerateProjectGccOptionsMacro ( assignmentOperation
,
449 for ( i
= 0; i
< data
.ifs
.size(); i
++ )
451 If
& rIf
= *data
.ifs
[i
];
452 if ( rIf
.data
.compilerFlags
.size()
453 || rIf
.data
.ifs
.size() )
457 "ifeq (\"$(%s)\",\"%s\")\n",
458 rIf
.property
.c_str(),
460 GenerateProjectGccOptions (
471 MingwBackend::GenerateProjectLFLAGS () const
474 for ( size_t i
= 0; i
< ProjectNode
.linkerFlags
.size (); i
++ )
476 LinkerFlag
& linkerFlag
= *ProjectNode
.linkerFlags
[i
];
477 if ( lflags
.length () > 0 )
479 lflags
+= linkerFlag
.flag
;
485 MingwBackend::GenerateGlobalVariables () const
489 compilerPrefix
.c_str () );
492 nasmCommand
.c_str () );
494 GenerateGlobalCFlagsAndProperties ( "=", ProjectNode
.non_if_data
);
495 GenerateProjectGccOptions ( "=", ProjectNode
.non_if_data
);
497 fprintf ( fMakefile
, "PROJECT_RCFLAGS := $(PROJECT_CFLAGS)\n" );
498 fprintf ( fMakefile
, "PROJECT_WIDLFLAGS := $(PROJECT_CFLAGS)\n" );
499 fprintf ( fMakefile
, "PROJECT_LFLAGS := %s\n",
500 GenerateProjectLFLAGS ().c_str () );
501 fprintf ( fMakefile
, "PROJECT_CFLAGS += -Wall\n" );
502 fprintf ( fMakefile
, "PROJECT_CFLAGS += $(PROJECT_GCCOPTIONS)\n" );
503 fprintf ( fMakefile
, "\n" );
507 MingwBackend::IncludeInAllTarget ( const Module
& module
) const
509 if ( MingwModuleHandler::ReferenceObjects ( module
) )
511 if ( module
.type
== BootSector
)
513 if ( module
.type
== Iso
)
515 if ( module
.type
== LiveIso
)
517 if ( module
.type
== Test
)
523 MingwBackend::GenerateAllTarget ( const vector
<MingwModuleHandler
*>& handlers
) const
525 fprintf ( fMakefile
, "all:" );
527 size_t iend
= handlers
.size ();
528 for ( size_t i
= 0; i
< iend
; i
++ )
530 const Module
& module
= handlers
[i
]->module
;
531 if ( IncludeInAllTarget ( module
) )
533 if ( wrap_count
++ == 5 )
534 fprintf ( fMakefile
, " \\\n\t\t" ), wrap_count
= 0;
537 GetTargetMacro(module
).c_str () );
540 fprintf ( fMakefile
, "\n\t\n\n" );
544 MingwBackend::GetBuildToolDependencies () const
547 for ( size_t i
= 0; i
< ProjectNode
.modules
.size (); i
++ )
549 Module
& module
= *ProjectNode
.modules
[i
];
550 if ( module
.type
== BuildTool
)
552 if ( dependencies
.length () > 0 )
554 dependencies
+= module
.GetDependencyPath ();
561 MingwBackend::GenerateInitTarget () const
565 GetBuildToolDependencies ().c_str () );
566 fprintf ( fMakefile
, "\n" );
570 MingwBackend::GenerateRegTestsRunTarget () const
573 "REGTESTS_RUN_TARGET = regtests.dll\n" );
575 "$(REGTESTS_RUN_TARGET):\n" );
577 "\t$(cp) $(REGTESTS_TARGET) $(REGTESTS_RUN_TARGET)\n" );
578 fprintf ( fMakefile
, "\n" );
582 MingwBackend::GenerateXmlBuildFilesMacro() const
585 "XMLBUILDFILES = %s \\\n",
586 ProjectNode
.GetProjectFilename ().c_str () );
587 string xmlbuildFilenames
;
588 int numberOfExistingFiles
= 0;
589 for ( size_t i
= 0; i
< ProjectNode
.xmlbuildfiles
.size (); i
++ )
591 XMLInclude
& xmlbuildfile
= *ProjectNode
.xmlbuildfiles
[i
];
592 if ( !xmlbuildfile
.fileExists
)
594 numberOfExistingFiles
++;
595 if ( xmlbuildFilenames
.length () > 0 )
596 xmlbuildFilenames
+= " ";
597 xmlbuildFilenames
+= NormalizeFilename ( xmlbuildfile
.topIncludeFilename
);
598 if ( numberOfExistingFiles
% 5 == 4 || i
== ProjectNode
.xmlbuildfiles
.size () - 1 )
602 xmlbuildFilenames
.c_str ());
603 if ( i
== ProjectNode
.xmlbuildfiles
.size () - 1 )
605 fprintf ( fMakefile
, "\n" );
612 xmlbuildFilenames
.resize ( 0 );
614 numberOfExistingFiles
++;
616 fprintf ( fMakefile
, "\n" );
620 MingwBackend::GetBin2ResExecutable ()
622 return NormalizeFilename ( Environment::GetOutputPath () + SSEP
+ "tools/bin2res/bin2res" + EXEPOSTFIX
);
626 MingwBackend::UnpackWineResources ()
628 printf ( "Unpacking WINE resources..." );
629 WineResource
wineResource ( ProjectNode
,
630 GetBin2ResExecutable () );
631 wineResource
.UnpackResources ( configuration
.Verbose
);
636 MingwBackend::GenerateTestSupportCode ()
638 printf ( "Generating test support code..." );
639 TestSupportCode
testSupportCode ( ProjectNode
);
640 testSupportCode
.GenerateTestSupportCode ( configuration
.Verbose
);
645 MingwBackend::GenerateProxyMakefiles ()
647 printf ( "Generating proxy makefiles..." );
648 ProxyMakefile
proxyMakefile ( ProjectNode
);
649 proxyMakefile
.GenerateProxyMakefiles ( configuration
.Verbose
);
654 MingwBackend::CheckAutomaticDependencies ()
656 if ( configuration
.AutomaticDependencies
)
658 printf ( "Checking automatic dependencies..." );
659 AutomaticDependency
automaticDependency ( ProjectNode
);
660 automaticDependency
.Process ();
661 automaticDependency
.CheckAutomaticDependencies ( configuration
.Verbose
);
667 MingwBackend::IncludeDirectoryTarget ( const string
& directory
) const
669 if ( directory
== "$(INTERMEDIATE)" SSEP
"tools")
676 MingwBackend::GenerateDirectories ()
678 printf ( "Creating directories..." );
679 intermediateDirectory
->GenerateTree ( "", configuration
.Verbose
);
680 outputDirectory
->GenerateTree ( "", configuration
.Verbose
);
681 if ( !configuration
.MakeHandlesInstallDirectories
)
682 installDirectory
->GenerateTree ( "", configuration
.Verbose
);
687 MingwBackend::TryToDetectThisCompiler ( const string
& compiler
)
689 string command
= ssprintf (
694 int exitcode
= system ( command
.c_str () );
695 return (exitcode
== 0);
699 MingwBackend::DetectCompiler ()
701 printf ( "Detecting compiler..." );
703 bool detectedCompiler
= false;
704 const string
& ROS_PREFIXValue
= Environment::GetVariable ( "ROS_PREFIX" );
705 if ( ROS_PREFIXValue
.length () > 0 )
707 compilerPrefix
= ROS_PREFIXValue
;
708 compilerCommand
= compilerPrefix
+ "-gcc";
709 detectedCompiler
= TryToDetectThisCompiler ( compilerCommand
);
712 if ( !detectedCompiler
)
715 compilerCommand
= "gcc";
716 detectedCompiler
= TryToDetectThisCompiler ( compilerCommand
);
719 if ( !detectedCompiler
)
721 compilerPrefix
= "mingw32";
722 compilerCommand
= compilerPrefix
+ "-gcc";
723 detectedCompiler
= TryToDetectThisCompiler ( compilerCommand
);
725 if ( detectedCompiler
)
726 printf ( "detected (%s)\n", compilerCommand
.c_str () );
728 printf ( "not detected\n" );
732 MingwBackend::TryToDetectThisNetwideAssembler ( const string
& assembler
)
734 string command
= ssprintf (
739 int exitcode
= system ( command
.c_str () );
740 return (exitcode
== 0);
744 MingwBackend::DetectNetwideAssembler ()
746 printf ( "Detecting netwide assembler..." );
748 nasmCommand
= "nasm";
749 bool detectedNasm
= TryToDetectThisNetwideAssembler ( nasmCommand
);
753 nasmCommand
= "nasmw";
754 detectedNasm
= TryToDetectThisNetwideAssembler ( nasmCommand
);
758 printf ( "detected (%s)\n", nasmCommand
.c_str () );
760 printf ( "not detected\n" );
764 MingwBackend::DetectPipeSupport ()
766 printf ( "Detecting compiler -pipe support..." );
768 string pipe_detection
= "tools" SSEP
"rbuild" SSEP
"backend" SSEP
"mingw" SSEP
"pipe_detection.c";
769 string pipe_detectionObjectFilename
= ReplaceExtension ( pipe_detection
,
771 string command
= ssprintf (
772 "%s -pipe -c %s -o %s 1>%s 2>%s",
773 compilerCommand
.c_str (),
774 pipe_detection
.c_str (),
775 pipe_detectionObjectFilename
.c_str (),
778 int exitcode
= system ( command
.c_str () );
779 FILE* f
= fopen ( pipe_detectionObjectFilename
.c_str (), "rb" );
782 usePipe
= (exitcode
== 0);
784 unlink ( pipe_detectionObjectFilename
.c_str () );
790 printf ( "detected\n" );
792 printf ( "not detected\n" );
796 MingwBackend::DetectPCHSupport ()
798 printf ( "Detecting compiler pre-compiled header support..." );
800 string path
= "tools" SSEP
"rbuild" SSEP
"backend" SSEP
"mingw" SSEP
"pch_detection.h";
801 string cmd
= ssprintf (
802 "%s -c %s 1>%s 2>%s",
803 compilerCommand
.c_str (),
807 system ( cmd
.c_str () );
810 FILE* f
= fopen ( path
.c_str (), "rb" );
815 unlink ( path
.c_str () );
821 printf ( "detected\n" );
823 printf ( "not detected\n" );
827 MingwBackend::GetNonModuleInstallTargetFiles (
828 vector
<string
>& out
) const
830 for ( size_t i
= 0; i
< ProjectNode
.installfiles
.size (); i
++ )
832 const InstallFile
& installfile
= *ProjectNode
.installfiles
[i
];
833 string targetFilenameNoFixup
= installfile
.base
+ SSEP
+ installfile
.newname
;
834 string targetFilename
= MingwModuleHandler::PassThruCacheDirectory (
835 NormalizeFilename ( targetFilenameNoFixup
),
837 out
.push_back ( targetFilename
);
842 MingwBackend::GetModuleInstallTargetFiles (
843 vector
<string
>& out
) const
845 for ( size_t i
= 0; i
< ProjectNode
.modules
.size (); i
++ )
847 const Module
& module
= *ProjectNode
.modules
[i
];
848 if ( module
.installName
.length () > 0 )
850 string targetFilenameNoFixup
;
851 if ( module
.installBase
.length () > 0 )
852 targetFilenameNoFixup
= module
.installBase
+ SSEP
+ module
.installName
;
854 targetFilenameNoFixup
= module
.installName
;
855 string targetFilename
= MingwModuleHandler::PassThruCacheDirectory (
856 NormalizeFilename ( targetFilenameNoFixup
),
858 out
.push_back ( targetFilename
);
864 MingwBackend::GetInstallTargetFiles (
865 vector
<string
>& out
) const
867 GetNonModuleInstallTargetFiles ( out
);
868 GetModuleInstallTargetFiles ( out
);
872 MingwBackend::OutputInstallTarget ( const string
& sourceFilename
,
873 const string
& targetFilename
,
874 const string
& targetDirectory
)
876 string fullTargetFilename
;
877 if ( targetDirectory
.length () > 0)
878 fullTargetFilename
= targetDirectory
+ SSEP
+ targetFilename
;
880 fullTargetFilename
= targetFilename
;
881 string normalizedTargetFilename
= MingwModuleHandler::PassThruCacheDirectory (
882 NormalizeFilename ( fullTargetFilename
),
884 string normalizedTargetDirectory
= MingwModuleHandler::PassThruCacheDirectory (
885 NormalizeFilename ( targetDirectory
),
889 normalizedTargetFilename
.c_str (),
890 sourceFilename
.c_str (),
891 normalizedTargetDirectory
.c_str () );
895 "\t${cp} %s %s 1>$(NUL)\n",
896 sourceFilename
.c_str (),
897 normalizedTargetFilename
.c_str () );
901 MingwBackend::OutputNonModuleInstallTargets ()
903 for ( size_t i
= 0; i
< ProjectNode
.installfiles
.size (); i
++ )
905 const InstallFile
& installfile
= *ProjectNode
.installfiles
[i
];
906 OutputInstallTarget ( installfile
.GetPath (),
913 MingwBackend::OutputModuleInstallTargets ()
915 for ( size_t i
= 0; i
< ProjectNode
.modules
.size (); i
++ )
917 const Module
& module
= *ProjectNode
.modules
[i
];
918 if ( module
.installName
.length () > 0 )
920 string sourceFilename
= MingwModuleHandler::PassThruCacheDirectory (
921 NormalizeFilename ( module
.GetPath () ),
923 OutputInstallTarget ( sourceFilename
,
925 module
.installBase
);
931 MingwBackend::GetRegistrySourceFiles ()
933 return "bootdata" SSEP
"hivecls.inf "
934 "bootdata" SSEP
"hivedef.inf "
935 "bootdata" SSEP
"hiveinst.inf "
936 "bootdata" SSEP
"hivesft.inf "
937 "bootdata" SSEP
"hivesys.inf";
941 MingwBackend::GetRegistryTargetFiles ()
943 string system32ConfigDirectory
= NormalizeFilename (
944 MingwModuleHandler::PassThruCacheDirectory (
945 "system32" SSEP
"config" SSEP
,
946 installDirectory
) );
947 return system32ConfigDirectory
+ SSEP
"default " +
948 system32ConfigDirectory
+ SSEP
"sam " +
949 system32ConfigDirectory
+ SSEP
"security " +
950 system32ConfigDirectory
+ SSEP
"software " +
951 system32ConfigDirectory
+ SSEP
"system";
955 MingwBackend::OutputRegistryInstallTarget ()
957 string system32ConfigDirectory
= NormalizeFilename (
958 MingwModuleHandler::PassThruCacheDirectory (
959 "system32" SSEP
"config" SSEP
,
960 installDirectory
) );
962 string registrySourceFiles
= GetRegistrySourceFiles ();
963 string registryTargetFiles
= GetRegistryTargetFiles ();
965 "install_registry: %s\n",
966 registryTargetFiles
.c_str () );
968 "%s: %s %s $(MKHIVE_TARGET)\n",
969 registryTargetFiles
.c_str (),
970 registrySourceFiles
.c_str (),
971 system32ConfigDirectory
.c_str () );
973 "\t$(ECHO_MKHIVE)\n" );
975 "\t$(MKHIVE_TARGET) bootdata %s bootdata" SSEP
"hiveinst.inf\n",
976 system32ConfigDirectory
.c_str () );
982 MingwBackend::GenerateInstallTarget ()
984 vector
<string
> vInstallTargetFiles
;
985 GetInstallTargetFiles ( vInstallTargetFiles
);
986 string installTargetFiles
= v2s ( vInstallTargetFiles
, 5 );
987 string registryTargetFiles
= GetRegistryTargetFiles ();
991 installTargetFiles
.c_str (),
992 registryTargetFiles
.c_str () );
993 OutputNonModuleInstallTargets ();
994 OutputModuleInstallTargets ();
995 OutputRegistryInstallTarget ();
1001 MingwBackend::GetModuleTestTargets (
1002 vector
<string
>& out
) const
1004 for ( size_t i
= 0; i
< ProjectNode
.modules
.size (); i
++ )
1006 const Module
& module
= *ProjectNode
.modules
[i
];
1007 if ( module
.type
== Test
)
1008 out
.push_back ( module
.name
);
1013 MingwBackend::GenerateTestTarget ()
1015 vector
<string
> vTestTargets
;
1016 GetModuleTestTargets ( vTestTargets
);
1017 string testTargets
= v2s ( vTestTargets
, 5 );
1019 fprintf ( fMakefile
,
1021 testTargets
.c_str () );
1022 fprintf ( fMakefile
,
1027 MingwBackend::GenerateDirectoryTargets ()
1029 intermediateDirectory
->CreateRule ( fMakefile
, "" );
1030 outputDirectory
->CreateRule ( fMakefile
, "" );
1031 installDirectory
->CreateRule ( fMakefile
, "" );