MP1=$(wildcard figures/chap1/*.mp) MP1:=$(filter-out figures/chap1/mptextmp.mp, $(MP1)) MP2=$(wildcard figures/chap2/*.mp) MP2:=$(filter-out figures/chap2/mptextmp.mp, $(MP2)) MP5=$(wildcard figures/chap5/*.mp) MP5:=$(filter-out figures/chap5/mptextmp.mp, $(MP5)) FIG1=$(patsubst figures/chap1/%.mp, figures/chap1/%-1.pdf, $(MP1)) FIG2=$(patsubst figures/chap2/%.mp, figures/chap2/%-1.pdf, $(MP2)) FIG5=$(patsubst figures/chap5/%.mp, figures/chap5/%-1.pdf, $(MP5)) .PHONY: all livre ref prof etudiant #all: ; $(info $$var is [${FIG5}])echo Hello world all: analyse2.pdf ref: xetex analyse2 xetex analyse2 analyse2.pdf: analyse2.tex analyse2.toc $(FIG1) $(FIG2) $(FIG5) xetex \\def\\noteetudiant{Oui} \\def\\notevide{Oui} \\input analyse2 xetex \\def\\noteetudiant{Oui} \\def\\notevide{Oui} \\input analyse2 mv analyse2.pdf etudiant-vide.pdf xetex \\def\\noteetudiant{Oui} \\input analyse2 mv analyse2.pdf etudiant.pdf prof: analyse2.tex analyse2.toc $(FIG1) $(FIG2) $(FIG5) xetex \\def\\noteprof{Oui} \\input analyse2 etudiant: analyse2.tex analyse2.toc $(FIG1) $(FIG2) $(FIG5) xetex \\def\\noteetudiant{Oui} \\input analyse2 livre: analyse2.tex analyse2.toc $(FIG1) $(FIG2) $(FIG5) xetex \\def\\noteetudiant{Oui} \\input analyse2 analyse2.toc: touch analyse2.toc %-1.pdf: %.mp $(eval chemin=$(dir $*)) \ $(eval name=$(notdir $*)) \ cd $(chemin) && mpost $(name) && mptopdf $(name)