[XeTeX] using xetex in make
Mike Maxwell
maxwell at umiacs.umd.edu
Thu Aug 16 04:35:27 CEST 2007
I have a makefile that is supposed to automate a lot of the process of
producing a .pdf file (out of a DocBook file, but that's a long story;
suffice to say that by the time of the problem, the file exists in the
appropriate format for xetex). For some reason xetex works fine if I
run it directly from the command line, but won't work if it's run inside
of make.
Here's the make recipe:
-----------
%.pdf: %.xetex
pwd ; \
ls -l $^ ; \
$(XETEX) $< -o $@
-----------
The 'pwd' and 'ls' are just in there to make sure make didn't change
directories or something.
When I run make, this is what I get:
-----------
> make test.pdf
pwd ; \
ls -l test.xetex ; \
/usr/share/bin/x86_64-linux/xelatex test.xetex -o test.pdf
/home/mmaxwell/Data/XeTeX
-rw-rw-r-- 1 mmaxwell mmaxwell 598519 Aug 15 22:04 test.xetex
This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
! I can't find file `test.xetex'.
<*> test.xetex
-o test.pdf
Please type another input file name:
! I can't find file `test'.
<*> test.xetex
-o test.pdf
Please type another input file name:
-----------
You'll notice that 'ls' finds the file just fine. (I hit the <Enter>
key after the first prompt; I'm not sure why it switches from asking for
'test.xetex' the first time to asking for 'test' the second time.)
If I copy the command line from the above and paste it directly in to
the bash prompt, xetex finds the input file and proceeds to run.
I suppose xetex could be expecting the file suffix to be .latex or .tex
instead, but then why would it run OK on the bash prompt, but not inside
make? Nope, just tried renaming the source file and changing the recipe
accordingly.
This is in RedHat Linux, Gnu make v3.80. I'm running the bash shell,
although I've tried running the xetex command using 'sh' and it works
fine. (I was thinking that because 'make' uses 'sh' instead of 'bash',
this might be cause of the problem.)
Mysterification. I've never had a problem misbehave just because I ran
it from make. There is a v3.81 of make...nope, just downloaded and
built it, and I get the same result.
--
Mike Maxwell
maxwell at umiacs.umd.edu
"Theorists...have merely to lock themselves in a room
with a blackboard and coffee maker to conduct their business."
--Bruce A. Schumm, Deep Down Things
More information about the XeTeX
mailing list