- rm -f $(CLEAN)
-
-dist: mdocml-$(VERSION).tar.gz
-
-port: mdocml-oport-$(VERSION).tar.gz
-
-regress:: mdocml
- @for f in $(FAIL); do \
- echo "./mdocml $$f" ; \
- ./mdocml $$f 2>/dev/null || continue ; exit 1 ; done
- @for f in $(SUCCEED); do \
- echo "./mdocml $$f" ; \
- ./mdocml $$f 2>/dev/null || exit 1 ; done
-
-install:
- mkdir -p $(PREFIX)/bin/
- mkdir -p $(PREFIX)/include/mdoc/
- mkdir -p $(PREFIX)/lib/
- mkdir -p $(PREFIX)/man/man1/
- install -m 0755 mdocml $(PREFIX)/bin/
- install -m 0444 mdocml.1 $(PREFIX)/man/man1/
- install -m 0444 mdoc.3 $(PREFIX)/man/man3/
- install -m 0644 libmdoc.a $(PREFIX)/lib/
- install -m 0444 mdoc.h $(PREFIX)/include/
-
-install-dist: mdocml-$(VERSION).tar.gz mdocml-oport-$(VERSION).tar.gz
- install -m 0644 mdocml-$(VERSION).tar.gz $(PREFIX)/
- install -m 0644 mdocml-$(VERSION).tar.gz $(PREFIX)/mdocml.tar.gz
- install -m 0644 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/
- install -m 0644 mdocml-oport-$(VERSION).tar.gz $(PREFIX)/mdocml-oport.tar.gz
-
-uninstall:
- rm -f $(PREFIX)/bin/mdocml
- rm -f $(PREFIX)/man/man1/mdocml.1
- rm -f $(PREFIX)/man/man3/mdoc.3
- rm -f $(PREFIX)/lib/libmdoc.a
- rm -f $(PREFIX)/include/mdoc.h
-
-macro.ln: macro.c private.h
-
-macro.o: macro.c private.h
-
-tree.ln: tree.c mdoc.h
-
-tree.o: tree.c mdoc.h
-
-term.ln: term.c private.h
-
-term.o: term.c private.h
-
-strings.ln: strings.c private.h
-
-strings.o: strings.c private.h
-
-hash.ln: hash.c private.h
-
-hash.o: hash.c private.h
-
-mdoc.ln: mdoc.c private.h
-
-mdoc.o: mdoc.c private.h
-
-mdocml.ln: mdocml.c mdoc.h
-
-mdocml.o: mdocml.c mdoc.h
-
-xstd.ln: xstd.c private.h
-
-xstd.o: xstd.c private.h
-
-argv.ln: argv.c private.h
-
-argv.o: argv.c private.h
-
-validate.ln: validate.c private.h
-
-validate.o: validate.c private.h
-
-action.ln: action.c private.h
-
-action.o: action.c private.h
-
-private.h: mdoc.h
-
-mdocml-oport-$(VERSION).tar.gz: Makefile.port DESCR
- mkdir -p .dist/mdocml/pkg
- sed -e "s!@VERSION@!$(VERSION)!" Makefile.port > .dist/mdocml/Makefile
- md5 mdocml-$(VERSION).tar.gz > .dist/mdocml/distinfo
- rmd160 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
- sha1 mdocml-$(VERSION).tar.gz >> .dist/mdocml/distinfo
- install -m 0644 DESCR .dist/mdocml/pkg/DESCR
- echo @comment $$OpenBSD$$ > .dist/mdocml/pkg/PLIST
- echo bin/mdocml >> .dist/mdocml/pkg/PLIST
- echo lib/libmdoc.a >> .dist/mdocml/pkg/PLIST
- echo include/mdoc.h >> .dist/mdocml/pkg/PLIST
- echo @man man/man1/mdocml.1 >> .dist/mdocml/pkg/PLIST
- echo @man man/man3/mdoc.3 >> .dist/mdocml/pkg/PLIST
- ( cd .dist/ && tar zcf ../$@ mdocml/ )
- rm -rf .dist/
-
-mdocml-$(VERSION).tar.gz: $(INSTALL)
- mkdir -p .dist/mdocml/mdocml-$(VERSION)/
- install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
- ( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
+ rm -f libmandoc.a $(LIBMANDOC_OBJS)
+ rm -f llib-llibmandoc.ln $(LIBMANDOC_LNS)
+ rm -f makewhatis $(MAKEWHATIS_OBJS)
+ rm -f llib-lmakewhatis.ln $(MAKEWHATIS_LNS)
+ rm -f preconv $(PRECONV_OBJS)
+ rm -f llib-lpreconv.ln $(PRECONV_LNS)
+ rm -f mandoc $(MANDOC_OBJS)
+ rm -f llib-lmandoc.ln $(MANDOC_LNS)
+ rm -f config.h config.log compat.o compat.ln
+ rm -f mdocml.tar.gz
+ rm -f index.html $(INDEX_OBJS)
+
+install: all
+ mkdir -p $(DESTDIR)$(BINDIR)
+ mkdir -p $(DESTDIR)$(EXAMPLEDIR)
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ mkdir -p $(DESTDIR)$(INCLUDEDIR)
+ mkdir -p $(DESTDIR)$(MANDIR)/man1
+ mkdir -p $(DESTDIR)$(MANDIR)/man3
+ mkdir -p $(DESTDIR)$(MANDIR)/man7
+ $(INSTALL_PROGRAM) mandoc $(DESTDIR)$(BINDIR)
+ $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
+ $(INSTALL_LIB) mandoc.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL_MAN) mandoc.1 $(DESTDIR)$(MANDIR)/man1
+ $(INSTALL_MAN) mandoc.3 $(DESTDIR)$(MANDIR)/man3
+ $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 $(DESTDIR)$(MANDIR)/man7
+ $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR)
+
+installwww: www
+ mkdir -p $(PREFIX)/snapshots
+ $(INSTALL_DATA) index.html external.png index.css $(PREFIX)
+ $(INSTALL_DATA) $(INDEX_MANS) style.css $(PREFIX)
+ $(INSTALL_DATA) mandoc.h.html man.h.html mdoc.h.html $(PREFIX)
+ $(INSTALL_DATA) mdocml.tar.gz $(PREFIX)/snapshots
+ $(INSTALL_DATA) mdocml.md5 $(PREFIX)/snapshots
+ $(INSTALL_DATA) mdocml.tar.gz $(PREFIX)/snapshots/mdocml-$(VERSION).tar.gz
+ $(INSTALL_DATA) mdocml.md5 $(PREFIX)/snapshots/mdocml-$(VERSION).md5
+
+libmandoc.a: compat.o $(LIBMANDOC_OBJS)
+ $(AR) rs $@ compat.o $(LIBMANDOC_OBJS)
+
+llib-llibmandoc.ln: compat.ln $(LIBMANDOC_LNS)
+ $(LINT) $(LINTFLAGS) -Clibmandoc compat.ln $(LIBMANDOC_LNS)
+
+mandoc: $(MANDOC_OBJS) libmandoc.a
+ $(CC) -o $@ $(MANDOC_OBJS) libmandoc.a
+
+llib-lmandoc.ln: $(MANDOC_LNS)
+ $(LINT) $(LINTFLAGS) -Cmandoc $(MANDOC_LNS)
+
+# You'll need -ldb for Linux.
+makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a
+ $(CC) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a
+
+llib-lmakewhatis.ln: $(MAKEWHATIS_LNS)
+ $(LINT) $(LINTFLAGS) -Cmakewhatis $(MAKEWHATIS_LNS)
+
+preconv: $(PRECONV_OBJS)
+ $(CC) -o $@ $(PRECONV_OBJS)
+
+llib-lpreconv.ln: $(PRECONV_LNS)
+ $(LINT) $(LINTFLAGS) -Cpreconv $(PRECONV_LNS)
+
+mdocml.md5: mdocml.tar.gz
+ md5 mdocml.tar.gz >$@
+
+mdocml.tar.gz: $(SRCS)
+ mkdir -p .dist/mdocml-$(VERSION)/
+ $(INSTALL) -m 0444 $(SRCS) .dist/mdocml-$(VERSION)
+ ( cd .dist/ && tar zcf ../$@ ./ )