~ubuntu-branches/ubuntu/raring/codeblocks/raring-proposed

« back to all changes in this revision

Viewing changes to src/plugins/compilergcc/directcommands.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-08-09 04:38:38 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100809043838-a59ygguym4eg0jgw
Tags: 10.05-0ubuntu1
* New upstream release. Closes (LP: #322350)
 - Switch to dpkg-source 3.0 (quilt) format
 - Remove unneeded README.source
 - Add debian/get-source-orig script that removes all
   Windows prebuilt binaries
* Bump Standards-Version to 3.9.1
 - Stop shipping *.la files
* debian/control
 - Add cdbs package as Build-Depend
 - Add libbz2-dev and zlib1g-dev packages as
   Build-Depends (needed by libhelp_plugin.so)
 - Remove dpatch package of Build-Depends
 - Add codeblocks-contrib-debug package
 - Split architecture-independent files of codeblocks
   package in codeblocks-common package
* debian/rules
 - Switch to CDBS rules system
 - Add parallel build support
 - Add a call to debian/get-source-orig script
 - Use lzma compression (saves 23,5 MB of free space)
* debian/patches
 - Refresh 01_codeblocks_plugin_path
 - Add 02_no_Makefiles_in_debian_dir to remove any link
   in codeblocks build system to deleted Makefiles of debian directory
 - Drop 02_ftbfs_gcc44 and 03_ftbfs_glib221 (merged in upstream)
* debian/watch
 - Update to use the new host (berlios.de)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3
3
 * http://www.gnu.org/licenses/gpl-3.0.html
4
4
 *
5
 
 * $Revision: 4909 $
6
 
 * $Id: directcommands.cpp 4909 2008-02-27 13:15:26Z mortenmacfly $
7
 
 * $HeadURL: svn://svn.berlios.de/codeblocks/tags/8.02/src/plugins/compilergcc/directcommands.cpp $
 
5
 * $Revision: 5682 $
 
6
 * $Id: directcommands.cpp 5682 2009-07-07 06:14:26Z mortenmacfly $
 
7
 * $HeadURL: svn+ssh://jenslody@svn.berlios.de/svnroot/repos/codeblocks/trunk/src/plugins/compilergcc/directcommands.cpp $
8
8
 */
9
9
 
10
10
#include <sdk.h>
89
89
        {
90
90
            if (isWaitCmd)
91
91
                array.Add(wxString(COMPILER_WAIT));
92
 
                        if (isLinkCmd)
 
92
            if (isLinkCmd)
93
93
                array.Add(wxString(COMPILER_WAIT_LINK));
94
94
            array.Add(cmdpart);
95
95
        }
99
99
    }
100
100
}
101
101
 
102
 
int MySortProjectFilesByWeight(ProjectFile** one, ProjectFile** two)
 
102
static int MySortProjectFilesByWeight(ProjectFile** one, ProjectFile** two)
103
103
{
104
104
    return (*one)->weight - (*two)->weight;
105
105
}
196
196
    wxString compilerCmd;
197
197
    if (!isHeader || compiler->GetSwitches().supportsPCH)
198
198
    {
199
 
        const CompilerTool& tool = compiler->GetCompilerTool(isResource ? ctCompileResourceCmd : ctCompileObjectCmd, pf->file.GetExt());
 
199
        const CompilerTool& tool = compiler->GetCompilerTool(isResource ? ctCompileResourceCmd : ctCompileObjectCmd, pf->file.GetExt());
200
200
 
201
 
        // does it generate other files to compile?
202
 
                for (size_t i = 0; i < pf->generatedFiles.size(); ++i)
203
 
                {
204
 
                        AppendArray(GetCompileFileCommand(target, pf->generatedFiles[i]), retGenerated); // recurse
205
 
                }
 
201
        // does it generate other files to compile?
 
202
        for (size_t i = 0; i < pf->generatedFiles.size(); ++i)
 
203
        {
 
204
            AppendArray(GetCompileFileCommand(target, pf->generatedFiles[i]), retGenerated); // recurse
 
205
        }
206
206
 
207
207
        pfCustomBuild& pcfb = pf->customBuild[compiler->GetID()];
208
208
        compilerCmd = pcfb.useCustomBuildCommand
249
249
        AddCommandsToArray(compilerCmd, ret);
250
250
        if (isHeader)
251
251
            ret.Add(wxString(COMPILER_WAIT));
252
 
                if (retGenerated.GetCount())
253
 
                {
254
 
                        // not only append commands for (any) generated files to be compiled
255
 
                        // but also insert a "pause" to allow this file to generate its files first
256
 
                        if (!isHeader) // if isHeader, the "pause" has already been added
257
 
                                ret.Add(wxString(COMPILER_WAIT));
258
 
                        AppendArray(retGenerated, ret);
259
 
                }
 
252
        if (retGenerated.GetCount())
 
253
        {
 
254
            // not only append commands for (any) generated files to be compiled
 
255
            // but also insert a "pause" to allow this file to generate its files first
 
256
            if (!isHeader) // if isHeader, the "pause" has already been added
 
257
                ret.Add(wxString(COMPILER_WAIT));
 
258
            AppendArray(retGenerated, ret);
 
259
        }
260
260
 
261
261
        // if it's a PCH, delete the previously generated PCH to avoid problems
262
262
        // (it 'll be recreated anyway)
422
422
    {
423
423
        ProjectFile* pf = files[i];
424
424
        // auto-generated files are handled automatically in GetCompileFileCommand()
425
 
        if (pf->autoGeneratedBy)
426
 
                        continue;
 
425
        if (pf->AutoGeneratedBy())
 
426
        {
 
427
            continue;
 
428
        }
427
429
        const pfDetails& pfd = pf->GetFileDetails(target);
428
430
        wxString err;
429
431
        if (force || IsObjectOutdated(target, pfd, &err))
767
769
        wxString ObjectAbs = (compiler->GetSwitches().UseFlatObjects)?pfd.object_file_flat_absolute_native:pfd.object_file_absolute_native;
768
770
        ret.Add(ObjectAbs);
769
771
        // if this is an auto-generated file, delete it
770
 
        if (pf->autoGeneratedBy)
771
 
                        ret.Add(pf->file.GetFullPath());
 
772
        if (pf->AutoGeneratedBy())
 
773
        {
 
774
            ret.Add(pf->file.GetFullPath());
 
775
        }
772
776
        if (distclean)
 
777
        {
773
778
            ret.Add(pfd.dep_file_absolute_native);
 
779
        }
774
780
//        if(m_doYield)
775
781
//            Manager::Yield();
776
782
    }
821
827
        // let's check the additional output files
822
828
        for (size_t x = 0; x < files.GetCount(); ++x)
823
829
        {
824
 
            if (files[i].IsEmpty())
 
830
            if (files[x].IsEmpty())
825
831
                continue;
826
832
 
827
 
            Manager::Get()->GetMacrosManager()->ReplaceMacros(files[i]);
 
833
            Manager::Get()->GetMacrosManager()->ReplaceMacros(files[x]);
828
834
            time_t addT;
829
 
            depsTimeStamp(files[i].mb_str(), &addT);
 
835
            depsTimeStamp(files[x].mb_str(), &addT);
830
836
            // if additional file doesn't exist, we can skip it
831
837
            if (!addT)
832
838
                continue;