From 98becbfc3c40540968109c02d504fa1bec1adc78 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Mon, 4 May 2015 15:04:39 +0000 Subject: 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 --- release/Makefile.ec2 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'release/Makefile.ec2') diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index f74d32027a7d..49a5e1e881e7 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} -- cgit v1.2.3 From 431e39f8d741e4576b500899d8836cb50f94d09d Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Mon, 4 May 2015 21:34:19 +0000 Subject: Remove a debugging line that snuck in with r282419. Pointyhat: gjb MFC after: 3 days X-MFC-With: r282419 Sponsored by: The FreeBSD Foundation --- release/Makefile.ec2 | 1 - 1 file changed, 1 deletion(-) (limited to 'release/Makefile.ec2') diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index 49a5e1e881e7..f7f34a6fab79 100644 --- a/release/Makefile.ec2 +++ b/release/Makefile.ec2 @@ -33,7 +33,6 @@ cw-ec2-portinstall: @touch ${.TARGET} ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} - @false .if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE}) @echo "--------------------------------------------------------------" @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation" -- cgit v1.2.3