I struggle to write Makefiles and I’m building up some examples to learn from. I want to use Makefiles since it makes builds concurrent, projects more uniform and easier to manage.
Do you have any resources to share?
For example I am struggling to think how to turn this simple build script into a Makefile, so that index.html is only built when its index.src.html is modified.
for i in */index.src.html
do
anolis --max-depth=3 $i $(dirname $i)/index.html
done
Try using a pattern rule. From the GNU Makefile manual:
So, something like
The trick then becomes building up
INFILESin a reliable and safe way.