sources := $(shell find -name '*.tar.gz') targets := $(sources:%=%.sha1) $(sources:%=%.sha1.asc) all : $(targets) %.sha1 : % sha1sum -b "$<" >"$@" %.asc : % gpg -ab "$<" .PHONY : clean clean :: $(RM) $(targets)