diff options
author | asami <asami@FreeBSD.org> | 2000-01-21 19:08:23 +0800 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 2000-01-21 19:08:23 +0800 |
commit | 97884b3e8466f5e8dc6c45cfb8d17b8360136b61 (patch) | |
tree | 91d0bdf285fd62aa483c422b4aa558237a7f2d07 /Mk | |
parent | 07c3224020b83c0053266249faebcba02c22023a (diff) | |
download | freebsd-ports-graphics-97884b3e8466f5e8dc6c45cfb8d17b8360136b61.tar.gz freebsd-ports-graphics-97884b3e8466f5e8dc6c45cfb8d17b8360136b61.tar.zst freebsd-ports-graphics-97884b3e8466f5e8dc6c45cfb8d17b8360136b61.zip |
(1) Add new USE_BISON directive, which will expand to BUILD_DEPENDS on
4-current post bison-removal and to a no-op otherwise. Note this
should only be used when the software in question uses a feature
in bison that is not in byacc -- otherwise it should be patched to
use byacc (or detect the absense of bison correctly). [bsd.port.mk]
(2) Do not assume all category names are lowercase. In particular,
remove package links by removing them one by one, instead of doing
a "rm [a-z]*/${PKGNAME}.tgz". [bsd.port.mk]
(3) Do not assume the category name doesn't include a path separator
(/). Make links accordingly. [bsd.port.mk,README.category,README.port]
(4) Do not assume all category makefiles are directly under
${PORTSDIR}. [bsd.port.mk,README.category]
(5) Add new "package-name" target which prints out the directory name
to be used in the parent README.html. [bsd.port.subdir.mk]
(2) through (5) are in preparation for going to multi-level
categories. They shouldn't make any difference yet, but are committed
first so people can start testing.
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 20 | ||||
-rw-r--r-- | Mk/bsd.port.subdir.mk | 3 |
2 files changed, 18 insertions, 5 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 1a4b590b326..03d377a9ef1 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -138,6 +138,7 @@ FreeBSD_MAINTAINER= asami@FreeBSD.org # PERL_VER - Short version of perl5 (see below for current value). # PERL_ARCH - Directory name of architecture dependent libraries # (value: ${ARCH}-freebsd). +# USE_BISON - Says that the port uses bison for building. # USE_IMAKE - Says that the port uses imake. Implies USE_X_PREFIX. # XMKMF - Set to path of `xmkmf' if not in $PATH (default: xmkmf -a ). # NO_INSTALL_MANPAGES - For imake ports that don't like the install.man @@ -661,6 +662,12 @@ BUILD_DEPENDS+= ${X11BASE}/lib/libXm.a:${PORTSDIR}/x11-toolkits/Motif-dummy PKG_IGNORE_DEPENDS?= '(XFree86-3\.3\.6|Motif-2\.1\.10)' +.if defined(USE_BISON) +.if ${OSVERSION} >= 400014 +BUILD_DEPENDS+= bison:${PORTSDIR}/devel/bison +.endif +.endif + .if ${OSVERSION} >= 300000 PERL_VERSION= 5.00503 .else @@ -1116,8 +1123,6 @@ check-categories: .endfor .endif -# Note this has to start with a capital letter (or more accurately, it -# shouldn't match "[a-z]*"), see the target "delete-package-links" below. PKGREPOSITORYSUBDIR?= All PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} .if exists(${PACKAGES}) @@ -1715,7 +1720,7 @@ package-links: exit 1; \ fi; \ fi; \ - ${LN} -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \ + ${LN} -sf `${ECHO} $$cat | ${SED} -e 'sa[^/]*a..ag'`/${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \ done .if !defined(NO_LATEST_LINK) @if [ ! -d ${PKGLATESTREPOSITORY} ]; then \ @@ -1730,7 +1735,9 @@ package-links: .if !target(delete-package-links) delete-package-links: - @${RM} -f ${PACKAGES}/[a-z]*/${PKGNAME}${PKG_SUFX} + @for cat in ${CATEGORIES}; do \ + ${RM} -f ${PACKAGES}/$$cat/${PKGNAME}${PKG_SUFX}; \ + done .if !defined(NO_LATEST_LINK) @${RM} -f ${PKGLATESTFILE} .endif @@ -1744,7 +1751,9 @@ delete-package: .if !target(delete-package-links-list) delete-package-links-list: - @${ECHO} ${RM} -f ${PACKAGES}/[a-z]*/${PKGNAME}${PKG_SUFX} + @for cat in ${CATEGORIES}; do \ + ${ECHO} ${RM} -f ${PACKAGES}/$$cat/${PKGNAME}${PKG_SUFX}; \ + done .if !defined(NO_LATEST_LINK) @${ECHO} ${RM} -f ${PKGLATESTFILE} .endif @@ -2540,6 +2549,7 @@ README.html: -e '/%%COMMENT%%/d' \ -e 's%%BUILD_DEPENDS%%'"`${MAKE} ${__softMAKEFLAGS} pretty-print-build-depends-list`"'' \ -e 's%%RUN_DEPENDS%%'"`${MAKE} ${__softMAKEFLAGS} pretty-print-run-depends-list`"'' \ + -e 's%%TOP%%'"`${ECHO} ${CATEGORIES} | ${SED} -e 'sa .*aa' -e 'sa[^/]*a..ag'`"'/..' \ >> $@ # The following two targets require an up-to-date INDEX in ${PORTSDIR} diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk index 3169eb72be4..a84a02060d8 100644 --- a/Mk/bsd.port.subdir.mk +++ b/Mk/bsd.port.subdir.mk @@ -194,6 +194,9 @@ README= ${TEMPLATES}/README.category HTMLIFY= sed -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g' +package-name: + @echo ${.CURDIR} | sed -e 's^.*/^^' + README.html: @echo "===> Creating README.html" @> $@.tmp |