Assume a target foo.tar
, that depends on a list of files foo.files
, e.g.
FOO_FILES := $(shell cat foo.files)
foo.tar: foo.files $(FOO_FILES)
tar -cf foo $(FOO_FILES)
Now suppose that foo.files need to be generated e.g.:
foo.files: foo.files.template
sed -e "s/@{VERSION}/$(VERSION)/" < $< > $@
It is clear that foo.files
depends on foo.files.template
, but how can one make sure that FOO_FILES is evaluated after foo.files is generated?