Merge from vendor branch OPENSSH:
[dragonfly.git] / release / doc / share / examples / Makefile.relnotesng
1 # -*- makefile -*-
2 #
3 # $FreeBSD: src/release/doc/share/examples/Makefile.relnotesng,v 1.1.2.2 2001/09/28 17:50:16 bmah Exp $
4 # $DragonFly: src/release/doc/share/examples/Attic/Makefile.relnotesng,v 1.2 2003/06/17 04:27:20 dillon Exp $
5 #
6 # Sample makefile for rendering and uploading RELNOTESng files outside
7 # the build tree.
8 #
9
10 ARCHS=          i386 alpha
11 MULTITEXTS=     installation relnotes hardware
12 UNITEXTS=       readme errata
13
14 IMAGEDIR=       .imagedir
15 RHOST=          freefall.freebsd.org
16 RDIR=           public_html/relnotes/4-STABLE
17 DOCDIR=         ./release/doc
18 LANG=           en_US.ISO8859-1
19
20 DOC_PREFIX?=    /usr/doc
21 CSS_SHEET?=     ${DOC_PREFIX}/share/misc/docbook.css
22 FORMATS?=       html txt pdf
23
24 BUILD_OPTIONS?=
25
26 all:
27         (cd ${DOCDIR}; ${MAKE} DOC_PREFIX=${DOC_PREFIX} FORMATS="${FORMATS}" ${BUILD_OPTIONS} all)
28
29 lint:
30         (cd ${DOCDIR}; ${MAKE} DOC_PREFIX=${DOC_PREFIX} lint)
31
32 image:  all
33         @echo "#"
34         @echo "# Creating local image"
35         @echo "#"
36         rm -rf ${IMAGEDIR}
37         mkdir ${IMAGEDIR}
38         cp -p ${CSS_SHEET} ${IMAGEDIR}/docbook.css
39         for i in ${ARCHS}; do \
40                 for j in ${MULTITEXTS}; do \
41                         for k in ${FORMATS}; do \
42         cp -p ${DOCDIR}/${LANG}/$${j}/$${i}/article.$${k} ${IMAGEDIR}/$${j}-$${i}.$${k} ; \
43                         done; \
44                 done; \
45         done
46         for j in ${UNITEXTS}; do \
47                 for k in ${FORMATS}; do \
48         cp -p ${DOCDIR}/${LANG}/$${j}/article.$${k} ${IMAGEDIR}/$${j}.$${k} ; \
49                 done; \
50         done
51
52 push:   image
53         @echo "#"
54         @echo "# Pushing to ${RHOST}"
55         @echo "#"
56 #       (cd ${IMAGEDIR}; tar -cf - .) | gzip -c -9 | (ssh ${RHOST} "( cd ${RDIR}; gunzip -c | tar -xf -)" )
57         (cd ${IMAGEDIR}; rsync -azuv * ${RHOST}:${RDIR})
58         rm -rf ${IMAGEDIR}
59
60 clean:
61         (cd ${DOCDIR}; ${MAKE} DOC_PREFIX=${DOC_PREFIX} FORMATS="${FORMATS}" clean)
62         rm -rf ${IMAGEDIR}