FILES= $(shell ls *.php) TARGETS=$(FILES:%.php=%.php.txt) all: $(TARGETS) %.php.txt: %.php cp $*.php $*.php.txt clean: rm *.php.txt