summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index bf08ff06..5e208c5a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+.SUFFIXES: .html .sgml
+
VERSION = 1.3.0
CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -g
@@ -33,13 +35,20 @@ SRCS = macro.c mdoc.c hash.c strings.c xstd.c argv.c validate.c \
HEADS = mdoc.h private.h term.h mmain.h
+SGMLS = index.sgml
+
+HTMLS = index.html
+
+STATICS = style.css external.png
+
MANS = mdoctree.1 mdocterm.1 mdoc.3
BINS = mdocterm mdoctree mdoclint
-CLEAN = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS)
+CLEAN = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS)
-INSTALL = $(SRCS) $(HEADS) Makefile Makefile.port DESCR $(MANS)
+INSTALL = $(SRCS) $(HEADS) Makefile Makefile.port DESCR $(MANS) \
+ $(SGMLS) $(STATICS)
FAIL = regress/test.empty \
regress/test.prologue.00 \
@@ -104,6 +113,8 @@ dist: mdocml-$(VERSION).tar.gz
port: mdocml-oport-$(VERSION).tar.gz
+www: $(HTMLS)
+
regress:: mdoclint
@for f in $(FAIL); do \
echo "./mdoclint $$f" ; \
@@ -231,3 +242,7 @@ mdoctree: $(TREEOBJS) libmdoc.a
mdoclint: $(LINTOBJS) libmdoc.a
$(CC) $(CFLAGS) -o $@ $(LINTOBJS) libmdoc.a
+
+.sgml.html:
+ validate $<
+ cp -f $< $@