Open shiblon opened 8 years ago
Yes, I'm afraid that you've run up against a fundamental (and not fixable) limitation
of the makefile as it is used with latex. I'm marking this WontFix, but wanted to
give a brief explanation of why this happens, as well.
When the makefile tries to find dependencies, it does so by running latex (or pdflatex,
or whatever is configured) once. If that succeeds, then great, there's nothing left
to do. If it does not succeed, then the makefile parses the logs (and various other
latex outputs) to try to figure out what is missing.
Unfortunately, if an \input is missing, LaTeX *can't* proceed because that input would
normally be included inline, which means that parts of the current document *won't
even parse* unless that file is present. So, we have a problem. We can tell that
a *single* input was missing and attempt to rerun LaTeX, but that is often rather expensive,
particularly if there are a lot of generated (or otherwise missing) inputs.
So, we don't do that. Inputs are either there or they aren't. Not much can be done
about it, short of implementing my own LaTeX parser to find all of the inputs before
running LaTeX. As there is no real way of doing that reliably without implementing
TeX all over again, it's just a limitation we have to live with.
Reported by shiblon
on 2012-03-21 09:18:43
Reported by shiblon
on 2012-03-21 09:46:17
WontFix
Thanks for the response and I understand the reason for the WontFix, but would it be
possible to mention the limitation in the documentation, along with a work-around?
Also, is the work around I did (making the .d file depend on the file to be input)
the right one to do?
Reported by sjmurdoch
on 2012-03-21 14:30:31
Workarounds are going to be difficult.
Adding something to the .d file is problematic because it is regenerated every time
the main source file changes.
You might, however, be able to create a custom *additional* dependency for the .d file,
perhaps something like this:
myinclude.tex: myinclude.tex.source
command_to_build_from_source $< $@
mymainsource.d: myinclude.tex
That might possibly work. If it does so reliably, I could totally see us adding that
to the documentation somewhere.
Reported by shiblon
on 2012-03-22 06:30:19
My Target.ini seems to be roughly what you suggest, and that approach works for me:
https://gitweb.torproject.org/sjm217/torspec.git/blob/54508c84314754755d8df05242740c82bb7aa360:/proposals/ideas/xxx-pluggable-roadmap/Targets.ini
Reported by sjmurdoch
on 2012-03-23 19:05:56
Sorry to be so slow to respond - work heated up.
This looks good as something we could add to the documentation. If you don't mind,
could you let me know where the most obvious place would be for it? We could also
add something like this to the project wiki, really (sparse as it is).
Reported by shiblon
on 2012-08-02 09:22:30
Accepted
I'd suggest adding the documentation to the section of help under Targets.ini. That's
where I first looked and it's where the new make rules need to go. I think where the
help goes is less important than that it should include '\input' somewhere so people
can search for it.
Reported by sjmurdoch
on 2012-08-26 14:07:51
Originally reported on Google Code with ID 153
Reported by
sjmurdoch
on 2012-03-16 00:45:08