4e23586af4
set of webpages should be now buildable in XML, however the build mechanism of the multimedia/ and ports/ sections do not really fit our infrastructure so these should probably be redesigned later to use XSLT. Approved by: doceng (implicit)
110 lines
3.4 KiB
Makefile
110 lines
3.4 KiB
Makefile
# $FreeBSD$
|
|
# The FreeBSD Japanese Documentation Project
|
|
# Original revision: 1.50
|
|
|
|
.if exists(../Makefile.conf)
|
|
.include "../Makefile.conf"
|
|
.endif
|
|
.if exists(../Makefile.inc)
|
|
.include "../Makefile.inc"
|
|
.endif
|
|
.if exists(${DOC_PREFIX}/en_US.ISO8859-1/htdocs/ports/Makefile.inc)
|
|
.include "${DOC_PREFIX}/en_US.ISO8859-1/htdocs/ports/Makefile.inc"
|
|
.endif
|
|
|
|
FETCH_OPT?= -am
|
|
|
|
.if defined(PINDEX_OVERRIDE)
|
|
${INDEX}: ${PINDEX_OVERRIDE}
|
|
${CP} ${PINDEX_OVERRIDE} ${INDEX}
|
|
.elif defined(NOPORTSNET)
|
|
${INDEX}: $${PORTSBASE}/${PINDEX}
|
|
${CP} ${PORTSBASE}/${PINDEX} ${INDEX}
|
|
.else
|
|
${INDEX}:
|
|
${FETCH} ${FETCH_OPT} -o ${INDEX}.bz2 ${INDEXURI}.bz2
|
|
${BUNZIP2} ${INDEX}.bz2
|
|
.endif
|
|
|
|
HOSTNAME!= hostname
|
|
.if ${HOSTNAME} == "hub.freebsd.org" || ${HOSTNAME} == "freefall.freebsd.org" || ${HOSTNAME} == "www.freebsd.org"
|
|
CLUSTER_MACHINE= YES
|
|
.endif
|
|
|
|
# Build the list of available packages, but only on the main FreeBSD machines.
|
|
# Don't build the list if NO_PACKAGES_LINK is set and not empty.
|
|
#
|
|
packages.exists:
|
|
.if defined(CLUSTER_MACHINE) && (!defined(NO_PACKAGES_LINK) || empty(NO_PACKAGES_LINK))
|
|
.if exists(${DOC_PREFIX}/en_US.ISO8859-1/htdocs/ports/packages.exists)
|
|
cp ${DOC_PREFIX}/en_US.ISO8859-1/htdocs/ports/${.TARGET} .
|
|
.else
|
|
@if ${SH} ${DOC_PREFIX}/en_US.ISO8859-1/htdocs/ports/packages > ${.TARGET}.temp; then \
|
|
${MV} ${.TARGET}.temp ${.TARGET}; \
|
|
else \
|
|
${RM} ${.TARGET}.temp; ${TOUCH} ${.TARGET}; \
|
|
fi;
|
|
.endif
|
|
.else
|
|
${TOUCH} ${.TARGET}
|
|
.endif
|
|
|
|
Makefile.gen: categories-alpha.sgml categories-grouped.sgml index.sgml \
|
|
installing.sgml master-index.sgml references.sgml searching.sgml \
|
|
statistics.ent updating.sgml .NOTMAIN
|
|
( ${ECHO_CMD} DOCS= *.sgml;\
|
|
${ECHO_CMD} -n "DYNAMIC_DOCS= ";\
|
|
${ECHO_CMD} -n " categories-alpha.sgml";\
|
|
${ECHO_CMD} -n " categories-grouped.sgml";\
|
|
${ECHO_CMD} -n " master-index.sgml";\
|
|
${ECHO_CMD} -n " statistics.ent";\
|
|
) > Makefile.gen
|
|
for categoryfile in ${CATEGORYLIST}; do \
|
|
${ECHO_CMD} -n " $$categoryfile.sgml" >> Makefile.gen; \
|
|
done
|
|
${ECHO_CMD} >> Makefile.gen
|
|
|
|
.if defined(CLUSTER_MACHINE)
|
|
PORTS_TARGZ_URL?= ftp://ftp-master.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz
|
|
.else
|
|
PORTS_TARGZ_URL?= ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz
|
|
.endif
|
|
|
|
ports.size:
|
|
.if defined (NOPORTSNET)
|
|
touch ${.TARGET}
|
|
.else
|
|
${RM} -f ${.TARGET}
|
|
${FETCH} -s ${PORTS_TARGZ_URL} > ${.TARGET}
|
|
.endif
|
|
|
|
# this builds: categories-alpha.sgml, categories-grouped.sgml,
|
|
# master-index.sgml, statistics.ent, <category>.sgml
|
|
CATEGORYLIST=`grep "^[a-z]" ${DOC_PREFIX}/en_US.ISO8859-1/htdocs/ports/categories | sed -e s"/,.*//"`
|
|
categories-alpha.sgml: ${INDEX} categories categories.descriptions \
|
|
packages.exists portindex ports.ent ports.size .NOTMAIN
|
|
${RM} -f categories-alpha.sgml categories-grouped.sgml \
|
|
master-index.sgml statistics.ent
|
|
for categoryfile in ${CATEGORYLIST}; do \
|
|
rm -f "$$categoryfile.sgml"; \
|
|
done
|
|
${PORTINDEX} ${INDEX} ${.CURDIR}
|
|
|
|
install: all beforeinstall
|
|
|
|
all install clean:
|
|
cd ${.CURDIR}; \
|
|
${MAKE} ${MAKEFLAGS} -f ${.CURDIR}/Makefile.inc0 ${.TARGET}
|
|
.if defined(WITH_PORTS_GROWTH)
|
|
# Because We refer www/ports/growth/status.png on web site from ports.inc,
|
|
# don't need to have local version of the image file.
|
|
# cd growth; \
|
|
# ${MAKE} ${MAKEFLAGS} ${.TARGET}
|
|
beforeinstall:
|
|
.else
|
|
beforeinstall:
|
|
${SED} -i "" -e 's,HREF="growth,href="http://www.FreeBSD.org/ports/growth,' index.html
|
|
${SED} -i "" -e 's,HREF="growth,href="http://www.FreeBSD.org/ports/growth,' references.html
|
|
.endif
|
|
|
|
.include "${DOC_PREFIX}/share/mk/web.site.mk"
|