Menu

#538 reorganize latex makefile to avoid crashes

workingwiki
open
None
5
2014-05-05
2014-04-25
Lee Worden
No

The latex make rules have a problem where a bad dependency in the auto-generated .d file causes it to be unable to regenerate the .d file, so you can't make anything related to that document until you manually delete the .d file.

This is a step forward from the previous situation, where a glitch in a .d file made it impossible to make anything in the project, but still sub-optimal.

One proposal is to have an inner call to make, which reads the .d file and updates the manuscript's prerequisites, and an outer call does not read the .d file, calls the inner call unconditionally, regenerated the .d file, and compiles the .tex file to output. Would that be better? Would it have other glitches?

Discussion

  • Anonymous

    Anonymous - 2014-04-25

    What if the .d files had explicit null rules (ie., end the dependency with a semi-colon? Then you would not need to (or be able to) include them. Instead you would say:

    1
    2
    3
    4
    #!/usr/bin/make
    %.latex.pdf:
        - $(MAKE) -f $*.d
        <Other recipe rules>
    

    Whether that would work depends on whether you need other .d files before making your target, but I don't think you do.

     
  • Lee Worden

    Lee Worden - 2014-04-25

    Please explain more fully. I'm stuck on why I would make .d files if I never include them, which must be the wrong question...

     
    • Lee Worden

      Lee Worden - 2014-04-26

      Please explain more fully. I'm stuck on why I would make .d files if I never include them, which must be the wrong question...

      OK I see why that's the wrong question now. So $(MAKE) -f $*.d would make all the upstream stuff, but not compile the .tex. But how would it make the upstream stuff? To do that you need all the other makefiles...

       
  • Anonymous

    Anonymous - 2014-05-05

    Oops! But I'm now thinking there's a way around it -- if you could load all the other makefiles, and then override the latex rules ... or is that crazy?

     
    • Lee Worden

      Lee Worden - 2014-05-05

      I don't know... like what would the code look like?

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.