1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Ignore folders used by source code control software (subversino, git...) #1619

This commit is contained in:
Federico Fissore
2013-10-14 11:40:13 +02:00
parent e548f3111c
commit c0a0e49db6
2 changed files with 14 additions and 8 deletions

View File

@ -235,7 +235,7 @@ public class Compiler implements MessageConsumer {
File objectFile = new File(objectPath);
File dependFile = new File(dependPath);
objectPaths.add(objectFile);
if (is_already_compiled(file, objectFile, dependFile, prefs))
if (isAlreadyCompiled(file, objectFile, dependFile, prefs))
continue;
String[] cmd = getCommandCompilerC(includePaths, file.getAbsolutePath(),
objectPath);
@ -248,7 +248,7 @@ public class Compiler implements MessageConsumer {
File objectFile = new File(objectPath);
File dependFile = new File(dependPath);
objectPaths.add(objectFile);
if (is_already_compiled(file, objectFile, dependFile, prefs))
if (isAlreadyCompiled(file, objectFile, dependFile, prefs))
continue;
String[] cmd = getCommandCompilerCPP(includePaths,
file.getAbsolutePath(), objectPath);
@ -258,10 +258,10 @@ public class Compiler implements MessageConsumer {
return objectPaths;
}
private boolean is_already_compiled(File src, File obj, File dep, Map<String, String> prefs) {
private boolean isAlreadyCompiled(File src, File obj, File dep, Map<String, String> prefs) {
boolean ret=true;
try {
//System.out.println("\n is_already_compiled: begin checks: " + obj.getPath());
//System.out.println("\n isAlreadyCompiled: begin checks: " + obj.getPath());
if (!obj.exists()) return false; // object file (.o) does not exist
if (!dep.exists()) return false; // dep file (.d) does not exist
long src_modified = src.lastModified();
@ -284,8 +284,8 @@ public class Compiler implements MessageConsumer {
String objpath = obj.getCanonicalPath();
File linefile = new File(line);
String linepath = linefile.getCanonicalPath();
//System.out.println(" is_already_compiled: obj = " + objpath);
//System.out.println(" is_already_compiled: line = " + linepath);
//System.out.println(" isAlreadyCompiled: obj = " + objpath);
//System.out.println(" isAlreadyCompiled: line = " + linepath);
if (objpath.compareTo(linepath) == 0) {
need_obj_parse = false;
continue;
@ -308,7 +308,7 @@ public class Compiler implements MessageConsumer {
ret = false; // prerequisite modified since object was compiled
break;
}
//System.out.println(" is_already_compiled: prerequisite ok");
//System.out.println(" isAlreadyCompiled: prerequisite ok");
}
}
reader.close();
@ -575,6 +575,10 @@ public class Compiler implements MessageConsumer {
boolean recurse) {
List<File> files = new ArrayList<File>();
if (Library.SOURCE_CONTROL_FOLDERS.contains(folder.getName())) {
return files;
}
if (folder.listFiles() == null)
return files;