technicalguy / acs-category-theory-notes-2017

Cambridge ACS Category Theory, Type Theory, and Logic - lecture notes 2017.
13 stars 5 forks source link

Various Makefile fixes #18

Closed jrtc27 closed 6 years ago

jrtc27 commented 6 years ago

The important commit is the second one, which ensures the build/tex directory exists prior to running latexmk, since for every .tex file (including those included with \include), the corresponding .aux file goes in $(OUTPUT_DIRECTORY)/$(dirname $file).

Out of interest, why does the clean target not delete the actual PDF? It's somewhat surprising that cleaning and re-running make only recreates the output directory hierarchy and then stops (since the target PDF still exists and is newer than the source .tex files), rather than going and rebuilding. Normally clean would also delete the output...

technicalguy commented 6 years ago

Out of interest, why does the clean target not delete the actual PDF? It's somewhat surprising that cleaning and re-running make only recreates the output directory hierarchy and then stops (since the target PDF still exists and is newer than the source .tex files), rather than going and rebuilding. Normally clean would also delete the output...

This is residual from when the intermediate files were not inside separate build directories, but would clutter up the root directory. It should have been called "clean-intermediates" or something. Now that the intermediate files are tidied away in their own directory I think it makes sense to have make clean remove all non-source files, as you say.