83 lines
2 KiB
Makefile
83 lines
2 KiB
Makefile
# $FreeBSD: www/en/ports/Makefile,v 1.38 2004/11/05 12:47:07 simon Exp $
|
|
|
|
.if exists(../Makefile.conf)
|
|
.include "../Makefile.conf"
|
|
.endif
|
|
.if exists(../Makefile.inc)
|
|
.include "../Makefile.inc"
|
|
.endif
|
|
.if exists(Makefile.inc)
|
|
.include "Makefile.inc"
|
|
.endif
|
|
|
|
FETCH_OPT?= -am
|
|
|
|
#
|
|
# Force NO_TIDY for the ports web pages, since it takes a long time to
|
|
# run tidy on these huge HTML files, and the files are valid HTML when
|
|
# generated by portindex, even without tidy.
|
|
#
|
|
NO_TIDY= YES
|
|
|
|
.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} ${INDEXURI}
|
|
.endif
|
|
|
|
# build the list of available packages only on the
|
|
# main FreeBSD machines
|
|
hostname!= hostname
|
|
|
|
#
|
|
# don't build the packages links if NO_PACKAGES_LINK
|
|
# is set and not empty.
|
|
#
|
|
# XXX: you can set NO_PACKAGES_LINK to your hostname to
|
|
# test the packages link generation
|
|
#
|
|
.if defined(NO_PACKAGES_LINK) && !empty(NO_PACKAGES_LINK)
|
|
hostname= ${NO_PACKAGES_LINK}
|
|
.endif
|
|
|
|
packages.exists:
|
|
.if ${hostname} == "hub.freebsd.org" || ${hostname} == "freefall.freebsd.org" || ${hostname} == "www.freebsd.org"
|
|
@if ${SH} ${.CURDIR}/packages > ${.TARGET}.temp; then \
|
|
${MV} ${.TARGET}.temp ${.TARGET}; \
|
|
else \
|
|
${RM} ${.TARGET}.temp; ${TOUCH} ${.TARGET}; \
|
|
fi;
|
|
.else
|
|
${TOUCH} ${.TARGET}
|
|
.endif
|
|
|
|
Makefile.gen: index.sgml .NOTMAIN
|
|
${ECHO_CMD} DOCS= *.sgml > Makefile.gen
|
|
.if defined(NO_TIDY)
|
|
${ECHO_CMD} NO_TIDY=${NO_TIDY} >> Makefile.gen
|
|
.endif
|
|
|
|
index.sgml: ${INDEX} categories packages.exists portindex ports.inc .NOTMAIN
|
|
${RM} -f *.sgml
|
|
${PORTINDEX} ${INDEX} ${.CURDIR}
|
|
|
|
install: all beforeinstall
|
|
|
|
all install clean:
|
|
cd ${.CURDIR}; \
|
|
${MAKE} ${MAKEFLAGS} -f ${.CURDIR}/Makefile.inc0 ${.TARGET}
|
|
.if defined(WITH_PORTS_GROWTH)
|
|
cd growth; \
|
|
${MAKE} ${MAKEFLAGS} ${.TARGET}
|
|
beforeinstall:
|
|
.else
|
|
beforeinstall:
|
|
${PERL} -pi -e 's/href=\"growth/href=\"http:\/\/www.FreeBSD.org\/ports\/growth/' index.html
|
|
.endif
|
|
|
|
.include "${WEB_PREFIX}/share/mk/web.site.mk"
|