I have a makefile for a Latex document which contains the following rules:
TEX=index.tex
DVI=$(TEX:.tex=.dvi)
PS=$(TEX:.tex=.ps)
PDF=$(TEX:.tex=.pdf)
all: images $(PDF)
images:
make -C $@
%.dvi: %.tex
latex $<
%.ps: %.dvi
dvips $<
%.pdf: %.ps
ps2pdf $<
what does the syntax DVI=$(TEX:.tex=.dvi) exactly do? how is it expanded? I tried to print the result with an echo but nothing is printed.