A couple of suggested tweaks:
Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 8685)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -1880,9 +1880,16 @@
else
{
// commands-only target?
- cbMessageBox(_("You can't \"run\" a commands-only target..."));
- m_pProject->SetCurrentlyCompilingTarget(0);
- return -1;
+ if (target->GetHostApplication().IsEmpty())
+ {
+ cbMessageBox(_("You must select a host application to \"run\" a commands-only target..."));
+ m_pProject->SetCurrentlyCompilingTarget(0);
+ return -1;
+ }
+ command << hostapStr << strSPACE;
+ command << target->GetExecutionParameters();
+ Manager::Get()->GetMacrosManager()->ReplaceMacros(command, target);
+ Manager::Get()->GetMacrosManager()->ReplaceEnvVars(command);
}
wxString script = command;
@@ -1903,12 +1910,12 @@
cmd << command;
Manager::Get()->GetLogManager()->Log(_("Checking for existence: ") + f.GetFullPath(), m_PageIndex);
- if (!wxFileExists(f.GetFullPath()))
- {
+ if ( (target->GetTargetType() != ttCommandsOnly) && !wxFileExists(f.GetFullPath()) )
+ {
int ret = cbMessageBox(_("It seems that this project has not been built yet.\n"
- "Do you want to build it now?"),
- _("Information"),
- wxYES_NO | wxCANCEL | wxICON_QUESTION);
+ "Do you want to build it now?"),
+ _("Information"),
+ wxYES_NO | wxCANCEL | wxICON_QUESTION);
switch (ret)
{
case wxID_YES:
Should also do something about the linker message and maybe remove (disable) the irrelevant build options tabs.