summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza-oci@users.noreply.github.com>2010-06-10 20:45:07 +0000
committerAdam Mitz <mitza-oci@users.noreply.github.com>2010-06-10 20:45:07 +0000
commit13ac03e624e4cb9b14685b964cfddddee597e3dc (patch)
treee6ffd5504ef7e512dd404b5b64507c4a22583e0d
parent0a5133666666fa0c881d422f1dcda4bbd86ba8c3 (diff)
downloadMPC-13ac03e624e4cb9b14685b964cfddddee597e3dc.tar.gz
continued improving the custom type handling: gendir, pch_postrule, etc; added the pch_header to the .project; fixed some windows-specific variables; always have an include path for ../.. since that's our source-dir
-rw-r--r--modules/CDT6ProjectCreator.pm2
-rw-r--r--templates/cdt6cproject.mpd22
-rw-r--r--templates/cdt6platforms.mpt3
-rw-r--r--templates/cdt6project.mpd7
4 files changed, 20 insertions, 14 deletions
diff --git a/modules/CDT6ProjectCreator.pm b/modules/CDT6ProjectCreator.pm
index eaff206e..ac65e3d4 100644
--- a/modules/CDT6ProjectCreator.pm
+++ b/modules/CDT6ProjectCreator.pm
@@ -107,7 +107,7 @@ sub get_lib_template_input_file {
return 'cdt6lib';
}
-sub use_win_compatibility_commands() {
+sub use_win_compatibility_commands {
return (defined $ENV{'MPC_CDT_HOST_WIN32'})
? $ENV{'MPC_CDT_HOST_WIN32'} : ($^O eq 'MSWin32' || $^O eq 'cygwin');
}
diff --git a/templates/cdt6cproject.mpd b/templates/cdt6cproject.mpd
index 7d400b1e..ceb30f24 100644
--- a/templates/cdt6cproject.mpd
+++ b/templates/cdt6cproject.mpd
@@ -90,7 +90,8 @@
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base.134329701" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1373363011" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
-<option id="mpc.generated.cc.include.paths.1" superClass="<%cpp_compiler_superclass%>.include.paths" valueType="includePath">
+<option id="mpc.generated.cc.include.paths.1" superClass="<%cpp_compiler_option_superclass%>.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="../.."/>
<%foreach(includes)%>
<listOptionValue builtIn="false" value="<%include%>"/>
<%endfor%>
@@ -102,6 +103,7 @@
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1634417374" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
<option id="mpc.generated.c.compiler.option.include.paths.1" superClass="<%c_compiler_superclass%>.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="../.."/>
<%foreach(includes)%>
<listOptionValue builtIn="false" value="<%include%>"/>
<%endfor%>
@@ -122,9 +124,10 @@
<tool announcement="Invoking <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> on <%custom_type->input_file%>"
command="<%shell%> ..<%slash%><%create_aux_file(platform, _, configuration, _, custom_type, _, normalize(custom_type->input_file), script_ext)%><%script_hdr%>
<%comment(LIBPATH)%><%if(custom_type->libpath)%><%setenv%> <%libenv%>=<%envvar_pre%><%libenv%><%envvar_post%><%pathsep%><%translate_vars(custom_type->libpath)%>
+<%endif%><%comment(GENDIR_SRCDIR)%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(mkdir_pre)%><%mkdir_pre%> <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%>
<%endif%>cd ..<%slash%>..
-<%comment(GENDIR)%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(mkdir_pre)%><%mkdir_pre%> <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%>
-<%endif%><%comment(COMMAND)%><%if(flag_overrides(custom_type->input_file, command))%><%translate_vars(flag_overrides(custom_type->input_file, command))%><%else%><%translate_vars(custom_type->command)%><%endif%> <%comment(COMMANDFLAGS)%><%if(flag_overrides(custom_type->input_file, commandflags))%><%translate_vars(flag_overrides(custom_type->input_file, commandflags))%><%else%><%if(custom_type->commandflags)%><%translate_vars(custom_type->commandflags)%><%endif%><%endif%> <%if(custom_type->output_option)%><%comment(with OUTPUT_OPTION)%>"<%custom_type->input_file%>" <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%else%><%comment(without OUTPUT_OPTION)%>"<%custom_type->input_file%>"<%endif%><%comment(POSTCOMMAND)%><%if(flag_overrides(custom_type->input_file, postcommand))%> && <%flag_overrides(custom_type->input_file, postcommand)%><%else%><%if(custom_type->postcommand)%> && <%custom_type->postcommand%><%endif%><%endif%><%comment(PCH_POSTRULE)%><%if(pch_header)%><%if(custom_type->pch_postrule)%><%foreach(custom_type->input_file->source_output_files)%> && echo #include "<%pch_header%>" > <%script_tmpfile%> && <%cat%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> <%script_tmpfile%> && <%mv%> <%script_tmpfile%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>"<%endfor%><%endif%><%endif%><%comment(LINK)%><%if(custom_type->input_file->source_output_files)%> && cd cdt_<%project_name%><%slash%><%platform%>-<%configuration%><%endif%><%foreach(custom_type->input_file->source_output_files)%> && <%ln%> ..<%slash%>..<%slash%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir%><%slash%><%endif%><%custom_type->input_file->source_output_file%> .<%endfor%>
+<%comment(GENDIR_OUTDIR)%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(mkdir_pre)%><%mkdir_pre%> <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%>
+<%endif%><%comment(COMMAND)%><%if(flag_overrides(custom_type->input_file, command))%><%translate_vars(flag_overrides(custom_type->input_file, command))%><%else%><%translate_vars(custom_type->command)%><%endif%> <%comment(COMMANDFLAGS)%><%if(flag_overrides(custom_type->input_file, commandflags))%><%translate_vars(flag_overrides(custom_type->input_file, commandflags))%><%else%><%if(custom_type->commandflags)%><%translate_vars(custom_type->commandflags)%><%endif%><%endif%> <%if(custom_type->output_option)%><%comment(with OUTPUT_OPTION)%>"<%custom_type->input_file%>" <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%else%><%comment(without OUTPUT_OPTION)%>"<%custom_type->input_file%>"<%endif%><%comment(POSTCOMMAND)%><%if(flag_overrides(custom_type->input_file, postcommand))%> && <%flag_overrides(custom_type->input_file, postcommand)%><%else%><%if(custom_type->postcommand)%> && <%custom_type->postcommand%><%endif%><%endif%><%comment(PCH_POSTRULE)%><%if(pch_header)%><%if(custom_type->pch_postrule)%><%foreach(custom_type->input_file->source_output_files)%> && echo <%quote_echo%>#include "<%pch_header%>"<%quote_echo%> > <%script_tmpfile%> && <%cat%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> <%script_tmpfile%> && <%mv%> <%script_tmpfile%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>"<%endfor%><%endif%><%endif%><%comment(LINK_SRCDIR_TO_OUTDIR)%><%if(custom_type->input_file->source_output_files)%> && cd cdt_<%project_name%><%slash%><%platform%>-<%configuration%><%endif%><%foreach(custom_type->input_file->source_output_files)%> && <%ln%> ..<%slash%>..<%slash%><%dirname(custom_type->input_file->source_output_file)%><%slash%><%basename(custom_type->input_file->source_output_file)%> .<%endfor%>
<%end_aux_file%>"
customBuildStep="true"
id="mpc.generated.rcbs.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>"
@@ -145,16 +148,11 @@
<outputType
id="mpc.generated.rcbsoutput.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>"
name="Resource Custom Build Step Output Type"
- outputNames="<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(";")%><%endfor%>"/>
+ outputNames="<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(";")%><%endfor%>"/>
</tool>
-</fileInfo>
-<%endfor%><%comment(input file)%>
-<%endfor%><%comment(custom type)%>
-<sourceEntries>
-<%foreach(custom_types)%><%foreach(custom_type->input_files)%><%foreach(custom_type->input_file->source_output_files)%>
-<entry excluding="<%custom_type->input_file->source_output_file%>" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
-<%endfor%><%endfor%><%endfor%>
-</sourceEntries>
+</fileInfo><%endfor%><%comment(input file)%><%endfor%><%comment(custom type)%>
+<sourceEntries><%foreach(custom_types)%><%foreach(custom_type->input_files)%><%foreach(custom_type->input_file->source_output_files)%><entry excluding="<%custom_type->input_file->source_output_file%>" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+<%endfor%><%endfor%><%endfor%></sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
diff --git a/templates/cdt6platforms.mpt b/templates/cdt6platforms.mpt
index 62209b07..8deeef89 100644
--- a/templates/cdt6platforms.mpt
+++ b/templates/cdt6platforms.mpt
@@ -93,7 +93,6 @@ win32 {
platform_specializer = mingw
tool_name_prefix = MinGW
linker_option_superclass = gnu.cpp.link.option // must have .XXX appended
-cpp_compiler_option_superclass = gnu.cpp.compiler.mingw.option
c_compiler_superclass = cdt.managedbuild.tool.gnu.c.compiler.mingw
c_compiler_option_superclass = gnu.c.compiler.mingw.option
c_linker_dynamiclib_superclass = gnu.c.link.mingw.so.debug.option.shared
@@ -126,6 +125,7 @@ script_tmpfile = temporary$$.src
setenv = export
envvar_pre = $
pathsep = :
+quote_echo = '
ln = ln -sf
host_macosx {
@@ -144,6 +144,7 @@ host_win32 {
pathsep = ;
mkdir_pre = if not exist
ln = copy /y
+ quote_echo =
}
// Abstractions for different configurations
diff --git a/templates/cdt6project.mpd b/templates/cdt6project.mpd
index 10c7a65a..ccd6a259 100644
--- a/templates/cdt6project.mpd
+++ b/templates/cdt6project.mpd
@@ -97,6 +97,13 @@
<location><%full_path(header_file)%></location>
</link>
<%endfor%>
+<%if(pch_header)%>
+ <link>
+ <name><%pch_header%></name>
+ <type>1</type>
+ <location><%full_path(pch_header)%></location>
+ </link>
+<%endif%>
<%foreach(inline_files)%>
<link>
<name><%inline_file%></name>