arm64 libc: hide .cerror, .curbrk, .minbrk for WITHOUT_SYMVER
[freebsd-src.git] / release / Makefile.ec2
blob221ea6cc0d82e039e55e6acbccd4af88ea083237
2 # $FreeBSD$
5 # Makefile for creating an EC2 AMI from a disk image.
8 .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE"
9 AMINAMESUFFIX!= date +-%Y-%m-%d
10 .endif
11 .if defined(EC2PUBLIC)
12 PUBLISH=        --public
13 .endif
15 CLEANFILES+=            ec2ami
17 .if !exists(/usr/local/bin/bsdec2-image-upload)
18 CW_EC2_PORTINSTALL=     cw-ec2-portinstall
19 CLEANFILES+=            ${CW_EC2_PORTINSTALL}
20 .else
21 CW_EC2_PORTINSTALL=
22 .endif
24 cw-ec2-portinstall:
25 .if exists(${PORTSDIR}/net/bsdec2-image-upload/Makefile)
26         make -C ${PORTSDIR}/net/bsdec2-image-upload BATCH=1 all install clean
27 .else
28 . if !exists(/usr/local/sbin/pkg-static)
29         env ASSUME_ALWAYS_YES=yes pkg bootstrap -y
30 . endif
31         env ASSUME_ALWAYS_YES=yes pkg install -y net/bsdec2-image-upload
32 .endif
33         @touch ${.TARGET}
35 ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL}
36 .if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE})
37         @echo "--------------------------------------------------------------"
38         @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation"
39         @echo "--------------------------------------------------------------"
40         @false
41 .endif
42 .if !defined(AWSREGION)
43         @echo "--------------------------------------------------------------"
44         @echo ">>> AWSREGION must be specified EC2 AMI creation"
45         @echo "--------------------------------------------------------------"
46         @false
47 .endif
48 .if !defined(AWSBUCKET)
49         @echo "--------------------------------------------------------------"
50         @echo ">>> AWSBUCKET must be specified for EC2 AMI creation"
51         @echo "--------------------------------------------------------------"
52         @false
53 .endif
54         /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov \
55             ${.OBJDIR}/ec2.raw \
56             "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \
57             "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \
58             ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE}
59         @touch ${.TARGET}