Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3428)

Delta Between Two Patch Sets: src/make.bash

Issue 152138: code review 152138: Build changes to support work on the BSDs. (Closed)
Left Patch Set: code review 152138: Initial (very broken) FreeBSD porting work. Re-submit d... Created 14 years, 4 months ago
Right Patch Set: code review 152138: Build changes to support work on the BSDs. Created 14 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/make.bash ('k') | src/make-arm.bash » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 # Copyright 2009 The Go Authors. All rights reserved. 2 # Copyright 2009 The Go Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style 3 # Use of this source code is governed by a BSD-style
4 # license that can be found in the LICENSE file. 4 # license that can be found in the LICENSE file.
5 5
6 set -e 6 set -e
7 GOBIN="${GOBIN:-$HOME/bin}" 7 GOBIN="${GOBIN:-$HOME/bin}"
8 export MAKEFLAGS=-j4 8 export MAKEFLAGS=-j4
9 9
10 if ! test -f $GOROOT/include/u.h 10 if ! test -f $GOROOT/include/u.h
(...skipping 23 matching lines...) Expand all
34 *) 34 *)
35 echo '$GOOS is set to <'$GOOS'>, must be darwin, linux, or nacl' 1>&2 35 echo '$GOOS is set to <'$GOOS'>, must be darwin, linux, or nacl' 1>&2
36 exit 1 36 exit 1
37 esac 37 esac
38 38
39 rm -f $GOBIN/quietgcc 39 rm -f $GOBIN/quietgcc
40 CC=${CC:-gcc} 40 CC=${CC:-gcc}
41 sed -e "s|@CC@|$CC|" < quietgcc.bash > $GOBIN/quietgcc 41 sed -e "s|@CC@|$CC|" < quietgcc.bash > $GOBIN/quietgcc
42 chmod +x $GOBIN/quietgcc 42 chmod +x $GOBIN/quietgcc
43 43
44 rm -f $GOBIN/sanemake 44 rm -f $GOBIN/gomake
45 MAKE=${MAKE:-make} 45 MAKE=make
46 sed -e "s|@MAKE@|$MAKE|" < sanemake.bash > $GOBIN/sanemake 46 if ! make --version 2>/dev/null | grep 'GNU Make' >/dev/null; then
47 chmod +x $GOBIN/sanemake 47 » MAKE=gmake
48 fi
49 (echo '#!/bin/sh'; echo 'exec '$MAKE' "$@"') >$GOBIN/gomake
50 chmod +x $GOBIN/gomake
48 51
49 if ! (cd lib9 && which quietgcc) >/dev/null 2>&1; then 52 if ! (cd lib9 && which quietgcc) >/dev/null 2>&1; then
50 echo "installed quietgcc as $GOBIN/quietgcc but 'which quietgcc' fails" 1>&2 53 echo "installed quietgcc as $GOBIN/quietgcc but 'which quietgcc' fails" 1>&2
51 echo "double-check that $GOBIN is in your "'$PATH' 1>&2 54 echo "double-check that $GOBIN is in your "'$PATH' 1>&2
52 exit 1 55 exit 1
53 fi 56 fi
54 57
55 if [ -d /selinux -a -f /selinux/booleans/allow_execstack ] ; then 58 if [ -d /selinux -a -f /selinux/booleans/allow_execstack ] ; then
56 if ! cat /selinux/booleans/allow_execstack | grep -c '^1 1$' >> /dev/nul l ; then 59 if ! cat /selinux/booleans/allow_execstack | grep -c '^1 1$' >> /dev/nul l ; then
57 echo "WARNING: the default SELinux policy on, at least, Fedora 1 2 breaks " 60 echo "WARNING: the default SELinux policy on, at least, Fedora 1 2 breaks "
(...skipping 23 matching lines...) Expand all
81 # set -e does not apply to ( ) so we must explicitly 84 # set -e does not apply to ( ) so we must explicitly
82 # test the exit status. 85 # test the exit status.
83 ( 86 (
84 echo; echo; echo %%%% making $i %%%%; echo 87 echo; echo; echo %%%% making $i %%%%; echo
85 cd $i 88 cd $i
86 case $i in 89 case $i in
87 cmd) 90 cmd)
88 bash make.bash 91 bash make.bash
89 ;; 92 ;;
90 *) 93 *)
91 » » » » sanemake install 94 » » » » gomake install
92 esac 95 esac
93 ) || exit 1 96 ) || exit 1
94 esac 97 esac
95 done 98 done
96 99
97 case "`uname`" in 100 case "`uname`" in
98 Darwin) 101 Darwin)
99 echo; 102 echo;
100 echo %%% run sudo.bash to install debuggers 103 echo %%% run sudo.bash to install debuggers
101 echo 104 echo
102 esac 105 esac
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b