summaryrefslogtreecommitdiff
path: root/mk/fetch
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2007-07-14 05:45:35 +0000
committerobache <obache@pkgsrc.org>2007-07-14 05:45:35 +0000
commit1fcc9dd1387bc105c043256d6b34e2c4b9d98276 (patch)
tree336bf58c0cac1a9e40722f0ab5c1e1f0d249e94d /mk/fetch
parent83705ce4e7ce10dbe2fb4c4eb48c752221a182ae (diff)
downloadpkgsrc-1fcc9dd1387bc105c043256d6b34e2c4b9d98276.tar.gz
Allow empty DIST_SUBDIR, need to fix PR 35494.
Diffstat (limited to 'mk/fetch')
-rw-r--r--mk/fetch/fetch.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/fetch/fetch.mk b/mk/fetch/fetch.mk
index 1214ce9dee9..d0e61831d39 100644
--- a/mk/fetch/fetch.mk
+++ b/mk/fetch/fetch.mk
@@ -1,4 +1,4 @@
-# $NetBSD: fetch.mk,v 1.25 2007/06/12 09:54:52 obache Exp $
+# $NetBSD: fetch.mk,v 1.26 2007/07/14 05:45:35 obache Exp $
_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
@@ -14,7 +14,7 @@ CKSUMFILES:= ${CKSUMFILES:N${__tmp__}}
.endfor
# List of all files, with ${DIST_SUBDIR} in front. Used for fetch and checksum.
-.if defined(DIST_SUBDIR)
+.if defined(DIST_SUBDIR) && !empty(DIST_SUBDIR)
_CKSUMFILES?= ${CKSUMFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
_DISTFILES?= ${DISTFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
_IGNOREFILES?= ${IGNOREFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
@@ -246,7 +246,11 @@ _FETCH_ARGS+= -f ${DISTINFO_FILE:Q}
.if !empty(PKG_RESUME_TRANSFERS:M[yY][eE][sS])
_FETCH_ARGS+= -r
.endif
-_FETCH_ARGS+= -d ${DIST_SUBDIR:U.}
+.if defined(DIST_SUBDIR) && !empty(DIST_SUBDIR)
+_FETCH_ARGS+= -d ${DIST_SUBDIR}
+.else
+_FETCH_ARGS+= -d .
+.endif
.PHONY: do-fetch-file
do-fetch-file: .USE