summaryrefslogtreecommitdiff
path: root/mk/misc
diff options
context:
space:
mode:
authorjoerg <joerg>2011-11-13 22:52:43 +0000
committerjoerg <joerg>2011-11-13 22:52:43 +0000
commitced5e82ed232c6b190f8f4dbb7360ed4a1055181 (patch)
tree22144d68b552d84cc0eb0a0eec363ff92795f7b3 /mk/misc
parent85c607eb2ccf06dfd9658cb991642559c5ea13c6 (diff)
downloadpkgsrc-ced5e82ed232c6b190f8f4dbb7360ed4a1055181.tar.gz
Allow empty FROM to actually work. Allow importing from the target
location in pkgsrc, it is after all the natural place for testing new imports. Don't try to remove a file named after the import message, it won't exist. XXX Needs more work for the second case to remove the files before XXX running cvs up
Diffstat (limited to 'mk/misc')
-rw-r--r--mk/misc/import.mk12
1 files changed, 5 insertions, 7 deletions
diff --git a/mk/misc/import.mk b/mk/misc/import.mk
index f39c290100a..2d67b6eef83 100644
--- a/mk/misc/import.mk
+++ b/mk/misc/import.mk
@@ -1,4 +1,4 @@
-# $NetBSD: import.mk,v 1.2 2011/11/13 22:28:03 joerg Exp $
+# $NetBSD: import.mk,v 1.3 2011/11/13 22:52:43 joerg Exp $
#
# import:
@@ -28,8 +28,10 @@
_IMPORT_ERRORS= # none
_IMPORT_FROM= # nothing but a leading space
-.if defined(FROM) && !empty(FROM)
+.if defined(FROM)
+. if !empty(FROM)
_IMPORT_FROM+= from ${FROM}
+. endif
.elif !empty(PKGPATH:Mwip/*)
_IMPORT_FROM+= from pkgsrc-wip
.else
@@ -41,9 +43,6 @@ _IMPORT_ERRORS+= "[import.mk] You must set CATEGORY."
.if exists(${.CURDIR}/TODO)
_IMPORT_ERRORS+= "[import.mk] Don't import packages that have something TODO."
.endif
-.if exists(${PKGSRCDIR}/${CATEGORY:Unonexistent}/${PKGPATH:T}/Makefile)
-_IMPORT_ERRORS+= "[import.mk] The package ${CATEGORY}/${PKGPATH:T} already exists."
-.endif
.if ${_EXPERIMENTAL:U""} != "yes"
_IMPORT_ERRORS+= "[import.mk] The \"import\" target is experimental."
.endif
@@ -76,8 +75,7 @@ _import-import:
cvs -d cvs.netbsd.org:/cvsroot import \
-m "$$import_msg" \
pkgsrc/${CATEGORY}/${PKGPATH:T} \
- TNF pkgsrc-base; \
- ${RM} -f "$$import_msg"
+ TNF pkgsrc-base
_import-add-change:
@${STEP_MSG} "Adding CHANGES entry."