version 1.224, 2009/10/09 15:10:41 |
version 1.246, 2010/01/01 17:14:26 |
Line 4 BINDIR = $(PREFIX)/bin |
|
Line 4 BINDIR = $(PREFIX)/bin |
|
INCLUDEDIR = $(PREFIX)/include |
INCLUDEDIR = $(PREFIX)/include |
LIBDIR = $(PREFIX)/lib |
LIBDIR = $(PREFIX)/lib |
MANDIR = $(PREFIX)/man |
MANDIR = $(PREFIX)/man |
|
EXAMPLEDIR = $(PREFIX)/share/examples/mandoc |
INSTALL_PROGRAM = install -m 0755 |
INSTALL_PROGRAM = install -m 0755 |
INSTALL_DATA = install -m 0444 |
INSTALL_DATA = install -m 0444 |
INSTALL_LIB = install -m 0644 |
INSTALL_LIB = install -m 0644 |
INSTALL_MAN = $(INSTALL_DATA) |
INSTALL_MAN = $(INSTALL_DATA) |
|
|
VERSION = 1.9.7 |
VERSION = 1.9.14 |
VDATE = 9 October 2009 |
VDATE = 16 November 2009 |
|
|
VFLAGS = -DVERSION=\"$(VERSION)\" |
VFLAGS = -DVERSION="\"$(VERSION)\"" -DHAVE_CONFIG_H |
CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -g |
WFLAGS = -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings |
CFLAGS += $(VFLAGS) |
CFLAGS += -g $(VFLAGS) $(WFLAGS) |
|
#CFLAGS += -DOSNAME="\"OpenBSD 4.5\"" |
LINTFLAGS += $(VFLAGS) |
LINTFLAGS += $(VFLAGS) |
|
|
MANDOCFLAGS = -Wall -fstrict |
MANDOCFLAGS = -Wall -fstrict |
MANDOCHTML = -Thtml -ostyle=style.css,man=%N.%S.html,includes=%I.html |
MANDOCHTML = -Thtml -Ostyle=style.css,man=%N.%S.html,includes=%I.html |
|
|
MDOCLNS = mdoc_macro.ln mdoc.ln mdoc_hash.ln mdoc_strings.ln \ |
MDOCLNS = mdoc_macro.ln mdoc.ln mdoc_hash.ln mdoc_strings.ln \ |
mdoc_argv.ln mdoc_validate.ln mdoc_action.ln \ |
mdoc_argv.ln mdoc_validate.ln mdoc_action.ln \ |
Line 54 SRCS = $(MDOCSRCS) $(MAINSRCS) $(MANSRCS) |
|
Line 56 SRCS = $(MDOCSRCS) $(MAINSRCS) $(MANSRCS) |
|
DATAS = arch.in att.in lib.in msec.in st.in \ |
DATAS = arch.in att.in lib.in msec.in st.in \ |
vol.in chars.in |
vol.in chars.in |
HEADS = mdoc.h libmdoc.h man.h libman.h term.h \ |
HEADS = mdoc.h libmdoc.h man.h libman.h term.h \ |
libmandoc.h html.h chars.h out.h |
libmandoc.h html.h chars.h out.h main.h |
GSGMLS = mandoc.1.sgml mdoc.3.sgml mdoc.7.sgml manuals.7.sgml \ |
GSGMLS = mandoc.1.sgml mdoc.3.sgml mdoc.7.sgml manuals.7.sgml \ |
mandoc_char.7.sgml man.7.sgml man.3.sgml |
mandoc_char.7.sgml man.7.sgml man.3.sgml |
SGMLS = index.sgml $(GSGMLS) |
SGMLS = index.sgml |
|
HTMLS = ChangeLog.html index.html |
XSLS = ChangeLog.xsl |
XSLS = ChangeLog.xsl |
HTMLS = index.html mandoc.1.html mdoc.3.html \ |
GHTMLS = mandoc.1.html mdoc.3.html man.3.html mdoc.7.html \ |
man.3.html mdoc.7.html man.7.html mandoc_char.7.html \ |
man.7.html mandoc_char.7.html manuals.7.html |
manuals.7.html |
|
TEXTS = mandoc.1.txt mdoc.3.txt man.3.txt mdoc.7.txt man.7.txt \ |
TEXTS = mandoc.1.txt mdoc.3.txt man.3.txt mdoc.7.txt man.7.txt \ |
mandoc_char.7.txt manuals.7.txt ChangeLog.txt |
mandoc_char.7.txt manuals.7.txt ChangeLog.txt |
EXAMPLES = example.style.css |
EXAMPLES = example.style.css |
Line 72 TARGZS = mdocml-$(VERSION).tar.gz |
|
Line 74 TARGZS = mdocml-$(VERSION).tar.gz |
|
MANS = mandoc.1 mdoc.3 mdoc.7 manuals.7 mandoc_char.7 \ |
MANS = mandoc.1 mdoc.3 mdoc.7 manuals.7 mandoc_char.7 \ |
man.7 man.3 |
man.7 man.3 |
BINS = mandoc |
BINS = mandoc |
|
TESTS = test-strlcat.c test-strlcpy.c |
|
CONFIGS = config.h.pre config.h.post |
CLEAN = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \ |
CLEAN = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \ |
$(TARGZS) tags $(MD5S) $(XMLS) $(TEXTS) $(GSGMLS) |
$(TARGZS) tags $(MD5S) $(XMLS) $(TEXTS) $(GSGMLS) \ |
|
$(GHTMLS) config.h config.log |
INSTALL = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \ |
INSTALL = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \ |
$(DATAS) $(XSLS) $(EXAMPLES) |
$(DATAS) $(XSLS) $(EXAMPLES) $(TESTS) $(CONFIGS) |
|
|
all: $(BINS) |
all: $(BINS) |
|
|
|
|
cleanlint: |
cleanlint: |
rm -f $(LNS) $(LLNS) |
rm -f $(LNS) $(LLNS) |
|
|
|
cleanhtml: |
|
rm -f $(HTMLS) $(GSGMLS) $(GHTMLS) |
|
|
dist: mdocml-$(VERSION).tar.gz |
dist: mdocml-$(VERSION).tar.gz |
|
|
www: all $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS) |
www: all $(GSGMLS) $(GHTMLS) $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS) |
|
|
|
htmls: all $(GSGMLS) $(GHTMLS) |
|
|
installwww: www |
installwww: www |
install -m 0444 $(HTMLS) $(TEXTS) $(STATICS) $(PREFIX)/ |
install -m 0444 $(GHTMLS) $(HTMLS) $(TEXTS) $(STATICS) $(PREFIX)/ |
install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/ |
install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/ |
install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/ |
install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/ |
install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz |
install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz |
|
|
|
|
install: |
install: |
mkdir -p $(BINDIR) |
mkdir -p $(BINDIR) |
|
mkdir -p $(EXAMPLEDIR) |
mkdir -p $(MANDIR)/man1 |
mkdir -p $(MANDIR)/man1 |
mkdir -p $(MANDIR)/man7 |
mkdir -p $(MANDIR)/man7 |
$(INSTALL_PROGRAM) mandoc $(BINDIR) |
$(INSTALL_PROGRAM) mandoc $(BINDIR) |
$(INSTALL_MAN) mandoc.1 $(MANDIR)/man1 |
$(INSTALL_MAN) mandoc.1 $(MANDIR)/man1 |
$(INSTALL_MAN) mdoc.7 $(MANDIR)/man7 |
$(INSTALL_MAN) man.7 mdoc.7 $(MANDIR)/man7 |
|
$(INSTALL_DATA) example.style.css $(EXAMPLEDIR) |
|
|
uninstall: |
uninstall: |
rm -f $(BINDIR)/mandoc |
rm -f $(BINDIR)/mandoc |
rm -f $(MANDIR)/man1/mandoc.1 |
rm -f $(MANDIR)/man1/mandoc.1 |
rm -f $(MANDIR)/man7/mdoc.7 |
rm -f $(MANDIR)/man7/mdoc.7 |
|
rm -f $(MANDIR)/man7/man.7 |
|
rm -f $(EXAMPLEDIR)/example.style.css |
|
|
|
$(OBJS): config.h |
|
|
man_macro.ln: man_macro.c libman.h |
man_macro.ln: man_macro.c libman.h |
man_macro.o: man_macro.c libman.h |
man_macro.o: man_macro.c libman.h |
|
|
Line 231 mandoc: $(MAINOBJS) libmdoc.a libman.a |
|
Line 247 mandoc: $(MAINOBJS) libmdoc.a libman.a |
|
$(CC) $(CFLAGS) -o $@ $(MAINOBJS) libmdoc.a libman.a |
$(CC) $(CFLAGS) -o $@ $(MAINOBJS) libmdoc.a libman.a |
|
|
.sgml.html: |
.sgml.html: |
validate $< |
validate --warn $< |
sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@ |
sed -e "s!@VERSION@!$(VERSION)!" -e "s!@VDATE@!$(VDATE)!" $< > $@ |
|
|
.1.1.txt: |
.1.1.txt .3.3.txt .7.7.txt: |
./mandoc $(MANDOCFLAGS) $< | col -b > $@ |
./mandoc $(MANDOCFLAGS) $< | col -b > $@ |
|
|
.1.1.sgml: |
.1.1.sgml .3.3.sgml .7.7.sgml: |
./mandoc $(MANDOCFLAGS) $(MANDOCHTML) $< > $@ |
./mandoc $(MANDOCFLAGS) $(MANDOCHTML) $< > $@ |
|
|
.3.3.txt: |
|
./mandoc $(MANDOCFLAGS) $< | col -b > $@ |
|
|
|
.3.3.sgml: |
|
./mandoc $(MANDOCFLAGS) $(MANDOCHTML) $< > $@ |
|
|
|
.7.7.txt: |
|
./mandoc $(MANDOCFLAGS) $< | col -b > $@ |
|
|
|
.7.7.sgml: |
|
./mandoc $(MANDOCFLAGS) $(MANDOCHTML) $< > $@ |
|
|
|
.tar.gz.md5: |
.tar.gz.md5: |
md5 $< > $@ |
md5 $< > $@ |
|
|
|
config.h: config.h.pre config.h.post |
|
rm -f config.log |
|
( cat config.h.pre; \ |
|
echo; \ |
|
if $(CC) $(CFLAGS) -c test-strlcat.c >> config.log 2>&1; then \ |
|
echo '#define HAVE_STRLCAT'; \ |
|
rm test-strlcat.o; \ |
|
fi; \ |
|
if $(CC) $(CFLAGS) -c test-strlcpy.c >> config.log 2>&1; then \ |
|
echo '#define HAVE_STRLCPY'; \ |
|
rm test-strlcpy.o; \ |
|
fi; \ |
|
echo; \ |
|
cat config.h.post \ |
|
) > $@ |