In the process of re-constructing the FreeBSD web site automatic-update,
clean up the build process a wee bit. The basic change: instead of cheacking out bits and pieces of the doc tree into the web build tree, check out the doc tree somewhere else and put in a few symlinks from the web tree to the doc tree. On catfish (soon to be hub) for example: /usr/local/www/build/doc/... /usr/local/www/build/www/... where /usr/local/www/build/www/data/handbook -> ../../doc/handbook You have to manually put in the symlinks at the moment, but it works better than the evil CVS hackery. Also, install with -C to help avoid gratuitous cache-busting due to gratuitous timestamp twiddling.
This commit is contained in:
parent
7c18e3457f
commit
de98576424
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=2376
16 changed files with 51 additions and 224 deletions
|
@ -1,5 +1,5 @@
|
|||
# bsd.web.mk
|
||||
# $Id: web.site.mk,v 1.12 1997-11-11 15:09:24 brian Exp $
|
||||
# $Id: web.site.mk,v 1.13 1998-01-18 22:27:31 jfieber Exp $
|
||||
|
||||
#
|
||||
# Build and install a web site.
|
||||
|
@ -10,12 +10,6 @@
|
|||
# install -- Installs everything
|
||||
# clean -- remove anything generated by processing
|
||||
#
|
||||
# Transformations:
|
||||
#
|
||||
# copy -- no processing, simply copy the file to install
|
||||
# spam -- run the file through spam for processing and validation
|
||||
# m4 -- run through the m4 macro processor
|
||||
#
|
||||
|
||||
.if exists(${.CURDIR}/../Makefile.inc)
|
||||
.include "${.CURDIR}/../Makefile.inc"
|
||||
|
@ -47,7 +41,7 @@ CGIINSTALLDIR= ${DESTDIR}${WEBBASE}/${CGIDIR}
|
|||
#
|
||||
ORPHANS:= ${DOCS}
|
||||
|
||||
COPY= -c
|
||||
COPY= -C
|
||||
|
||||
##################################################################
|
||||
# Transformation rules
|
||||
|
@ -81,44 +75,6 @@ ORPHANS:= ${ORPHANS:N*.docb}
|
|||
.docb.html:
|
||||
sgmlfmt -d docbook -f html ${SGMLOPTS} ${.IMPSRC}
|
||||
|
||||
###
|
||||
# file.java --> file.class
|
||||
#
|
||||
# Uses javac to compile java source. Note: since we cannot tell
|
||||
# what classes will come out of a java file, we have install all
|
||||
# .class files. The .if construction is there so that *.class
|
||||
# is only put in if there are actually java files in the DOCS.
|
||||
# Generally speaking, make and java were not made for each other.
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
JAVAC?= javac
|
||||
JAVAFLAGS= ${JAVAOPTS}
|
||||
_TMP:= ${DOCS:M*.java}
|
||||
.if !empty(_TMP)
|
||||
GENDOCS+= ${DOCS:M*.java:S/.java$/.class/g} *.class
|
||||
.endif
|
||||
ORPHANS:= ${ORPHANS:N*.java}
|
||||
|
||||
.java.class:
|
||||
${JAVAC} ${JAVAFLAGS} ${.IMPSRC}
|
||||
|
||||
|
||||
###
|
||||
# file.m4 --> file.html
|
||||
#
|
||||
# Runs file.m4 through the m4 preprocessor, generating file.sgml,
|
||||
# which is then taken care of by the .sgml to .html rule.
|
||||
|
||||
.SUFFIXES: .m4
|
||||
M4?= m4
|
||||
M4FLAGS?= ${M4OPTS}
|
||||
GENDOCS+= ${DOCS:M*.m4:S/.m4$/.html/g}
|
||||
CLEANFILES+= ${DOCS:M*.m4:S/.m4$/.sgml/g}
|
||||
ORPHANS:= ${ORPHANS:N*.m4}
|
||||
|
||||
.m4.sgml:
|
||||
${M4} ${M4OPTS} < ${.IMPSRC} > ${.TARGET}
|
||||
|
||||
|
||||
##################################################################
|
||||
# Targets
|
||||
|
@ -131,7 +87,7 @@ ORPHANS:= ${ORPHANS:N*.m4}
|
|||
#
|
||||
# Build most everything
|
||||
#
|
||||
all: ${COOKIE} orphans cvsdir ${GENDOCS} ${DATA} ${LOCAL} ${CGI} _PROGSUBDIR
|
||||
all: ${COOKIE} orphans ${GENDOCS} ${DATA} ${LOCAL} ${CGI} _PROGSUBDIR
|
||||
|
||||
#
|
||||
# Warn about anything in DOCS that has no translation
|
||||
|
@ -143,18 +99,6 @@ orphans:
|
|||
orphans:
|
||||
.endif
|
||||
|
||||
#
|
||||
# Check these things out from cvs
|
||||
#
|
||||
cvsdir:
|
||||
.if defined(CVSDIR) && !empty(CVSDIR)
|
||||
for i in ${CVSDIR}; do \
|
||||
if [ ! -e $$i ]; then \
|
||||
cvs co -P $$i; \
|
||||
fi \
|
||||
done
|
||||
.endif
|
||||
|
||||
#
|
||||
# Clean things up
|
||||
#
|
||||
|
@ -256,6 +200,7 @@ FORMATS?= "html ps latin1 ascii"
|
|||
PARAMS= DESTDIR=${DESTDIR} DOCDIR=${WEBBASE}/${WEBDIR}
|
||||
PARAMS+= DOCOWN=${WEBOWN} DOCGRP=${WEBGRP}
|
||||
PARAMS+= FORMATS=${FORMATS} COPY="${COPY}"
|
||||
PARAMS+= SGMLOPTS="${SGMLOPTS}"
|
||||
|
||||
.endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue