Using the htm4l make-include file

This is a Makefile that you will include in your Makefiles. It simply contains a rule to convert .htm4l files into .html files, as follows: M4 = /usr/bin/m4 %.html : %.htm4l $(M4) $(M4FLAGS) $< > $@ In each directory in which I create .html files, I have a Makefile that includes the above file. The simplest example looks like this: include /usr/local/www/m4/make-include HTM4L = $(wildcard *.htm4l) HTML = $(patsubst %.htm4l, %.html, $(HTM4L)) all: $(HTML) $(HTML): /usr/local/www/m4/html-macros Thus when I type 'make', the .html files that are older than their corresponding .htm4l file are remade using m4. The above Makefiles use GNU make syntax. If you don't have GNU make, you'll either have to get it, or modify these to use your version of make. It's not hard; read the man page. Better yet, get the GNU version. You'll be glad you did.

Back to the htm4l home page.
© Terry Jones (terry <AT> Last modified: Mon Oct 2 02:22:03 CEST 2006