Changeset 807 for mcbuilder/trunk/src/Builder.cpp
- Timestamp:
- 08/11/08 12:35:29 (5 months ago)
- Files:
-
- 1 modified
-
mcbuilder/trunk/src/Builder.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mcbuilder/trunk/src/Builder.cpp
r806 r807 40 40 connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(nextStep(int, QProcess::ExitStatus))); 41 41 connect(this, SIGNAL(error(QProcess::ProcessError)), this, SLOT(onBuildError(QProcess::ProcessError))); 42 43 cleanFirst = false;44 buildPending = false;45 42 } 46 43 … … 50 47 void Builder::build(QString projectName) 51 48 { 52 if(cleanFirst)53 {54 cleanFirst = false;55 buildPending = true;56 return clean(projectName);57 }58 49 currentProjectPath = projectName; 59 50 QDir dir(currentProjectPath); 60 51 setWorkingDirectory(dir.filePath("build")); 61 52 loadDependencies(LIBRARIES_DIR, currentProjectPath); // this loads up the list of libraries this project depends on 53 if(compareConfigFile(currentProjectPath)) 54 { 55 createConfigFile(currentProjectPath); // create a config file based on the Properties for this project 56 qDebug("creating/updating config file"); 57 } 62 58 createMakefile(currentProjectPath); // create a Makefile for this project, given the dependencies 63 createConfigFile(currentProjectPath); // create a config file based on the Properties for this project64 59 buildStep = BUILD; 65 60 currentProcess = "make"; … … 98 93 } 99 94 100 void Builder::onProjectUpdated()101 {102 cleanFirst = true;103 }104 105 95 void Builder::stop() 106 96 { … … 161 151 case CLEAN: 162 152 mainWindow->onCleanComplete(); 163 if(buildPending)164 {165 buildPending = false;166 build(currentProjectPath);167 }168 153 break; 169 154 } … … 321 306 tofile << "\t" << "$(CC) $(CFLAGS) $(ARM_OBJ) $(THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)" << endl << endl; 322 307 323 tofile << "$(THUMB_OBJ) : %.o : %.c " << endl;308 tofile << "$(THUMB_OBJ) : %.o : %.c ../config.h" << endl; 324 309 tofile << "\t" << "$(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@" << endl << endl; 325 310 326 tofile << "$(ARM_OBJ) : %.o : %.c " << endl;311 tofile << "$(ARM_OBJ) : %.o : %.c ../config.h" << endl; 327 312 tofile << "\t" << "$(CC) -c $(CFLAGS) $< -o $@" << endl << endl; 328 313
