summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-09-30 11:20:14 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-09-30 11:20:14 (EDT)
commitadc4c2445d2d82190d9820f5961da1f386511cba (patch)
tree8ad8e08fa4937dc1d048f538342ece72a7d233ca
parentacc8d6c41f6d8353b196fe1d0eacc5cf27a7c290 (diff)
downloadwww-adc4c2445d2d82190d9820f5961da1f386511cba.zip
www-adc4c2445d2d82190d9820f5961da1f386511cba.tar.gz
www-adc4c2445d2d82190d9820f5961da1f386511cba.tar.bz2
Makefile: Add "index.html" to local hrefs.
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0fcd30a..b907184 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+INDEX =
+INDEX_SCRIPT = s|href="\([^:]*\)/"|href="\1/$(INDEX)"|g
DOCUMENT_BASE =
MEDIA_BASE =
SSIFLAGS = -D DOCUMENT_BASE=$(DOCUMENT_BASE) -D MEDIA_BASE=$(MEDIA_BASE)
@@ -29,12 +31,12 @@ objs = $(srcs:.mdwn=.html)
all: $(objs)
local:
- $(MAKE) DOCUMENT_BASE=$(PWD) MEDIA_BASE=$(PWD) all
+ $(MAKE) INDEX=index.html DOCUMENT_BASE=$(PWD) MEDIA_BASE=$(PWD) all
$(objs): Makefile includes/header.html includes/footer.html
.mdwn.html:
- markdown $< | ssic -o $@ $(SSIFLAGS) -
+ markdown $< | ssic -o - $(SSIFLAGS) - | sed '$(INDEX_SCRIPT)' >$@
clean:
rm -f $(objs)