From ac35deefb7b80612bb6e9e8c8b92f1f67cf1841a Mon Sep 17 00:00:00 2001 From: rillig Date: Thu, 27 Jul 2006 07:41:40 +0000 Subject: Documented DIST_PATH and fixed two typos (${TARGET} is not ${.TARGET}). --- mk/fetch/bsd.fetch-vars.mk | 6 +++++- mk/fetch/fetch.mk | 26 ++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'mk/fetch') diff --git a/mk/fetch/bsd.fetch-vars.mk b/mk/fetch/bsd.fetch-vars.mk index e66ab5c0dfa..2ed4d9d7a40 100644 --- a/mk/fetch/bsd.fetch-vars.mk +++ b/mk/fetch/bsd.fetch-vars.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.fetch-vars.mk,v 1.5 2006/07/19 16:01:40 jlam Exp $ +# $NetBSD: bsd.fetch-vars.mk,v 1.6 2006/07/27 07:41:40 rillig Exp $ # # This Makefile fragment is included separately by bsd.pkg.mk and # defines some variables which must be defined earlier than where @@ -9,6 +9,10 @@ # DISTDIR is the top-level directory into which all original # distribution files are fetched. # +# DIST_PATH is a list of directories, separated by colons, in which +# the distribution files are looked up, additionally to DISTDIR. +# No files will ever be created in these directories. +# # The following variables may be set in a package Makefile: # # DIST_SUBDIR is the subdirectory of ${DISTDIR} in which the original diff --git a/mk/fetch/fetch.mk b/mk/fetch/fetch.mk index fbb573d8b4b..6300bb8a296 100644 --- a/mk/fetch/fetch.mk +++ b/mk/fetch/fetch.mk @@ -1,4 +1,4 @@ -# $NetBSD: fetch.mk,v 1.16 2006/07/19 14:25:59 jlam Exp $ +# $NetBSD: fetch.mk,v 1.17 2006/07/27 07:41:40 rillig Exp $ _MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}} _MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}} @@ -234,19 +234,17 @@ do-fetch-file: .USE @${STEP_MSG} "Fetching ${.TARGET:T}" ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ - if ${TEST} -n {DIST_PATH:Q}""; then \ - for d in "" ${DIST_PATH:S/:/ /g}; do \ - case $$d in \ - ""|${DISTDIR}) continue ;; \ - esac; \ - file="$$d/${DIST_SUBDIR}/${TARGET:T}"; \ - if ${TEST} -f $$file; then \ - ${ECHO} "Using $$file"; \ - ${RM} -f ${TARGET}; \ - ${LN} -s $$file ${.TARGET}; \ - fi; \ - done; \ - fi + for d in "" ${DIST_PATH:S/:/ /g}; do \ + case $$d in \ + ""|${DISTDIR}) continue ;; \ + esac; \ + file="$$d/${DIST_SUBDIR}/${.TARGET:T}"; \ + if ${TEST} -f $$file; then \ + ${ECHO} "Using $$file"; \ + ${RM} -f ${.TARGET}; \ + ${LN} -s $$file ${.TARGET}; \ + fi; \ + done ${_PKG_SILENT}${_PKG_DEBUG}set -e; \ unsorted_sites="${SITES.${.TARGET:T:S/=/--/}} ${_MASTER_SITE_BACKUP}"; \ sites="${_ORDERED_SITES}"; \ -- cgit v1.2.3