=================================================================== RCS file: /cvs/mandoc/Makefile,v retrieving revision 1.325 retrieving revision 1.340 diff -u -p -r1.325 -r1.340 --- mandoc/Makefile 2011/03/29 09:37:24 1.325 +++ mandoc/Makefile 2011/05/18 09:45:21 1.340 @@ -11,9 +11,12 @@ # in the lower-left hand corner of -mdoc manuals. # CFLAGS += -DOSNAME="\"OpenBSD 4.5\"" -VERSION = 1.10.10 -VDATE = 20 March 2011 -CFLAGS += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\"" +VERSION = 1.11.2 +VDATE = 12 May 2011 +# If your system doesn't support multi-byte functions (specifically +# setlocale(), wcwidth(), putwchar()), then remove -DUSE_WCHAR. You'll +# still be able to use -Tlocale, but it becomes a synonym for -Tascii. +CFLAGS += -g -DUSE_WCHAR -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\"" CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings PREFIX = /usr/local BINDIR = $(PREFIX)/bin @@ -55,6 +58,7 @@ SRCS = Makefile \ libroff.h \ main.c \ main.h \ + man.h \ man.7 \ man.c \ man_hash.c \ @@ -66,7 +70,10 @@ SRCS = Makefile \ mandoc.3 \ mandoc.c \ mandoc.h \ + makewhatis.1 \ + makewhatis.c \ mandoc_char.7 \ + mdoc.h \ mdoc.7 \ mdoc.c \ mdoc_argv.c \ @@ -150,16 +157,19 @@ LIBROFF_LNS = eqn.ln \ LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ $(LIBMDOC_OBJS) \ $(LIBROFF_OBJS) \ + chars.o \ mandoc.o \ read.o LIBMANDOC_LNS = $(LIBMAN_LNS) \ $(LIBMDOC_LNS) \ $(LIBROFF_LNS) \ + chars.ln \ mandoc.ln \ read.ln arch.o arch.ln: arch.in att.o att.ln: att.in +chars.o chars.ln: chars.in lib.o lib.ln: lib.in msec.o msec.ln: msec.in st.o st.ln: st.in @@ -194,26 +204,32 @@ MANDOC_TERM_LNS = man_term.ln \ MANDOC_OBJS = $(MANDOC_HTML_OBJS) \ $(MANDOC_TERM_OBJS) \ - chars.o \ main.o \ out.o \ tree.o MANDOC_LNS = $(MANDOC_HTML_LNS) \ $(MANDOC_TERM_LNS) \ - chars.ln \ main.ln \ out.ln \ tree.ln -chars.o chars.ln: chars.in - $(MANDOC_HTML_OBJS) $(MANDOC_HTML_LNS): html.h $(MANDOC_TERM_OBJS) $(MANDOC_TERM_LNS): term.h $(MANDOC_OBJS) $(MANDOC_LNS): main.h mandoc.h mdoc.h man.h config.h out.h compat.o compat.ln: config.h -INDEX_MANS = mandoc.1.html \ +MAKEWHATIS_OBJS = makewhatis.o +MAKEWHATIS_LNS = makewhatis.ln + +$(MAKEWHATIS_OBJS) $(MAKEWHATIS_LNS): mandoc.h mdoc.h man.h config.h + +INDEX_MANS = makewhatis.1.html \ + makewhatis.1.xhtml \ + makewhatis.1.ps \ + makewhatis.1.pdf \ + makewhatis.1.txt \ + mandoc.1.html \ mandoc.1.xhtml \ mandoc.1.ps \ mandoc.1.pdf \ @@ -270,6 +286,8 @@ lint: llib-llibmandoc.ln llib-lmandoc.ln clean: 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 mandoc $(MANDOC_OBJS) rm -f llib-lmandoc.ln $(MANDOC_LNS) rm -f config.h config.log compat.o compat.ln @@ -279,11 +297,14 @@ clean: 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 @@ -308,8 +329,15 @@ llib-llibmandoc.ln: compat.ln $(LIBMANDOC_LNS) mandoc: $(MANDOC_OBJS) libmandoc.a $(CC) -o $@ $(MANDOC_OBJS) libmandoc.a +# You'll need -ldb for Linux. +makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a + $(CC) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a + llib-lmandoc.ln: $(MANDOC_LNS) $(LINT) $(LINTFLAGS) -Cmandoc $(MANDOC_LNS) + +llib-lmakewhatis.ln: $(MAKEWHATIS_LNS) + $(LINT) $(LINTFLAGS) -Cmakewhatis $(MAKEWHATIS_LNS) mdocml.md5: mdocml.tar.gz md5 mdocml.tar.gz >$@