shithub: web

ref: 527dde60c531d7b95fd5a746e78635b68eb27525
dir: web/mkfile

View raw version
pages=`{ls *.ht | grep -v index.ht | sed 's:\.ht$:/index.html:'}

all:VQ: ${pages:%=public/%} public/index.html public/registry.txt

public/registry.txt:DQ:
	touch $target

public/%/index.html:DQ: %.ht %.sed

public/index.html:DQ: index.ht index.sed

public/%.html:DQ:
	echo building $target
	d=`{basename -d $stem}
	~ $d '.' && d=index
	t=$target
	mkdir -p `{basename -d $t}
	>$target {
		cat frag/header.inc $d.ht frag/footer.inc | sed -f $d.sed
	}

clean:V:
	rm -rf public/*