def check(f, lines): if f.fileType != "gpi": return None dependencies = [] starts = [] target = f.fname for l in lines: if "load" in l: loadedFile = tools.getString(l) if tools.numQuotes(l) > 2 or loadedFile == None: # This occurs with lines like 'load template'.x.'.gpi' which load files dynamically (should happen very rarely). Just ignore it continue starts.append(loadedFile) if len(starts) == 0: return None return Dependency(starts = starts, targets = target, runInStartFolder = False, printOutput = False)
def check(f, lines): if f.fileType != "gpi": return None dependencies = [] start = f.fname targets = [] for l in lines: if "set output" in l: outputFile = tools.getString(l) if tools.numQuotes(l) > 2 or outputFile == None: # This occurs with lines like 'set output pic'.x.'.gpi' which sets outputfiles dynamically (should happen very rarely). Just ignore it continue targets.append(outputFile) if len(targets) == 0: return None return Dependency(starts = start, targets = targets, command = "gnuplot %s", printOutput = True)