summaryrefslogtreecommitdiffstats
path: root/release/Makefile.ec2
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2015-05-04 15:04:39 +0000
committergjb <gjb@FreeBSD.org>2015-05-04 15:04:39 +0000
commitfdda0c9272fa3b42fbab8a86029ae271a48c5506 (patch)
tree06bd527e9be79df9d60c3e6102642a06a9140196 /release/Makefile.ec2
parent010365f81b173d359451721e5573b5d34555adef (diff)
downloadFreeBSD-src-fdda0c9272fa3b42fbab8a86029ae271a48c5506.zip
FreeBSD-src-fdda0c9272fa3b42fbab8a86029ae271a48c5506.tar.gz
Add logic to detect if the net/bsdec2-image-upload port needs
to be installed. [1] For the cw-ec2-portinstall and ec2ami targets, touch the .TARGET file after completion to prevent duplicate invocations. Add cw-ec2-portinstall and ec2ami to CLEANFILES. Submitted by: cperciva[1] MFC after: 3 days Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release/Makefile.ec2')
-rw-r--r--release/Makefile.ec214
1 files changed, 13 insertions, 1 deletions
diff --git a/release/Makefile.ec2 b/release/Makefile.ec2
index f74d320..49a5e1e 100644
--- a/release/Makefile.ec2
+++ b/release/Makefile.ec2
@@ -12,6 +12,15 @@ AMINAMESUFFIX!= date +-%Y-%m-%d
PUBLISH= --public
.endif
+CLEANFILES+= ec2ami
+
+.if !exists(/usr/local/bin/bsdec2-image-upload)
+CW_EC2_PORTINSTALL= cw-ec2-portinstall
+CLEANFILES+= ${CW_EC2_PORTINSTALL}
+.else
+CW_EC2_PORTINSTALL=
+.endif
+
cw-ec2-portinstall:
.if exists(${PORTSDIR}/net/bsdec2-image-upload/Makefile)
make -C ${PORTSDIR}/net/bsdec2-image-upload BATCH=1 all install clean
@@ -21,8 +30,10 @@ cw-ec2-portinstall:
. endif
env ASSUME_ALWAYS_YES=yes pkg install -y net/bsdec2-image-upload
.endif
+ @touch ${.TARGET}
-ec2ami: cw-ec2 cw-ec2-portinstall
+ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL}
+ @false
.if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE})
@echo "--------------------------------------------------------------"
@echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation"
@@ -46,3 +57,4 @@ ec2ami: cw-ec2 cw-ec2-portinstall
"${TYPE} ${REVISION}-${BRANCH}${AMINAMESUFFIX}" \
"${TYPE} ${REVISION}-${BRANCH}" \
${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE}
+ @touch ${.TARGET}
OpenPOWER on IntegriCloud