summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorlinimon <linimon@FreeBSD.org>2007-05-24 23:58:29 +0000
committerlinimon <linimon@FreeBSD.org>2007-05-24 23:58:29 +0000
commit8442c800852db51ed032f1acd25a137dcfe9fdd6 (patch)
tree466f40d237021ce07e2ffccd73db18e5e7b58c70 /Makefile
parent2dda822e237fa79bba5c593c204ca25196b935d7 (diff)
downloadFreeBSD-ports-8442c800852db51ed032f1acd25a137dcfe9fdd6.zip
FreeBSD-ports-8442c800852db51ed032f1acd25a137dcfe9fdd6.tar.gz
The default method for 'make update' is now portsnap. Previously,
you had to manually select one of 3 methods: SUP_UPDATE, CVS_UPDATE, or PORTSNAP_UPDATE. The latter is now obsolete. This should help some novice administrators just-start their system. PR: ports/105835 Submitted by: erwin
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 14 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index df65068..e5f55dd 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
OpenPOWER on IntegriCloud