version 1.419, 2014/04/24 00:29:45 |
version 1.427, 2014/08/05 01:45:02 |
|
|
|
|
# === USER SETTINGS ==================================================== |
# === USER SETTINGS ==================================================== |
|
|
|
# --- user settings relevant for all builds ---------------------------- |
|
|
# Specify this if you want to hard-code the operating system to appear |
# Specify this if you want to hard-code the operating system to appear |
# in the lower-left hand corner of -mdoc manuals. |
# in the lower-left hand corner of -mdoc manuals. |
# |
# |
|
|
# |
# |
CFLAGS += -DUSE_WCHAR |
CFLAGS += -DUSE_WCHAR |
|
|
# If your system has manpath(1), uncomment this. This is most any |
CFLAGS += -g -DHAVE_CONFIG_H |
# system that's not OpenBSD or NetBSD. If uncommented, manpage(1) and |
|
# makewhatis(8) will use manpath(1) to get the MANPATH variable. |
|
#CFLAGS += -DUSE_MANPATH |
|
|
|
# If your system does not support static binaries, comment this, |
|
# for example on Mac OS X. |
|
STATIC = -static |
|
# Linux requires -pthread to statically link with libdb. |
|
#STATIC += -pthread |
|
|
|
CFLAGS += -I/usr/local/include -g -DHAVE_CONFIG_H |
|
CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings |
CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings |
PREFIX = /usr/local |
PREFIX = /usr/local |
WWWPREFIX = /var/www |
|
HTDOCDIR = $(WWWPREFIX)/htdocs |
|
CGIBINDIR = $(WWWPREFIX)/cgi-bin |
|
BINDIR = $(PREFIX)/bin |
BINDIR = $(PREFIX)/bin |
INCLUDEDIR = $(PREFIX)/include/mandoc |
INCLUDEDIR = $(PREFIX)/include/mandoc |
LIBDIR = $(PREFIX)/lib/mandoc |
LIBDIR = $(PREFIX)/lib/mandoc |
MANDIR = $(PREFIX)/man |
MANDIR = $(PREFIX)/man |
EXAMPLEDIR = $(PREFIX)/share/examples/mandoc |
EXAMPLEDIR = $(PREFIX)/share/examples/mandoc |
|
|
INSTALL = install |
INSTALL = install |
INSTALL_PROGRAM = $(INSTALL) -m 0755 |
INSTALL_PROGRAM = $(INSTALL) -m 0555 |
INSTALL_DATA = $(INSTALL) -m 0444 |
INSTALL_DATA = $(INSTALL) -m 0444 |
INSTALL_LIB = $(INSTALL) -m 0644 |
INSTALL_LIB = $(INSTALL) -m 0444 |
INSTALL_SOURCE = $(INSTALL) -m 0644 |
INSTALL_SOURCE = $(INSTALL) -m 0644 |
INSTALL_MAN = $(INSTALL_DATA) |
INSTALL_MAN = $(INSTALL_DATA) |
|
|
|
# --- user settings related to database support ------------------------ |
|
|
# If you want to build without database support, for example to avoid |
# If you want to build without database support, for example to avoid |
# the dependency on SQLite3, comment the following two lines. |
# the dependency on SQLite3, comment the following line. |
DBLIB = -L/usr/local/lib -lsqlite3 |
# |
DBBIN = makewhatis manpage apropos |
DBBIN = makewhatis manpage apropos |
|
|
|
# If your system has manpath(1), uncomment this. This is most any |
|
# system that's not OpenBSD or NetBSD. If uncommented, apropos(1) |
|
# and makewhatis(8) will use manpath(1) to get the MANPATH variable. |
|
# |
|
#CFLAGS += -DUSE_MANPATH |
|
|
|
# On some systems, SQLite3 may be installed below /usr/local. |
|
# In that case, uncomment the following two lines. |
|
# |
|
#CFLAGS += -I/usr/local/include |
|
#DBLIB += -L/usr/local/lib |
|
|
|
# OpenBSD has the ohash functions in libutil. |
|
# Comment the following line if your system doesn't. |
|
# |
|
DBLIB += -lutil |
|
|
|
# --- user settings related to man.cgi --------------------------------- |
|
|
|
# To build man.cgi, copy cgi.h.example to cgi.h, edit it, |
|
# and enable the following line. |
|
# |
|
#DBBIN += man.cgi |
|
|
|
# If your system does not support static binaries, comment this, |
|
# for example on Mac OS X. |
|
# |
|
STATIC = -static |
|
|
|
# Linux requires -pthread for statical linking. |
|
# |
|
#STATIC += -pthread |
|
|
|
WWWPREFIX = /var/www |
|
HTDOCDIR = $(WWWPREFIX)/htdocs |
|
CGIBINDIR = $(WWWPREFIX)/cgi-bin |
|
|
# === END OF USER SETTINGS ============================================= |
# === END OF USER SETTINGS ============================================= |
|
|
ALLBIN = mandoc preconv demandoc $(DBBIN) |
ALLBIN = mandoc preconv demandoc $(DBBIN) |
|
DBLIB += -lsqlite3 |
|
|
all: $(ALLBIN) |
all: $(ALLBIN) |
|
|
Line 77 TESTSRCS = test-fgetln.c \ |
|
Line 106 TESTSRCS = test-fgetln.c \ |
|
test-mmap.c \ |
test-mmap.c \ |
test-ohash.c \ |
test-ohash.c \ |
test-reallocarray.c \ |
test-reallocarray.c \ |
|
test-strcasestr.c \ |
test-strlcat.c \ |
test-strlcat.c \ |
test-strlcpy.c \ |
test-strlcpy.c \ |
test-strnlen.c \ |
test-strptime.c \ |
test-strptime.c |
test-strsep.c |
|
|
SRCS = LICENSE \ |
SRCS = LICENSE \ |
Makefile \ |
Makefile \ |
|
Line 123 SRCS = LICENSE \ |
|
att.c \ |
att.c \ |
att.in \ |
att.in \ |
cgi.c \ |
cgi.c \ |
|
cgi.h.example \ |
chars.c \ |
chars.c \ |
chars.in \ |
chars.in \ |
compat_fgetln.c \ |
compat_fgetln.c \ |
Line 103 SRCS = LICENSE \ |
|
Line 134 SRCS = LICENSE \ |
|
compat_strcasestr.c \ |
compat_strcasestr.c \ |
compat_strlcat.c \ |
compat_strlcat.c \ |
compat_strlcpy.c \ |
compat_strlcpy.c \ |
compat_strnlen.c \ |
|
compat_strsep.c \ |
compat_strsep.c \ |
config.h.post \ |
config.h.post \ |
config.h.pre \ |
config.h.pre \ |
Line 129 SRCS = LICENSE \ |
|
Line 159 SRCS = LICENSE \ |
|
makewhatis.8 \ |
makewhatis.8 \ |
man.7 \ |
man.7 \ |
man.c \ |
man.c \ |
|
man.cgi.8 \ |
man-cgi.css \ |
man-cgi.css \ |
man.h \ |
man.h \ |
man_hash.c \ |
man_hash.c \ |
Line 144 SRCS = LICENSE \ |
|
Line 175 SRCS = LICENSE \ |
|
mandoc_aux.c \ |
mandoc_aux.c \ |
mandoc_aux.h \ |
mandoc_aux.h \ |
mandoc_char.7 \ |
mandoc_char.7 \ |
|
mandoc_html.3 \ |
mandocdb.c \ |
mandocdb.c \ |
manpage.c \ |
manpage.c \ |
manpath.c \ |
manpath.c \ |
Line 231 COMPAT_OBJS = compat_fgetln.o \ |
|
Line 263 COMPAT_OBJS = compat_fgetln.o \ |
|
compat_strcasestr.o \ |
compat_strcasestr.o \ |
compat_strlcat.o \ |
compat_strlcat.o \ |
compat_strlcpy.o \ |
compat_strlcpy.o \ |
compat_strnlen.o \ |
|
compat_strsep.o |
compat_strsep.o |
|
|
# === DEPENDENCY HANDLING ============================================== |
# === DEPENDENCY HANDLING ============================================== |
|
|
roff.o: predefs.in |
roff.o: predefs.in |
st.o: st.in |
st.o: st.in |
vol.o: vol.in |
vol.o: vol.in |
|
cgi.o: cgi.h |
|
|
$(LIBMAN_OBJS): libman.h |
$(LIBMAN_OBJS): libman.h |
$(LIBMDOC_OBJS): libmdoc.h |
$(LIBMDOC_OBJS): libmdoc.h |
Line 287 $(PRECONV_OBJS): config.h |
|
Line 319 $(PRECONV_OBJS): config.h |
|
APROPOS_OBJS = apropos.o mansearch.o mansearch_const.o manpath.o |
APROPOS_OBJS = apropos.o mansearch.o mansearch_const.o manpath.o |
$(APROPOS_OBJS): config.h mandoc.h mandoc_aux.h manpath.h mansearch.h |
$(APROPOS_OBJS): config.h mandoc.h mandoc_aux.h manpath.h mansearch.h |
|
|
|
CGI_OBJS = $(MANDOC_HTML_OBJS) \ |
|
cgi.o \ |
|
mansearch.o \ |
|
mansearch_const.o \ |
|
out.o |
|
$(CGI_OBJS): main.h out.h config.h mandoc.h mandoc_aux.h \ |
|
manpath.h mansearch.h |
|
|
MANPAGE_OBJS = manpage.o mansearch.o mansearch_const.o manpath.o |
MANPAGE_OBJS = manpage.o mansearch.o mansearch_const.o manpath.o |
$(MANPAGE_OBJS): config.h mandoc.h mandoc_aux.h manpath.h mansearch.h |
$(MANPAGE_OBJS): config.h mandoc.h mandoc_aux.h manpath.h mansearch.h |
|
|
Line 298 WWW_MANS = apropos.1.html \ |
|
Line 338 WWW_MANS = apropos.1.html \ |
|
mandoc.1.html \ |
mandoc.1.html \ |
preconv.1.html \ |
preconv.1.html \ |
mandoc.3.html \ |
mandoc.3.html \ |
|
mandoc_html.3.html \ |
mansearch.3.html \ |
mansearch.3.html \ |
tbl.3.html \ |
tbl.3.html \ |
mandoc.db.5.html \ |
mandoc.db.5.html \ |
Line 308 WWW_MANS = apropos.1.html \ |
|
Line 349 WWW_MANS = apropos.1.html \ |
|
roff.7.html \ |
roff.7.html \ |
tbl.7.html \ |
tbl.7.html \ |
makewhatis.8.html \ |
makewhatis.8.html \ |
|
man.cgi.8.html \ |
man.h.html \ |
man.h.html \ |
mandoc.h.html \ |
mandoc.h.html \ |
mandoc_aux.h.html \ |
mandoc_aux.h.html \ |
|
|
rm -f apropos $(APROPOS_OBJS) |
rm -f apropos $(APROPOS_OBJS) |
rm -f makewhatis $(MAKEWHATIS_OBJS) |
rm -f makewhatis $(MAKEWHATIS_OBJS) |
rm -f preconv $(PRECONV_OBJS) |
rm -f preconv $(PRECONV_OBJS) |
|
rm -f man.cgi $(CGI_OBJS) |
rm -f manpage $(MANPAGE_OBJS) |
rm -f manpage $(MANPAGE_OBJS) |
rm -f demandoc $(DEMANDOC_OBJS) |
rm -f demandoc $(DEMANDOC_OBJS) |
rm -f mandoc $(MANDOC_OBJS) |
rm -f mandoc $(MANDOC_OBJS) |
|
|
installcgi: all |
installcgi: all |
mkdir -p $(DESTDIR)$(CGIBINDIR) |
mkdir -p $(DESTDIR)$(CGIBINDIR) |
mkdir -p $(DESTDIR)$(HTDOCDIR) |
mkdir -p $(DESTDIR)$(HTDOCDIR) |
#$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) |
mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1 |
|
mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8 |
|
$(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) |
$(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css |
$(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css |
$(INSTALL_DATA) man-cgi.css $(DESTDIR)$(HTDOCDIR) |
$(INSTALL_DATA) man-cgi.css $(DESTDIR)$(HTDOCDIR) |
|
$(INSTALL_MAN) apropos.1 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1/ |
|
$(INSTALL_MAN) man.cgi.8 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8/ |
|
|
installwww: www |
installwww: www |
mkdir -p $(DESTDIR)$(HTDOCDIR)/snapshots |
mkdir -p $(DESTDIR)$(HTDOCDIR)/snapshots |
Line 386 manpage: $(MANPAGE_OBJS) libmandoc.a |
|
Line 433 manpage: $(MANPAGE_OBJS) libmandoc.a |
|
|
|
apropos: $(APROPOS_OBJS) libmandoc.a |
apropos: $(APROPOS_OBJS) libmandoc.a |
$(CC) $(LDFLAGS) -o $@ $(APROPOS_OBJS) libmandoc.a $(DBLIB) |
$(CC) $(LDFLAGS) -o $@ $(APROPOS_OBJS) libmandoc.a $(DBLIB) |
|
|
|
man.cgi: $(CGI_OBJS) libmandoc.a |
|
$(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB) |
|
|
demandoc: $(DEMANDOC_OBJS) libmandoc.a |
demandoc: $(DEMANDOC_OBJS) libmandoc.a |
$(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a |
$(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a |