freebsd-dev/release/doc/share/examples/Makefile.relnotesng
Bruce A. Mah 52957bbfd8 When building release documentation for release builds or for
release documentation snapshots, force URLS_ABSOLUTE.  This
allows us to relocate HTML renderings anywhere without worrying
about breaking relative links to pages on the Web site.  This can
happen when we use &base; as part of a URL.

I wonder if we should do this for all release documentation builds,
but I'm not quite sure what all the cases are.
2005-03-20 17:59:17 +00:00

62 lines
1.5 KiB
Makefile

# -*- makefile -*-
#
# $FreeBSD$
#
# Sample makefile for rendering and uploading RELNOTESng files outside
# the build tree.
#
ARCHS= alpha amd64 ia64 i386 pc98 sparc64
MULTITEXTS= installation relnotes hardware
UNITEXTS= readme errata
IMAGEDIR= .imagedir
RHOST= freefall.freebsd.org
RDIR= public_html/relnotes/CURRENT
DOCDIR= ./release/doc
LANG= en_US.ISO8859-1
DOC_PREFIX?= /usr/doc
CSS_SHEET?= ${DOC_PREFIX}/share/misc/docbook.css
FORMATS?= html txt pdf
BUILD_OPTIONS+= URLS_ABSOLUTE=YES
all:
(cd ${DOCDIR}; ${MAKE} DOC_PREFIX=${DOC_PREFIX} FORMATS="${FORMATS}" ${BUILD_OPTIONS} all)
lint:
(cd ${DOCDIR}; ${MAKE} DOC_PREFIX=${DOC_PREFIX} lint)
image: all
@echo "#"
@echo "# Creating local image"
@echo "#"
rm -rf ${IMAGEDIR}
mkdir ${IMAGEDIR}
cp -p ${CSS_SHEET} ${IMAGEDIR}/docbook.css
for i in ${ARCHS}; do \
for j in ${MULTITEXTS}; do \
for k in ${FORMATS}; do \
cp -p ${DOCDIR}/${LANG}/$${j}/$${i}/article.$${k} ${IMAGEDIR}/$${j}-$${i}.$${k} ; \
done; \
done; \
done
for j in ${UNITEXTS}; do \
for k in ${FORMATS}; do \
cp -p ${DOCDIR}/${LANG}/$${j}/article.$${k} ${IMAGEDIR}/$${j}.$${k} ; \
done; \
done
push: image
@echo "#"
@echo "# Pushing to ${RHOST}"
@echo "#"
# (cd ${IMAGEDIR}; tar -cf - .) | gzip -c -9 | (ssh ${RHOST} "( cd ${RDIR}; gunzip -c | tar -xf -)" )
(cd ${IMAGEDIR}; rsync -azuv * ${RHOST}:${RDIR})
rm -rf ${IMAGEDIR}
clean:
(cd ${DOCDIR}; ${MAKE} DOC_PREFIX=${DOC_PREFIX} FORMATS="${FORMATS}" clean)
rm -rf ${IMAGEDIR}