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

jfbu jfbu at free.fr
Tue Oct 7 10:01:25 CEST 2014


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