How to handle unknown dependencies in Makefile that are dynamically detected?
问题 Let's say my Makefile is building a website. I write a index.html containing assets, like this: <html> <body><img src="asset/foo.img"/></body> </html> Now I want to write a rule to create a ZIP archive that contains the HTML as well as its assets. I write a script to parse out the src= attributes, but what do I do with it? If I put that in a recipe, but at that point the Makefile rules can't be changed. If I put it in a $(shell ...) command, then it will have to run every time the Makefile is