I have to integrate the generation of many HTML files in an existing Makefile
.
The problem is that the HTML files need to reside in many different directories.
My i
Your active implicit rule makes $(rootdir)/build/doc/2009/06/01/some.html
depend on $(rootdir)/build/doc/2009/06/01/some.st
. If $(rootdir)/build/doc/2009/06/01/some.st
doesn't exist then the rule won't be used/found.
The commented out rule makes $(rootdir)/build/doc/2009/06/01/some.html
depend on some.st
.
One solution is to make you're source layout match your destination/result layout.
Another option is to create the rules as required with eval. But that will be quite complicated:
define HTML_template
$(1) : $(basename $(1))
cp $< $@
endef
$(foreach htmlfile,$(html),$(eval $(call HTML_template,$(htmlfile))))