IN_FILES := $(wildcard *.sh.in) FILES := $(IN_FILES:.in=) .PHONY: all all: $(FILES) $(FILES): %.sh: %.sh.in prefix.sh cat prefix.sh > $@ echo >> $@ cat $< >> $@