1.1 --- a/lplc Mon Feb 27 19:07:13 2017 +0100
1.2 +++ b/lplc Mon Feb 27 19:18:55 2017 +0100
1.3 @@ -293,7 +293,7 @@
1.4 if timings: now = stopwatch("Generation", now)
1.5
1.6 t = translator.Translator(i, d, o, generated_dir)
1.7 - t.to_output(debug, gc_sections)
1.8 + t.to_output(reset, debug, gc_sections)
1.9
1.10 if timings: now = stopwatch("Translation", now)
1.11
2.1 --- a/translator.py Mon Feb 27 19:07:13 2017 +0100
2.2 +++ b/translator.py Mon Feb 27 19:18:55 2017 +0100
2.3 @@ -47,7 +47,7 @@
2.4 self.optimiser = optimiser
2.5 self.output = output
2.6
2.7 - def to_output(self, debug=False, gc_sections=False):
2.8 + def to_output(self, reset=False, debug=False, gc_sections=False):
2.9
2.10 "Write a program to the configured output directory."
2.11
2.12 @@ -70,7 +70,9 @@
2.13
2.14 parts = module.name.split(".")
2.15
2.16 - if parts[0] != "native" and is_newer(module.filename, output_filename):
2.17 + if parts[0] != "native" and \
2.18 + (reset or is_newer(module.filename, output_filename)):
2.19 +
2.20 tm = TranslatedModule(module.name, self.importer, self.deducer, self.optimiser)
2.21 tm.translate(module.filename, output_filename)
2.22