#!smake
#	$Id: Makefile.in,v 1.3 2005/08/24 18:56:20 tim Exp $
#
# Copyright (c) 1994-1995 Sam Leffler
# Copyright (c) 1994-1995 Silicon Graphics, Inc.
# 
# Permission to use, copy, modify, distribute, and sell this software and 
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
# 
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
# 
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
# OF THIS SOFTWARE.
#
DEPTH=../..

include ${DEPTH}/defs

SRCDIR	= ${DEPTH}/${TOPSRCDIR}/html/tools
VPATH	= ../.././html/tools

CGIBIN=	/usr/local/httpd/cgi-bin

CFILES=\
	man2html.c	\
	unquote.c	\
	${NULL}
TARGETS=\
	unquote		\
	man2html	\
	manpage.sh	\
	${NULL}

default all::
	@${MAKE} incdepend
	@${MAKE} targets

targets: ${TARGETS}

include ${COMMONRULES}

man2html: ${SRCDIR}/man2html.c ${LIBS}
	${CCF} -o man2html ${SRCDIR}/man2html.c ${LDFLAGS}
unquote: ${SRCDIR}/unquote.c ${LIBS}
	${CCF} -o unquote ${SRCDIR}/unquote.c ${LDFLAGS}

PUTBIN=${INSTALL} -F ${CGIBIN} -idb ${PRODUCT}.html.cgi

#
# NB: the scripts are mode 555 'cuz certain servers
#     require they be readable; sigh.
#
install: default
	${INSTALL} -u ${SYSUSER} -g ${SYSGROUP} -m ${DIRMODE} \
	    -idb hylafax.html.cgi -dir ${CGIBIN}
	${PUTBIN} -m 555 -O man2html unquote
	${PUTBIN} -m 555 -O -src manpage.sh -idb "config(suggest)" manpage
