[tex-k] speed of kpsewhich to get value of TEXMFLOCAL

Andrew Komornicki komornic at sbcglobal.net
Tue Oct 7 23:49:35 CEST 2014


Hi,

would it not be simpler to just define these variables in your
environment so that your makefile can pick them up at will.  You would
not have to invoke kpsewhich and incur the execution penalty.  Karl most
probably has the most insight into execution bottlenecks with his
routine. just a thought.

regards,
andrew

 Andrew Komornicki
 Department of Chemistry
 Stanford University

On 10/7/2014 1:01 AM, jfbu wrote:
> Hi,
> 
> in a Makefile I am currently testing I have something like this
> 
> TEXMF_LOCAL = $(shell kpsewhich -var-value TEXMFLOCAL)
> TEXMF_HOME  = $(shell kpsewhich -var-value TEXMFHOME)
> 
> however evaluation of each variable is very slow, of the order
> of half a second on my mac os x mavericks with TL2014
> 
> ======Makefile:
> # TEXMF_LOCAL = `kpsewhich -var-value TEXMFLOCAL`
> TEXMF_LOCAL = $(shell kpsewhich -var-value TEXMFLOCAL)
> TEXMF_HOME  = $(shell kpsewhich -var-value TEXMFHOME)
> 
> all: testlocal testhome
> 
> testlocal:
> 	@echo $(TEXMF_LOCAL)
> 
> testhome:
> 	@echo $(TEXMF_HOME)
> 
> ======running it
> $ time make
> /usr/local/texlive/texmf-local
> /Users/---/Library/texmf
> 
> real	0m0.996s
> user	0m0.964s
> sys	0m0.026s
> 
> What can I do to get TEXMFLOCAL ?
> It is not `shell` the culprit as for example
> one can test with $(shell ls -l Makefile) to
> get execution time without kpsewhich.
> 
> I use it only for certain targets, and putting 
> TEXMF_LOCAL := ...
> at the top of the Makefile, as I was going to do,
> is currently excluded as it slows down all targets
> 
> Jean-Francois
> 
> 
> 


More information about the tex-k mailing list