SOURCE=$(patsubst %.m,%.m.tex, $(shell ls *.m)) include latex.mk foo: echo $(SOURCE) pso.out: pso.m @octave -q pso.m