aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2007-05-24 23:58:29 +0000
committerMark Linimon <linimon@FreeBSD.org>2007-05-24 23:58:29 +0000
commit0423d9afcc4fc81cca1dedc08a4bbe632cbb8f22 (patch)
treef82352a5fd3ca4274a2f3a19c4066d0d668c4b0e /Makefile
parent7b6781c431c4949926f725f1d752c2e41ad7b5e5 (diff)
downloadports-0423d9afcc4fc81cca1dedc08a4bbe632cbb8f22.tar.gz
ports-0423d9afcc4fc81cca1dedc08a4bbe632cbb8f22.zip
Notes
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 14 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index df650682729f..e5f55dd1c004 100644
--- a/Makefile
+++ b/Makefile
@@ -153,13 +153,7 @@ PORTSNAP_FLAGS?= -p ${.CURDIR}
SUPFLAGS+= -h ${SUPHOST}
.endif
update:
-.if defined(PORTSNAP_UPDATE)
- @echo "--------------------------------------------------------------"
- @echo ">>> Running ${PORTSNAP}"
- @echo "--------------------------------------------------------------"
- @${PORTSNAP} ${PORTSNAP_FLAGS} fetch
- @${PORTSNAP} ${PORTSNAP_FLAGS} update
-.elif defined(SUP_UPDATE) && defined(PORTSSUPFILE)
+.if defined(SUP_UPDATE) && defined(PORTSSUPFILE)
@echo "--------------------------------------------------------------"
@echo ">>> Running ${SUP}"
@echo "--------------------------------------------------------------"
@@ -173,5 +167,17 @@ update:
@${ECHO_MSG} "Error: Please define PORTSSUPFILE before doing make update."
@exit 1
.else
- @${ECHO_MSG} "Error: Please define either PORTSNAP_UPDATE, SUP_UPDATE, or CVS_UPDATE first."
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Running ${PORTSNAP}"
+ @echo "--------------------------------------------------------------"
+.if !exists(${PORTSDIR}/.portsnap.INDEX)
+ @echo "Error: 'make update' uses portsnap(8) by default and"
+ @echo "needs ${PORTSDIR} to be created by portsnap on its first run."
+ @echo "Please run 'portsnap fetch extract' first."
+ @echo "You can also define SUP_UPDATE and PORTSSUPFILE to use csup(1)"
+ @echo "or CVS_UPDATE to use cvs(1) for updating."
+.else
+ @${PORTSNAP} ${PORTSNAP_FLAGS} fetch
+ @${PORTSNAP} ${PORTSNAP_FLAGS} update
+.endif
.endif