=================================================================== RCS file: /cvs/mandoc/Makefile,v retrieving revision 1.370 retrieving revision 1.375 diff -u -p -r1.370 -r1.375 --- mandoc/Makefile 2011/09/02 13:04:05 1.370 +++ mandoc/Makefile 2011/10/08 12:47:40 1.375 @@ -9,16 +9,20 @@ # Specify this if you want to hard-code the operating system to appear # in the lower-left hand corner of -mdoc manuals. +# # CFLAGS += -DOSNAME="\"OpenBSD 4.5\"" -VERSION = 1.11.7 -VDATE = 2 September 2011 +VERSION = 1.12.0 +VDATE = 8 October 2011 + # IFF your system supports multi-byte functions (setlocale(), wcwidth(), # putwchar()) AND has __STDC_ISO_10646__ (that is, wchar_t is simply a # UCS-4 value) should you define USE_WCHAR. If you define it and your # system DOESN'T support this, -Tlocale will produce garbage. # If you don't define it, -Tlocale is a synonym for -Tacsii. +# CFLAGS += -DUSE_WCHAR + CFLAGS += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\"" CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings PREFIX = /usr/local @@ -34,12 +38,19 @@ INSTALL_LIB = $(INSTALL) -m 0644 INSTALL_SOURCE = $(INSTALL) -m 0644 INSTALL_MAN = $(INSTALL_DATA) -# Linux needs -ldb to compile mandocdb. +# Non-BSD systems (Linux, etc.) need -ldb to compile mandocdb and +# apropos. +# However, if you don't have -ldb at all (or it's not native), then +# comment out apropos and mandocdb. +# #DBLIB = -ldb +DBBIN = apropos mandocdb -all: mandoc preconv demandoc +all: mandoc preconv demandoc $(DBBIN) SRCS = Makefile \ + apropos.1 \ + apropos.c \ arch.c \ arch.in \ att.c \ @@ -93,6 +104,7 @@ SRCS = Makefile \ mdoc_hash.c \ mdoc_html.c \ mdoc_macro.c \ + mdoc_man.c \ mdoc_term.c \ mdoc_validate.c \ msec.c \ @@ -220,6 +232,9 @@ MANDOC_HTML_LNS = eqn_html.ln \ mdoc_html.ln \ tbl_html.ln +MANDOC_MAN_OBJS = mdoc_man.o +MANDOC_MAN_LNS = mdoc_man.ln + MANDOC_TERM_OBJS = eqn_term.o \ man_term.o \ mdoc_term.o \ @@ -236,11 +251,13 @@ MANDOC_TERM_LNS = eqn_term.ln \ tbl_term.ln MANDOC_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_MAN_OBJS) \ $(MANDOC_TERM_OBJS) \ main.o \ out.o \ tree.o MANDOC_LNS = $(MANDOC_HTML_LNS) \ + $(MANDOC_MAN_LNS) \ $(MANDOC_TERM_LNS) \ main.ln \ out.ln \ @@ -260,12 +277,22 @@ PRECONV_LNS = preconv.ln $(PRECONV_OBJS) $(PRECONV_LNS): config.h +APROPOS_OBJS = apropos.o +APROPOS_LNS = apropos.ln + +$(APROPOS_OBJS) $(APROPOS_LNS): config.h mandoc.h + DEMANDOC_OBJS = demandoc.o DEMANDOC_LNS = demandoc.ln $(DEMANDOC_OBJS) $(DEMANDOC_LNS): config.h -INDEX_MANS = demandoc.1.html \ +INDEX_MANS = apropos.1.html \ + apropos.1.xhtml \ + apropos.1.ps \ + apropos.1.pdf \ + apropos.1.txt \ + demandoc.1.html \ demandoc.1.xhtml \ demandoc.1.ps \ demandoc.1.pdf \ @@ -341,6 +368,8 @@ clean: rm -f llib-lmandocdb.ln $(MANDOCDB_LNS) rm -f preconv $(PRECONV_OBJS) rm -f llib-lpreconv.ln $(PRECONV_LNS) + rm -f apropos $(APROPOS_OBJS) + rm -f llib-lapropos.ln $(APROPOS_LNS) rm -f demandoc $(DEMANDOC_OBJS) rm -f llib-ldemandoc.ln $(DEMANDOC_LNS) rm -f mandoc $(MANDOC_OBJS) @@ -406,6 +435,12 @@ preconv: $(PRECONV_OBJS) llib-lpreconv.ln: $(PRECONV_LNS) $(LINT) $(LINTFLAGS) -Cpreconv $(PRECONV_LNS) +apropos: $(APROPOS_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(APROPOS_OBJS) libmandoc.a $(DBLIB) + +llib-lapropos.ln: $(APROPOS_LNS) + $(LINT) $(LINTFLAGS) -Capropos $(APROPOS_LNS) + demandoc: $(DEMANDOC_OBJS) libmandoc.a $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a @@ -425,7 +460,7 @@ mdocml-win32.zip: $(SRCS) mkdir -p .win32/mdocml-$(VERSION)/ $(INSTALL_SOURCE) $(SRCS) .win32 cp .win32/Makefile .win32/Makefile.old - grep -v DUSE_WCHAR .win32/Makefile.old >.win32/Makefile + egrep -v -e DUSE_WCHAR -e ^DBBIN .win32/Makefile.old >.win32/Makefile ( cd .win32; \ CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \ make install PREFIX=mdocml-$(VERSION) ; \ @@ -436,7 +471,7 @@ mdocml-win64.zip: $(SRCS) mkdir -p .win64/mdocml-$(VERSION)/ $(INSTALL_SOURCE) $(SRCS) .win64 cp .win64/Makefile .win64/Makefile.old - grep -v DUSE_WCHAR .win64/Makefile.old >.win64/Makefile + egrep -v -e DUSE_WCHAR -e ^DBBIN .win64/Makefile.old >.win64/Makefile ( cd .win64; \ CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar CFLAGS='-DOSNAME=\"Windows\"' make; \ make install PREFIX=mdocml-$(VERSION) ; \