View | Details | Raw Unified | Return to bug 31132
Collapse All | Expand All

(-)en/Makefile (-6 / +9 lines)
Lines 81-98 Link Here
81
DATA+=		index.html
81
DATA+=		index.html
82
82
83
index.html: index.xsl news/news.xml news/press.xml includes.xsl news/includes.xsl
83
index.html: index.xsl news/news.xml news/press.xml includes.xsl news/includes.xsl
84
	xsltproc -nonet -o index.html index.xsl news/news.xml
84
	${XSLTPROC} ${XSLTPROCFLAGS} -o index.html \
85
	-tidy -i -m -f /dev/null index.html
85
		${.CURDIR}/index.xsl ${.CURDIR}/news/news.xml
86
	-${TIDY} ${TIDYFLAGS} index.html
86
87
87
# Handle the FAQ/ and handbook/ directories specially.
88
# Handle the FAQ/ and handbook/ directories specially.
88
FAQ:
89
FAQ:
89
	ln -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/faq FAQ
90
	${LN} -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/faq FAQ
90
91
91
handbook:
92
handbook:
92
	ln -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/handbook handbook
93
	${LN} -fs ${.CURDIR}/../../doc/en_US.ISO8859-1/books/handbook handbook
93
94
94
afterinstall:
95
afterinstall:
95
	(cd ${DOCINSTALLDIR} && ln -fs doc/en_US.ISO8859-1/books/faq ${DOCINSTALLDIR}/FAQ)
96
	cd ${DOCINSTALLDIR}; \
96
	(cd ${DOCINSTALLDIR} && ln -fs doc/en_US.ISO8859-1/books/handbook ${DOCINSTALLDIR}/handbook)
97
		${LN} -fs doc/en_US.ISO8859-1/books/faq ${DOCINSTALLDIR}/FAQ
98
	cd ${DOCINSTALLDIR}; \
99
		${LN} -fs doc/en_US.ISO8859-1/books/handbook ${DOCINSTALLDIR}/handbook
97
100
98
.include "${WEB_PREFIX}/share/mk/web.site.mk"
101
.include "${WEB_PREFIX}/share/mk/web.site.mk"
(-)en/FAQ/Makefile (-3 / +4 lines)
Lines 14-26 Link Here
14
# At build time, we have to link to the doc/ directory at the same level
14
# At build time, we have to link to the doc/ directory at the same level
15
# as the www/ tree.
15
# as the www/ tree.
16
all:
16
all:
17
	ln -fs ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/faq/* .
17
	${LN} -fs ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/faq/* .
18
18
19
# At install time the www/en/doc/ directory has been populated, so we can
19
# At install time the www/en/doc/ directory has been populated, so we can
20
# link in to there instead.
20
# link in to there instead.
21
install:
21
install:
22
	[ -d ${DOCINSTALLDIR} ] || mkdir ${DOCINSTALLDIR}
22
	[ -d ${DOCINSTALLDIR} ] || ${MKDIR} ${DOCINSTALLDIR}
23
	(cd ${DOCINSTALLDIR} && ln -fs ../doc/en_US.ISO8859-1/books/faq/* ${DOCINSTALLDIR})
23
	cd ${DOCINSTALLDIR}; \
24
		${LN} -fs ../doc/en_US.ISO8859-1/books/faq/* ${DOCINSTALLDIR}
24
25
25
.include "${WEB_PREFIX}/share/mk/web.site.mk"
26
.include "${WEB_PREFIX}/share/mk/web.site.mk"
26
27
(-)en/cgi/Makefile (-1 / +1 lines)
Lines 11-17 Link Here
11
DATA+=	cvsweb.conf cvsweb.conf-freebsd cvsweb.conf-netbsd cvsweb.conf-openbsd
11
DATA+=	cvsweb.conf cvsweb.conf-freebsd cvsweb.conf-netbsd cvsweb.conf-openbsd
12
CGI=	ftp.cgi gallery.cgi mirror.cgi cgi-lib.pl cgi-style.pl
12
CGI=	ftp.cgi gallery.cgi mirror.cgi cgi-lib.pl cgi-style.pl
13
CGI+=	search.cgi cvsweb.cgi query-pr.cgi query-pr-summary.cgi
13
CGI+=	search.cgi cvsweb.cgi query-pr.cgi query-pr-summary.cgi
14
CGI+= dosendpr.cgi freebsd.def html.pl reg.cgi missing_handler.cgi
14
CGI+=	dosendpr.cgi freebsd.def html.pl reg.cgi missing_handler.cgi
15
CGI+=	ports.cgi pds.cgi man.cgi url.cgi getmsg.cgi mid.cgi
15
CGI+=	ports.cgi pds.cgi man.cgi url.cgi getmsg.cgi mid.cgi
16
CGI+=	mailindex.cgi
16
CGI+=	mailindex.cgi
17
17
(-)en/copyright/Makefile (-4 / +3 lines)
Lines 20-38 Link Here
20
CVS_OPT+=	-R
20
CVS_OPT+=	-R
21
.endif
21
.endif
22
22
23
24
DATA+= COPYING COPYING.LIB ${LEGAL}
23
DATA+= COPYING COPYING.LIB ${LEGAL}
25
24
26
# FreeBSD Ports redistribution restrictions
25
# FreeBSD Ports redistribution restrictions
27
LEGAL= LEGAL
26
LEGAL= LEGAL
28
LEGAL_FILE= 	ports/LEGAL
27
LEGAL_FILE= 	ports/LEGAL
29
CLEANFILES+= ${LEGAL}
28
CLEANFILES+=	${LEGAL}
30
.if defined(NOPORTSCVS)
29
.if defined(NOPORTSCVS)
31
${LEGAL}: $${PORTSBASE}/${LEGAL_FILE}
30
${LEGAL}: $${PORTSBASE}/${LEGAL_FILE}
32
	cp ${PORTSBASE}/${LEGAL_FILE} ${LEGAL}
31
	${CP} ${PORTSBASE}/${LEGAL_FILE} ${LEGAL}
33
.else
32
.else
34
${LEGAL}:
33
${LEGAL}:
35
	cvs ${CVS_OPT} co -p ${LEGAL_FILE} > ${.TARGET}
34
	${CVS} ${CVS_OPT} co -p ${LEGAL_FILE} > ${.TARGET}
36
.endif
35
.endif
37
36
38
.include "${WEB_PREFIX}/share/mk/web.site.mk"
37
.include "${WEB_PREFIX}/share/mk/web.site.mk"
(-)/usr/www/en/doc/Makefile (-10 / +31 lines)
Lines 9-29 Link Here
9
# requirements here.
9
# requirements here.
10
#
10
#
11
11
12
all:
12
all: all-all all-install all-pgpkeyring
13
	(unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1 && ${MAKE} FORMATS=html-split\ html all)
14
	(unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1 && ${MAKE} FORMATS=html-split\ html DOCDIR=${.CURDIR} install)
15
	(unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook && ${MAKE} pgpkeyring > ${.CURDIR}/pgpkeyring.txt)
16
13
14
all-all:
15
	@unset DESTDIR || true; \
16
	 cd ${.CURDIR}/../../../doc/en_US.ISO8859-1; \
17
		${MAKE} FORMATS="html-split html" \
18
			INSTALL_COMPRESSED= all
19
all-install:
20
	@unset DESTDIR || true; \
21
	 cd ${.CURDIR}/../../../doc/en_US.ISO8859-1; \
22
		${MAKE} FORMATS="html-split html" DOCDIR=${.OBJDIR} \
23
			INSTALL_COMPRESSED= install
24
all-pgpkeyring:
25
	@unset DESTDIR || true; \
26
	 cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook; \
27
		${MAKE} pgpkeyring > ${.OBJDIR}/pgpkeyring.txt
28
17
install clean:
29
install clean:
18
	(unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1 && ${MAKE} FORMATS=html-split\ html DOCDIR=${DESTDIR}/data/doc ${.TARGET})
30
	@unset DESTDIR || true; \
31
	 cd ${.CURDIR}/../../../doc/en_US.ISO8859-1; \
32
		${MAKE} FORMATS="html-split html" DOCDIR=${DESTDIR}/data/doc \
33
			INSTALL_COMPRESSED= ${.TARGET}
19
.if make(install)
34
.if make(install)
20
	(unset DESTDIR || true; cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook && ${MAKE} pgpkeyring > ${DESTDIR}/data/doc/pgpkeyring.txt)	
35
	@unset DESTDIR || true; \
36
	 cd ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook; \
37
		${MAKE} pgpkeyring > ${DESTDIR}/data/doc/pgpkeyring.txt
21
.endif
38
.endif
22
.if make(clean)
39
.if make(clean)
23
	rm -rf en* handbook faq pgpkeyring.txt
40
	${RM} -rf en* handbook faq pgpkeyring.txt
24
.endif
41
.endif
25
42
26
obj:
27
	cd ${.CURDIR}/../../../doc/en_US.ISO8859-1 && ${MAKE} ${.TARGET}
28
29
.include "${.CURDIR}/../../share/mk/web.site.mk"
43
.include "${.CURDIR}/../../share/mk/web.site.mk"
44
45
obj: _OBJUSE
46
47
_OBJUSE: .USE
48
	@unset DESTDIR || true; \
49
	 cd ${.CURDIR}/../../../doc/en_US.ISO8859-1; \
50
		${MAKE} ${.TARGET}
(-)en/gallery/Makefile (-11 / +15 lines)
Lines 7-35 Link Here
7
.include "../Makefile.inc"
7
.include "../Makefile.inc"
8
.endif
8
.endif
9
9
10
XSLT=	env SGML_CATALOG_FILES=/usr/local/share/xml/dtd/xhtml/xhtml.soc \
10
XSLTPROCFLAGS=	--catalogs
11
	xsltproc --catalogs
11
XSLT=	${SETENV} SGML_CATALOG_FILES=${PREFIX}/share/xml/dtd/xhtml/xhtml.soc \
12
	${XSLTPROC} ${XSLTPROCFLAGS}
12
13
13
INDEXLINK= gallery.html
14
INDEXLINK= gallery.html
14
15
15
DATA+=	gallery.html cgallery.html npgallery.html pgallery.html
16
DATA+=	gallery.html cgallery.html npgallery.html pgallery.html
16
17
17
CLEANFILES+= cgallery.html npgallery.html pgallery.html gallery.html
18
CLEANFILES+= ${DATA}
18
19
19
gallery.html: gallery.xml gallery.xsl ../includes.xsl
20
gallery.html: gallery.xml gallery.xsl ../includes.xsl
20
	${XSLT} gallery.xsl gallery.xml > gallery.html
21
	${XSLT} ${.CURDIR}/gallery.xsl ${.CURDIR}/gallery.xml > ${.TARGET}
21
	-tidy -i -m -f /dev/null gallery.html
22
	-${TIDY} ${TIDYFLAGS} ${.TARGET}
22
23
23
cgallery.html: gallery.xml gallery-entry.xsl
24
cgallery.html: gallery.xml gallery-entry.xsl
24
	${XSLT} --param type \'commercial\' gallery-entry.xsl gallery.xml > cgallery.html
25
	${XSLT} --param type \'commercial\' \
25
	-tidy -i -m -f /dev/null cgallery.html
26
		${.CURDIR}/gallery-entry.xsl ${.CURDIR}/gallery.xml > ${.TARGET}
27
	-${TIDY} ${TIDYFLAGS} ${.TARGET}
26
28
27
npgallery.html: gallery.xml gallery-entry.xsl
29
npgallery.html: gallery.xml gallery-entry.xsl
28
	${XSLT} --param type \'nonprofit\' gallery-entry.xsl gallery.xml > npgallery.html
30
	${XSLT} --param type \'nonprofit\' \
29
	-tidy -i -m -f /dev/null npgallery.html
31
		${.CURDIR}/gallery-entry.xsl ${.CURDIR}/gallery.xml > ${.TARGET}
32
	-${TIDY} ${TIDYFLAGS} ${.TARGET}
30
33
31
pgallery.html: gallery.xml gallery-entry.xsl
34
pgallery.html: gallery.xml gallery-entry.xsl
32
	${XSLT} --param type \'personal\' gallery-entry.xsl gallery.xml > pgallery.html
35
	${XSLT} --param type \'personal\' \
33
	-tidy -i -m -f /dev/null pgallery.html
36
		${.CURDIR}/gallery-entry.xsl ${.CURDIR}/gallery.xml > ${.TARGET}
37
	-${TIDY} ${TIDYFLAGS} ${.TARGET}
34
38
35
.include "${WEB_PREFIX}/share/mk/web.site.mk"
39
.include "${WEB_PREFIX}/share/mk/web.site.mk"
(-)en/handbook/Makefile (-3 / +4 lines)
Lines 12-24 Link Here
12
# At build time, we have to link to the doc/ directory at the same level
12
# At build time, we have to link to the doc/ directory at the same level
13
# as the www/ tree.
13
# as the www/ tree.
14
all:
14
all:
15
	ln -fs ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook/* .
15
	${LN} -fs ${.CURDIR}/../../../doc/en_US.ISO8859-1/books/handbook/* .
16
16
17
# At install time the ../doc/ directory has been populated, so we can
17
# At install time the ../doc/ directory has been populated, so we can
18
# link in to there instead.
18
# link in to there instead.
19
install:
19
install:
20
	[ -d ${DOCINSTALLDIR} ] || mkdir ${DOCINSTALLDIR}
20
	[ -d ${DOCINSTALLDIR} ] || ${MKDIR} ${DOCINSTALLDIR}
21
	(cd ${DOCINSTALLDIR} && ln -fs ../doc/en_US.ISO8859-1/books/handbook/* ${DOCINSTALLDIR})
21
	cd ${DOCINSTALLDIR}; \
22
		${LN} -fs ../doc/en_US.ISO8859-1/books/handbook/* ${DOCINSTALLDIR}
22
23
23
.include "${WEB_PREFIX}/share/mk/web.site.mk"
24
.include "${WEB_PREFIX}/share/mk/web.site.mk"
24
25
(-)en/news/Makefile (-5 / +8 lines)
Lines 35-48 Link Here
35
CLEANFILES+=	newsflash.html news.rdf press.html
35
CLEANFILES+=	newsflash.html news.rdf press.html
36
36
37
newsflash.html: newsflash.xsl news.xml includes.xsl ../includes.xsl
37
newsflash.html: newsflash.xsl news.xml includes.xsl ../includes.xsl
38
	xsltproc -nonet -o newsflash.html newsflash.xsl news.xml
38
	${XSLTPROC} ${XSLTPROCFLAGS} -o newsflash.html \
39
	-tidy -i -m -f /dev/null newsflash.html
39
		${.CURDIR}/newsflash.xsl ${.CURDIR}/news.xml
40
	-${TIDY} ${TIDYFLAGS} newsflash.html
40
41
41
news.rdf: news-rdf.xsl news.xml includes.xsl ../includes.xsl
42
news.rdf: news-rdf.xsl news.xml includes.xsl ../includes.xsl
42
	xsltproc -nonet -o news.rdf news-rdf.xsl news.xml
43
	${XSLTPROC} ${XSLTPROCFLAGS} -o news.rdf \
44
		${.CURDIR}/news-rdf.xsl ${.CURDIR}/news.xml
43
45
44
press.html: press.xsl press.xml includes.xsl ../includes.xsl
46
press.html: press.xsl press.xml includes.xsl ../includes.xsl
45
	xsltproc -nonet -o press.html press.xsl press.xml
47
	${XSLTPROC} ${XSLTPROCFLAGS} -o press.html \
46
	-tidy -i -m -f /dev/null press.html
48
		${.CURDIR}/press.xsl ${.CURDIR}/press.xml
49
	-${TIDY} ${TIDYFLAGS} press.html
47
50
48
.include "${WEB_PREFIX}/share/mk/web.site.mk"
51
.include "${WEB_PREFIX}/share/mk/web.site.mk"
(-)en/news/1997/Makefile (-1 lines)
Lines 10-13 Link Here
10
DOCS=	index.sgml
10
DOCS=	index.sgml
11
11
12
.include "${WEB_PREFIX}/share/mk/web.site.mk"
12
.include "${WEB_PREFIX}/share/mk/web.site.mk"
13
(-)en/news/1998/Makefile (-1 lines)
Lines 10-13 Link Here
10
DOCS=	index.sgml
10
DOCS=	index.sgml
11
11
12
.include "${WEB_PREFIX}/share/mk/web.site.mk"
12
.include "${WEB_PREFIX}/share/mk/web.site.mk"
13
(-)en/news/1999/Makefile (-1 lines)
Lines 10-13 Link Here
10
DOCS=	index.sgml
10
DOCS=	index.sgml
11
11
12
.include "${WEB_PREFIX}/share/mk/web.site.mk"
12
.include "${WEB_PREFIX}/share/mk/web.site.mk"
13
(-)en/news/2000/Makefile (-1 lines)
Lines 10-13 Link Here
10
DOCS=	index.sgml
10
DOCS=	index.sgml
11
11
12
.include "${WEB_PREFIX}/share/mk/web.site.mk"
12
.include "${WEB_PREFIX}/share/mk/web.site.mk"
13
(-)en/news/status/Makefile (-2 / +3 lines)
Lines 18-25 Link Here
18
CLEANFILES+=	${DATA}
18
CLEANFILES+=	${DATA}
19
19
20
.xml.html:	report.xsl includes.xsl
20
.xml.html:	report.xsl includes.xsl
21
	xsltproc -nonet -o ${.TARGET} report.xsl ${.IMPSRC}
21
	${XSLTPROC} ${XSLTPROCFLAGS} -o ${.TARGET} \
22
	-tidy -i -m -f /dev/null ${.TARGET}
22
		${.CURDIR}/report.xsl ${.IMPSRC}
23
	-${TIDY} ${TIDYFLAGS} ${.TARGET}
23
24
24
INDEXLINK=	status.html
25
INDEXLINK=	status.html
25
26
(-)/usr/www/en/ports/Makefile (-12 / +10 lines)
Lines 26-42 Link Here
26
26
27
.if defined(NOPORTSCVS)
27
.if defined(NOPORTSCVS)
28
${INDEX}: $${PORTSBASE}/${PINDEX}
28
${INDEX}: $${PORTSBASE}/${PINDEX}
29
	cp ${PORTSBASE}/${PINDEX} ${INDEX}
29
	${CP} ${PORTSBASE}/${PINDEX} ${INDEX}
30
.else
30
.else
31
${INDEX}:
31
${INDEX}:
32
	cvs ${CVS_OPT} co -p ${PINDEX} > ${INDEX}
32
	${CVS} ${CVS_OPT} co -p ${PINDEX} > ${INDEX}
33
.endif
33
.endif
34
34
35
# build the list of available packages only on the 
35
# build the list of available packages only on the 
36
# main FreeBSD machines
36
# main FreeBSD machines
37
hostname!= hostname
37
hostname!= hostname
38
38
39
40
#
39
#
41
# don't build the packages links if NO_PACKAGES_LINK
40
# don't build the packages links if NO_PACKAGES_LINK
42
# is set and not empty.
41
# is set and not empty.
Lines 48-76 Link Here
48
hostname=	${NO_PACKAGES_LINK}
47
hostname=	${NO_PACKAGES_LINK}
49
.endif
48
.endif
50
49
51
52
packages.exists:
50
packages.exists:
53
.if ${hostname} == "hub.freebsd.org" || ${hostname} == "freefall.freebsd.org"
51
.if ${hostname} == "hub.freebsd.org" || ${hostname} == "freefall.freebsd.org"
54
	@if sh ${.CURDIR}/packages > ${.TARGET}.temp; then \
52
	@if ${SH} ${.CURDIR}/packages > ${.TARGET}.temp; then \
55
		mv ${.TARGET}.temp ${.TARGET}; \
53
		${MV} ${.TARGET}.temp ${.TARGET}; \
56
	else \
54
	else \
57
		rm ${.TARGET}.temp; touch ${.TARGET}; \
55
		${RM} ${.TARGET}.temp; ${TOUCH} ${.TARGET}; \
58
	fi;
56
	fi;
59
.else
57
.else
60
	touch ${.TARGET}
58
	${TOUCH} ${.TARGET}
61
.endif
59
.endif
62
60
63
Makefile.gen: index.sgml .NOTMAIN
61
Makefile.gen: index.sgml .NOTMAIN
64
	echo DOCS= *.sgml > Makefile.gen
62
	${ECHO_CMD} DOCS= *.sgml > Makefile.gen
65
63
66
index.sgml: ${INDEX} categories packages.exists portindex ports.inc .NOTMAIN
64
index.sgml: ${INDEX} categories packages.exists portindex ports.inc .NOTMAIN
67
	rm -f *.sgml
65
	${RM} -f *.sgml
68
	${PORTINDEX} ${INDEX} ${.CURDIR}
66
	${PORTINDEX} ${INDEX} ${.CURDIR}
69
67
70
install: all
68
install: all
71
69
72
all install clean:
70
all install clean:
73
	(cd ${.CURDIR} && ${MAKE}  ${MAKEFLAGS} -f Makefile.inc0 ${.TARGET})
71
	cd ${.CURDIR}; \
74
72
		${MAKE} ${MAKEFLAGS} -f Makefile.inc0 ${.TARGET}
75
73
76
.include "${WEB_PREFIX}/share/mk/web.site.mk"
74
.include "${WEB_PREFIX}/share/mk/web.site.mk"
(-)en/relnotes/Makefile (-1 / +1 lines)
Lines 18-24 Link Here
18
	while :; do \
18
	while :; do \
19
		case $$# in \
19
		case $$# in \
20
			0) break;; \
20
			0) break;; \
21
			1) echo "bad \$$RELNOTES value"; false; break;; \
21
			1) ${ECHO_CMD} "bad \$$RELNOTES value"; false; break;; \
22
		esac; \
22
		esac; \
23
		webname=$$1; shift; realpath=$$1; shift; \
23
		webname=$$1; shift; realpath=$$1; shift; \
24
		(unset DESTDIR || true; \
24
		(unset DESTDIR || true; \
(-)en/search/Makefile (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
index-site.html: atoz.sgml site.sgml
19
index-site.html: atoz.sgml site.sgml
20
atoz.sgml: web.atoz 
20
atoz.sgml: web.atoz 
21
	sort -fu ${.ALLSRC} | ${PERL} ${.CURDIR}/atoz.pl > ${.TARGET}
21
	${SORT} -fu ${.ALLSRC} | ${PERL} ${.CURDIR}/atoz.pl > ${.TARGET}
22
22
23
site.sgml: site.map
23
site.sgml: site.map
24
	${PERL} ${.CURDIR}/site.pl < ${.ALLSRC} > ${.TARGET}
24
	${PERL} ${.CURDIR}/site.pl < ${.ALLSRC} > ${.TARGET}
(-)share/mk/web.site.mk (-49 / +85 lines)
Lines 27-33 Link Here
27
CGIGRP?=	www
27
CGIGRP?=	www
28
CGIMODE?=	775
28
CGIMODE?=	775
29
29
30
PERL?=		perl5
30
CP?=		/bin/cp
31
CVS?=		/usr/bin/cvs
32
ECHO_CMD?=	echo
33
SETENV?=	/usr/bin/env
34
LN?=		/bin/ln
35
MKDIR?=		/bin/mkdir
36
MV?=		/bin/mv
37
PERL?=		/usr/bin/perl5
38
RM?=		/bin/rm
39
SED?=		/usr/bin/sed
40
SH?=		/bin/sh
41
SORT?=		/usr/bin/sort
42
TOUCH?=		/usr/bin/touch
43
44
XSLTPROC?=	${PREFIX}/bin/xsltproc
45
XSLTPROCFLAGS?=	-nonet
46
TIDY?=		${PREFIX}/bin/tidy
47
TIDYFLAGS?=	-i -m -f /dev/null
31
48
32
#
49
#
33
# Install dirs derived from the above.
50
# Install dirs derived from the above.
Lines 64-105 Link Here
64
.if defined(REVCHECK)
81
.if defined(REVCHECK)
65
PREHTML=	${WEB_PREFIX}/ja/prehtml
82
PREHTML=	${WEB_PREFIX}/ja/prehtml
66
PREHTMLFLAGS=	${PREHTMLOPTS}
83
PREHTMLFLAGS=	${PREHTMLOPTS}
67
CANONPREFIX0!=	cd ${WEB_PREFIX}; echo $${PWD};
84
CANONPREFIX0!=	cd ${WEB_PREFIX}; ${ECHO_CMD} $${PWD};
68
CANONPREFIX=	${PWD:S/^${CANONPREFIX0}//:S/^\///}
85
CANONPREFIX=	${PWD:S/^${CANONPREFIX0}//:S/^\///}
69
LOCALTOP!=	echo ${CANONPREFIX} | perl -pe 's@[^/]+@..@g; $$_.="/." if($$_ eq".."); s@^\.\./@@;'
86
LOCALTOP!=	${ECHO_CMD} ${CANONPREFIX} | \
70
DIR_IN_LOCAL!=	echo ${CANONPREFIX} | perl -pe 's@^[^/]+/?@@;'
87
	${PERL} -pe 's@[^/]+@..@g; $$_.="/." if($$_ eq".."); s@^\.\./@@;'
88
DIR_IN_LOCAL!=	${ECHO_CMD} ${CANONPREFIX} | ${PERL} -pe 's@^[^/]+/?@@;'
71
PREHTMLFLAGS+=	-revcheck "${LOCALTOP}" "${DIR_IN_LOCAL}"
89
PREHTMLFLAGS+=	-revcheck "${LOCALTOP}" "${DIR_IN_LOCAL}"
72
.else
90
.else
73
DATESUBST=	's/<!ENTITY date[ \t]*"$$Free[B]SD. .* \(.* .*\) .* .* $$">/<!ENTITY date	"Last modified: \1">/'
91
DATESUBST=	's/<!ENTITY date[ \t]*"$$Free[B]SD. .* \(.* .*\) .* .* $$">/<!ENTITY date	"Last modified: \1">/'
74
PREHTML=	sed -e ${DATESUBST}
92
PREHTML=	${SED} -e ${DATESUBST}
75
.endif
93
.endif
76
.if !defined(OPENJADE)
94
.if !defined(OPENJADE)
77
SGMLNORM=	sgmlnorm
95
SGMLNORM=	${PREFIX}/bin/sgmlnorm
78
.else
96
.else
79
SGMLNORM=	osgmlnorm
97
SGMLNORM=	${PREFIX}/bin/osgmlnorm
80
.endif
98
.endif
81
PREFIX?=	/usr/local
99
LOCALBASE?=	/usr/local
100
PREFIX?=	${LOCALBASE}
82
CATALOG?=	${PREFIX}/share/sgml/html/catalog
101
CATALOG?=	${PREFIX}/share/sgml/html/catalog
83
SGMLNORMFLAGS=	-d ${SGMLNORMOPTS} -c ${CATALOG} -D ${.CURDIR}
102
SGMLNORMFLAGS=	-d ${SGMLNORMOPTS} -c ${CATALOG} -D ${.CURDIR}
84
GENDOCS+=	${DOCS:M*.sgml:S/.sgml$/.html/g}
103
GENDOCS+=	${DOCS:M*.sgml:S/.sgml$/.html/g}
85
ORPHANS:=	${ORPHANS:N*.sgml}
104
ORPHANS:=	${ORPHANS:N*.sgml}
86
105
87
.sgml.html:
106
.sgml.html:
88
	(${PREHTML} ${PREHTMLFLAGS} ${.IMPSRC} |\
107
	${PREHTML} ${PREHTMLFLAGS} ${.IMPSRC} | \
89
	SGML_CATALOG_FILES='' ${SGMLNORM} ${SGMLNORMFLAGS} > ${.TARGET})\
108
	${SETENV} SGML_CATALOG_FILES='' \
90
	|| (rm -f ${.TARGET} && false)
109
		${SGMLNORM} ${SGMLNORMFLAGS} > ${.TARGET} || \
110
			(${RM} -f ${.TARGET} && false)
91
111
92
###
112
###
93
# file.docb --> file.html
113
# file.docb --> file.html
94
#
114
#
95
# Generate HTML from docbook
115
# Generate HTML from docbook
96
116
117
SGMLFMT?=	${PREFIX}/bin/sgmlfmt
118
SGMLFMTFLAGS?=	-d docbook -f html ${SGMLOPTS}
97
.SUFFIXES:	.docb
119
.SUFFIXES:	.docb
98
GENDOCS+=	${DOCS:M*.docb:S/.docb$/.html/g}
120
GENDOCS+=	${DOCS:M*.docb:S/.docb$/.html/g}
99
ORPHANS:=	${ORPHANS:N*.docb}
121
ORPHANS:=	${ORPHANS:N*.docb}
100
122
101
.docb.html:
123
.docb.html:
102
	sgmlfmt -d docbook -f html ${SGMLOPTS} ${.IMPSRC}
124
	${SGMLFMT} ${SGMLFMTFLAGS} ${.IMPSRC}
103
125
104
126
105
##################################################################
127
##################################################################
Lines 120-126 Link Here
120
#
142
#
121
.if !empty(ORPHANS)
143
.if !empty(ORPHANS)
122
orphans:
144
orphans:
123
	@echo Warning!  I don\'t know what to do with: ${ORPHANS}
145
	@${ECHO} Warning!  I don\'t know what to do with: ${ORPHANS}
124
.else
146
.else
125
orphans:
147
orphans:
126
.endif
148
.endif
Lines 132-141 Link Here
132
clean: _PROGSUBDIR
154
clean: _PROGSUBDIR
133
.if defined(DIRS_TO_CLEAN) && !empty(DIRS_TO_CLEAN)
155
.if defined(DIRS_TO_CLEAN) && !empty(DIRS_TO_CLEAN)
134
.for dir in ${DIRS_TO_CLEAN}
156
.for dir in ${DIRS_TO_CLEAN}
135
	(cd ${.CURDIR}/${dir} && ${MAKE} clean)
157
	cd ${.CURDIR}/${dir}; ${MAKE} clean
136
.endfor
158
.endfor
137
.endif
159
.endif
138
	rm -f Errs errs mklog ${GENDOCS} ${LOCAL} ${CLEANFILES}
160
	${RM} -f Errs errs mklog ${GENDOCS} ${LOCAL} ${CLEANFILES}
139
.endif
161
.endif
140
162
141
#
163
#
Lines 143-150 Link Here
143
#
165
#
144
.if !target(cleandir)
166
.if !target(cleandir)
145
cleandir: clean _PROGSUBDIR
167
cleandir: clean _PROGSUBDIR
146
	rm -f ${.CURDIR}/tags .depend
168
	${RM} -f ${.CURDIR}/tags .depend
147
	cd ${.CURDIR}; rm -rf obj;
169
	cd ${.CURDIR}; ${RM} -rf obj
148
.endif
170
.endif
149
171
150
#
172
#
Lines 158-187 Link Here
158
afterinstall:
180
afterinstall:
159
.endif
181
.endif
160
182
183
INSTALL_WEB?=	\
184
	${INSTALL} ${COPY} ${INSTALLFLAGS} -o ${WEBOWN} -g ${WEBGRP} -m ${WEBMODE}
185
INSTALL_CGI?=	\
186
	${INSTALL} ${COPY} ${INSTALLFLAGS} -o ${CGIOWN} -g ${CGIGRP} -m ${CGIMODE}
161
_ALLINSTALL+=	${GENDOCS} ${DATA} ${LOCAL}
187
_ALLINSTALL+=	${GENDOCS} ${DATA} ${LOCAL}
162
188
163
realinstall: ${COOKIE} ${GENDOCS} ${DATA} ${LOCAL} ${CGI} _PROGSUBDIR
189
realinstall: ${COOKIE} ${_ALLINSTALL} ${CGI} _PROGSUBDIR
164
.if !empty(_ALLINSTALL)
190
.if !empty(_ALLINSTALL)
165
	@mkdir -p ${DOCINSTALLDIR}
191
	@${MKDIR} -p ${DOCINSTALLDIR}
166
	for entry in ${_ALLINSTALL}; do \
192
.for entry in ${_ALLINSTALL}
167
		${INSTALL} ${COPY} -o ${WEBOWN} -g ${WEBGRP} -m ${WEBMODE} \
193
.if exists(${.CURDIR}/${entry})
168
			${INSTALLFLAGS} $${entry} ${DOCINSTALLDIR}; \
194
	${INSTALL_WEB} ${.CURDIR}/${entry} ${DOCINSTALLDIR}
169
	done
195
.else
196
	${INSTALL_WEB} ${entry} ${DOCINSTALLDIR}
197
.endif
198
.endfor
170
.if defined(INDEXLINK) && !empty(INDEXLINK)
199
.if defined(INDEXLINK) && !empty(INDEXLINK)
171
	(cd ${DOCINSTALLDIR}; ln -s -f ${INDEXLINK} index.html)
200
	cd ${DOCINSTALLDIR}; ${LN} -fs ${INDEXLINK} index.html
172
.endif
201
.endif
173
.endif
202
.endif
174
.if defined(CGI) && !empty(CGI)
203
.if defined(CGI) && !empty(CGI)
175
	@mkdir -p ${CGIINSTALLDIR}
204
	@${MKDIR} -p ${CGIINSTALLDIR}
176
	for entry in ${CGI}; do \
205
.for entry in ${CGI}
177
		${INSTALL} ${COPY} -o ${CGIOWN} -g ${CGIGRP} -m ${CGIMODE} \
206
	${INSTALL_CGI} ${.CURDIR}/${entry} ${CGIINSTALLDIR}
178
			${INSTALLFLAGS} $${entry} ${CGIINSTALLDIR}; \
207
.endfor
179
	done
180
.endif
208
.endif
181
.if defined(DOCSUBDIR) && !empty(DOCSUBDIR)
209
.if defined(DOCSUBDIR) && !empty(DOCSUBDIR)
182
	for entry in ${DOCSUBDIR}; do \
210
.for entry in ${DOCSUBDIR}
183
		mkdir -p ${DOCINSTALLDIR}/$$entry; \
211
	@${MKDIR} -p ${DOCINSTALLDIR}/${entry}
184
	done
212
.endfor
185
.endif
213
.endif
186
214
187
# Set up install dependencies so they happen in the correct order.
215
# Set up install dependencies so they happen in the correct order.
Lines 197-222 Link Here
197
#SUBDIR+=${DOCSUBDIR}
225
#SUBDIR+=${DOCSUBDIR}
198
_PROGSUBDIR: .USE
226
_PROGSUBDIR: .USE
199
.if defined(SUBDIR) && !empty(SUBDIR)
227
.if defined(SUBDIR) && !empty(SUBDIR)
200
	@for entry in ${SUBDIR}; do \
228
.for entry in ${SUBDIR}
201
		(${ECHODIR} "===> ${DIRPRFX}$$entry"; \
229
	@${ECHODIR} "===> ${DIRPRFX}${entry}"
202
		cd ${.CURDIR}/$${entry} && \
230
	@cd ${.CURDIR}/${entry}; \
203
		${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/); \
231
		${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} \
204
	done
232
			DIRPRFX=${DIRPRFX}${entry}/
233
.endfor
205
.endif
234
.endif
206
.if defined(DOCSUBDIR) && !empty(DOCSUBDIR)
235
.if defined(DOCSUBDIR) && !empty(DOCSUBDIR)
207
	@for entry in ${DOCSUBDIR}; do \
236
.for entry in ${DOCSUBDIR}
208
		(${ECHODIR} "===> ${DIRPRFX}$$entry"; \
237
	@${ECHODIR} "===> ${DIRPRFX}${entry}"
209
		cd ${.CURDIR}/$${entry} && \
238
.if (${WEBDIR} = "data" && ${entry} = "handbook") || ${entry} = "docproj-primer"
210
		if [ ${WEBDIR} = "data" -a $$entry = "handbook" -o $$entry = "docproj-primer" ]; then \
239
	@cd ${.CURDIR}/${entry}; \
211
			${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/ ${PARAMS} FORMATS="txt html html-split"; \
240
		${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} \
212
		elif [ $$entry = "handbook" -a ${WEBDIR} = "data/ja" ]; then \
241
			DIRPRFX=${DIRPRFX}${entry}/ ${PARAMS} \
213
			${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/ ${PARAMS} FORMATS="html html-split"; \
242
			FORMATS="txt html html-split"
214
		else \
243
.elif ${WEBDIR} = "data/ja" && ${entry} = "handbook"
215
			${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/ ${PARAMS}; \
244
	@cd ${.CURDIR}/${entry}; \
216
		fi); \
245
		${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} \
217
	done
246
			DIRPRFX=${DIRPRFX}${entry}/ ${PARAMS} \
247
			FORMATS="html html-split"
248
.else
249
	@cd ${.CURDIR}/${entry}; \
250
		${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} \
251
			DIRPRFX=${DIRPRFX}${entry}/ ${PARAMS}
218
.endif
252
.endif
219
253
.endfor
254
.endif
220
255
221
#
256
#
222
# cruft for generating linuxdoc stuff
257
# cruft for generating linuxdoc stuff
Lines 233-236 Link Here
233
.endif
268
.endif
234
269
235
.include <bsd.obj.mk>
270
.include <bsd.obj.mk>
271
236
# THE END
272
# THE END

Return to bug 31132