# Makefile for man2html
# Source: Makefile.in -- processed by configure, to create Makefile.
# Copyright (C) 1990, 1991, John W. Eaton.
# Copyright (C) 1994-2001, Andries E. Brouwer
# Copyright (C) 2005, Keith D. Marshall <email@example.com>
# This file is part of the man package.
# man is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
# man is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# You should have received a copy of the GNU General Public License along
# with man; see the file COPYING. If not, write to the Free Software
# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
# Package identification.
package = @PACKAGE_NAME@
version = @PACKAGE_VERSION@
# To allow building in a separate build directory,
# (when the "make" program in use supports the VPATH capability),
# set up the srcdir mapping to VPATH.
srcdir = @srcdir@
VPATH = $(srcdir)
# Other autoconf defined path names.
top_builddir = @top_builddir@
CC = @CC@
CWARN = @CWARN@
CFLAGS = @CFLAGS@ $(CWARN) -I$(top_builddir)/src
OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
bindir = $(DESTDIR)$(PREFIX)/usr/bin
mandir = $(DESTDIR)$(PREFIX)@mandir@
vardir = $(DESTDIR)$(PREFIX)/var
httpdir = $(DESTDIR)$(PREFIX)/home/httpd
cgiowner = nobody
cgigroup = nobody
all: man2html hman
$(CC) $(LDFLAGS) -o man2html $(OBJECTS)
# man2html: $(top_builddir)/src/version.h
# This installs the man2html utility
install -m 755 man2html $(bindir)
mkdir -p $(mandir)/man1
install -m 644 man2html.1 $(mandir)/man1/man2html.@man1ext@
install-scripts: install-man-scripts install-glimpse-stuff install-hman
# These are the scripts that allow pointing a browser at
# to work.
mkdir -p $(httpdir)/cgi-bin/man
mkdir -p $(httpdir)/cgi-aux/man
install -m 755 scripts/cgi-bin/man/* $(httpdir)/cgi-bin/man
install -m 644 scripts/cgi-aux/man/* $(httpdir)/cgi-aux/man
install -d -o $(cgiowner) -g $(cgigroup) -m 775 $(vardir)/man2html
# (aux was renamed to cgi-aux since aux causes problems under DOS)
# If you have installed glimpse, and have compressed man pages,
# then perhaps you also want these filters.
install -m 644 glimpse_filters $(vardir)/man2html/.glimpse_filters
# In order not to have to type a long command like
# netscape http://localhost/cgi-bin/man/man2html?section+topic
# lynx lynxcgi:/home/httpd/cgi-bin/man/man2html?section+topic
# it is convenient to have some shell script as a wrapper.
# The script hman can be aliased to man. It uses an environment
# variable MANHTMLPAGER to find out which browser you use, and
# you can set MANHTMLHOST if the pages are not on localhost.
rm -f hman
sed -e 's,%version%,$(package)-$(version),' $(srcdir)/hman.sh > hman
install -m 555 hman $(bindir)/hman
install -m 644 hman.1 $(mandir)/man1/hman.@man1ext@
rm -f core hman man2html $(OBJECTS) *~
rm -f Makefile