# Copyright (c) 2002 Networks Associates Technologies, Inc. # Copyright (c) 2004 Simon L. Nielsen # All rights reserved. # # This software was developed for the FreeBSD Project by Chris # Costello at Safeport Network Services and Network Associates # Laboratories, the Security Research Division of Network Associates, # Inc. under DARPA/SPAWAR # contract N66001-01-C-8035 ("CBOSS"), as part # of the DARPA CHATS research program. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD: projects/trustedbsd/www/trusted.web.mk,v 1.5 2003/01/03 03:28:22 chris Exp $ # $Id: web.mk 64 2004-11-15 17:49:57Z simon $ TIDY?= tidy -i -m -f /dev/null XSLTPROC?= xsltproc -nonet GLOBAL_XML?= file.xml _WEBOWN!= id -un _WEBGRP!= id -gn WEBOWN?= ${_WEBOWN} WEBGRP?= ${_WEBGRP} WEBDIR?= ${HOME}/public_html/simon CSS_STYLESHEET?= default.css .MAIN: all # .page is the only type of file that converts to .html .SUFFIXES: .page .html # All other types get converted to .page .for _SHEET in ${STYLESHEETS} .SUFFIXES: .${_SHEET} .page .${_SHEET}.page: ${XSLTPROC} -o ${.OBJDIR}/${.TARGET} ${_SHEET}-stylesheet.xsl ${.IMPSRC} echo ${.TARGET} >> ${.OBJDIR}/.cleanfiles *.${_SHEET}: ${_SHEET}-stylesheet.xsl .endfor file.xml: Makefile echo "" > ${.TARGET} .for file in ${SRCS} echo " ${file}" >> ${.TARGET} .endfor echo "" >> ${.TARGET} #${STYLESHEET}: includes.xsl heading.xsl all: ${SRCS:%.page=%.html} .page.html: ${STYLESHEET} ${GLOBAL_XML} ${.IMPSRC} ${SRCS:M*.page} ${XSLTPROC} -o ${.OBJDIR}/${.TARGET} ${STYLESHEET} ${GLOBAL_XML} \ ${.IMPSRC} .if !defined(NO_TIDY) ${TIDY} ${.OBJDIR}/${.TARGET} || true .endif .if exists(${.OBJDIR}/.cleanfiles) CLEANFILES!= xargs < ${.OBJDIR}/.cleanfiles .endif CLEANFILES+= ${SRCS:%.page=%.html} ${.OBJDIR}/.cleanfiles CLEANFILES+= file.xml INSTFILES= ${SRCS:%.page=%.html} ${IMGS} ${DATA} ${CSS_STYLESHEET} install: all mkdir -p ${WEBDIR} ${INSTALL} -c -o ${WEBOWN} -g ${WEBGRP} ${INSTFILES} ${WEBDIR} .if defined(INDEXLINK) && !empty(INDEXLINK) ln -sf ${INDEXLINK} ${WEBDIR}/index.html .endif upload: all scp -q ${INSTFILES} ${REMWEBHOST}:${REMWEBDIR} scp -q ${SRCS} ${STYLESHEET} Makefile web.mk ${REMWEBHOST}:${REMWEBDIR}/src .if defined(INDEXLINK) && !empty(INDEXLINK) ssh ${REMWEBHOST} ln -sf ${INDEXLINK} ${REMWEBDIR}/index.html .endif clean: rm -f ${CLEANFILES}