summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Cleeland <chris.cleeland@gmail.com>2010-06-16 19:11:54 +0000
committerChris Cleeland <chris.cleeland@gmail.com>2010-06-16 19:11:54 +0000
commit5db5966407e8660a1c1d67b88e09ca7afd3f872c (patch)
tree10e1323816090d4b452be70edc102039e99571ea
parenta003063accc8ab7c150bf141d499c24e3fa2113b (diff)
downloadMPC-5db5966407e8660a1c1d67b88e09ca7afd3f872c.tar.gz
Postbuild in a project should work now.
Regardless of whether there's a postbuild section, CDT will create one to put the build artifact in a place where other projects can find it.
-rw-r--r--templates/cdt6cproject.mpd27
1 files changed, 24 insertions, 3 deletions
diff --git a/templates/cdt6cproject.mpd b/templates/cdt6cproject.mpd
index 3b82e945..482d3cfa 100644
--- a/templates/cdt6cproject.mpd
+++ b/templates/cdt6cproject.mpd
@@ -23,7 +23,7 @@
<%if(exename && exe_ext_nodot)%>artifactExtension="<%exe_ext_nodot%>"<%endif%>
<%if(type_is_dynamic && dll_ext_nodot)%>artifactExtension="<%dll_ext_nodot%>"<%endif%>
<%if(type_is_static && lib_ext_nodot)%>artifactExtension="<%lib_ext_nodot%>"<%endif%>
- artifactName="<%if(type_is_dynamic)%><%sharedname%><%else%><%if(type_is_static)%><%staticname%><%else%><%exename%><%endif%><%endif%>"
+ artifactName="<%if(exename)%><%exename%><%else%><%if(type_is_dynamic)%><%sharedname%><%else%><%if(type_is_static)%><%staticname%><%endif%><%endif%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%endif%>"
description=""
id="mpc.generated.config.<%platform%>.<%configuration%>"
name="<%platform%>-<%configuration%>"
@@ -35,9 +35,30 @@
cleanCommand="<%delete("rm -rf")%>"
parent="<%configuration_parent_root%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"
<%endif%>
- prebuildStep="<%prebuild%>"
- postbuildStep="<%if(libout)%><%ln%> <%libname_prefix("lib")%><%if(type_is_static)%><%staticname%><%lib_ext%><%else%><%sharedname%><%dll_ext%><%endif%> <%libout%><%endif%><%if(postbuild)%>&& <%postbuild%><%endif%>"
+ prebuildStep="<%eval(prebuild)%>"
+ postbuildStep="<%shell%> ..<%slash%><%create_aux_file(postbuild_, platform, _, configuration, script_ext)%><%script_hdr%>
+<%if(type_is_dynamic)%>cd <%cwd%><%slash%><%if(dllout)%><%dllout%><%else%><%libout("../..")%><%endif%> && <%ln%> <%cwd%><%slash%><%project_name%><%slash%><%platform%>-<%configuration%><%slash%><%lib_prefix%><%sharedname%><%lib_modifier%><%dll_ext%> .<%else%>
+<%if(type_is_static)%>cd <%libout("../..")%> && <%ln%> <%project_name%><%slash%><%platform%>-<%configuration%><%slash%><%lib_prefix%><%staticname%><%lib_modifier%><%lib_ext%> .<%else%>
+<%if(exename)%>cd <%exeout("../..")%> && <%ln%> <%project_name%><%slash%><%platform%>-<%configuration%><%slash%><%exename%> .<%endif%>
+<%endif%><%endif%>
+<%if(postbuild)%><%eval(postbuild)%><%endif%>
+<%end_aux_file%>"
>
+<!-- This is the logic for the postbuildStep above.
+if(type_is_dynamic)
+ src = <%lib_prefix%><%sharedname%><%lib_modifier%><%dll_ext%>
+ dst = <%if(dllout)%><%dllout%><%else%><%libout("../..")%><%endif%>
+
+if (type_is_static)
+ src = <%lib_prefix%><%staticname%><%lib_modifier%><%lib_ext%>
+ dst = <%libout("../..")%>
+
+if (exename)
+ src = <%exename%>
+ dst = <%exeout("../..")%>
+
+ cd dst && <%ln%> <%project_name%><%slash%><%platform%>-<%configuration%><%slash%>src .
+-->
<folderInfo id="mpc.generated.config.<%platform%>.<%configuration%>" <%comment(same id as configuration element id)%> name="/" resourcePath="">
<toolChain
id="mpc.generated.toolchain.<%platform%>.<%configuration%>"