Was trying to use tlc in a Makefile, but was getting some unexpected results.
I have made the following changes to let tlc update output files and drive Make in the expected way:
Only returns non-zero exit status on errors, now. Warnings are ignored by the status count.
Only writes to output file if no errors are encountered.
The second point might seem unnecessary, since if we can generate the .lua file that's better, right? However compilers generally do not touch output files if they fail (and this confuses Make). If the previous behavior was useful we should add an explicit option to do this, I don't think programmers expect the previous behavior either.
Was trying to use
tlc
in aMakefile
, but was getting some unexpected results.I have made the following changes to let
tlc
update output files and drive Make in the expected way:The second point might seem unnecessary, since if we can generate the .lua file that's better, right? However compilers generally do not touch output files if they fail (and this confuses Make). If the previous behavior was useful we should add an explicit option to do this, I don't think programmers expect the previous behavior either.