?

Log in

No account? Create an account

Previous Entry | Next Entry

(Ab)using tools

HTML = test.html

all: $(HTML)

clean:
	rm $(HTML)

%.html: %.s template.t gen.pl
	perl gen.pl $<

I don't think make was ever designed to build websites, but it's pretty good at it, actually…

Tags:

Comments

livemerlyn
Jan. 14th, 2006 09:05 pm (UTC)
Been there, done that.
In http://www.stonehenge.com/merlyn/LinuxMag/col38.html I describe how my entire website is built from files using Template Toolkit and make.
brentdax
Jan. 15th, 2006 12:21 am (UTC)
Re: Been there, done that.
Interesting. In this case, gen.pl uses HTML::Seamstress to do its job, not TT; the templating I need is very simple and exclusively on HTML files, so it's more convenient that way. (The script just parses information like the page title out of comments in the page and tells Seamstress where to put it all.)