Closed jrtc27 closed 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.
The important commit is the second one, which ensures the
build/tex
directory exists prior to runninglatexmk
, 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. Normallyclean
would also delete the output...