VERSION = 1.11.2
VDATE = 12 May 2011
-CFLAGS += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\""
+# 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 += -g -DUSE_WCHAR -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\""
CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
msec.in \
out.c \
out.h \
+ predefs.in \
read.c \
roff.7 \
roff.c \
chars.o chars.ln: chars.in
lib.o lib.ln: lib.in
msec.o msec.ln: msec.in
+roff.o roff.ln: predefs.in
st.o st.ln: st.in
vol.o vol.ln: vol.in
$(MAKEWHATIS_OBJS) $(MAKEWHATIS_LNS): mandoc.h mdoc.h man.h config.h
-INDEX_MANS = mandoc.1.html \
+PRECONV_OBJS = preconv.o
+PRECONV_LNS = preconv.ln
+
+$(PRECONV_OBJS) $(PRECONV_LNS): 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 \
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
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-lmandoc.ln: $(MANDOC_LNS)
- $(LINT) $(LINTFLAGS) -Cmandoc $(MANDOC_LNS)
-
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 >$@