With the following Makefile, GNU make runs the two commands in parallel. Since the first one takes time to finish,
rm *.log is run before the
log file is created, and fails.
dummy.pdf: dummy.tex tex dummy.tex &> /dev/null; rm *.log
dummy.tex one line:
\bye (a short empty file for TeX). Replacing
tex dummy.tex by any other command shows the same behaviour. Removing
&> /dev/null would of course solve the problem, but it is not a very good option in my case, since the Makefile is provided by a third party.
Is it possible to prevent GNU make from doing anything in parallel? (the flag
-j 1 does not help).
EDIT: output to the terminal:
bruno@bruno-laptop:~/LaTeX/make-experiment$ make tex dummy.tex &> /dev/null; rm *.log rm: cannot remove `*.log': No such file or directory make: *** [dummy.pdf] Error 1 bruno@bruno-laptop:~/LaTeX/make-experiment$ This is TeX, Version 3.1415926 (TeX Live 2009/Debian) (./dummy.tex ) No pages of output. Transcript written on dummy.log.