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

Issue 5673056: code review 5673056: build: add make.bash --no-clean option (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by rsc
Modified:
12 years, 1 month ago
Reviewers:
iant2
CC:
golang-dev
Visibility:
Public.

Description

build: add make.bash --no-clean option Makes it possible to run GOARCH=amd64 make.bash GOARCH=386 make.bash --no-clean to avoid deleting some of the work done by the first one.

Patch Set 1 #

Patch Set 2 : diff -r 6341db42de48 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 04a64046570e https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -6 lines) Patch
M src/cmd/dist/build.c View 1 2 3 chunks +6 lines, -4 lines 0 comments Download
M src/make.bash View 1 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello golang-dev (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 1 month ago (2012-02-15 16:48:16 UTC) #1
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=a9e12ba1c6ea *** build: add make.bash --no-clean option Makes it possible to run ...
12 years, 1 month ago (2012-02-15 16:48:19 UTC) #2
iant2
12 years, 1 month ago (2012-02-15 18:42:42 UTC) #3
LGTM

rsc@golang.org writes:

> Reviewers: golang-dev_googlegroups.com,
>
> Message:
> Hello golang-dev (cc: golang-dev@googlegroups.com),
>
> I'd like you to review this change to
> https://go.googlecode.com/hg/
>
>
> Description:
> build: add make.bash --no-clean option
>
> Makes it possible to run
>
> GOARCH=amd64 make.bash
> GOARCH=386 make.bash --no-clean
>
> to avoid deleting some of the work done by the first one.
>
> Please review this at http://codereview.appspot.com/5673056/
>
> Affected files:
>   M src/cmd/dist/build.c
>   M src/make.bash
>
>
> Index: src/cmd/dist/build.c
> ===================================================================
> --- a/src/cmd/dist/build.c
> +++ b/src/cmd/dist/build.c
> @@ -314,12 +314,12 @@
>  	p = bpathf(&b, "%s/pkg/%s_%s", goroot, gohostos, gohostarch);
>  	if(rebuildall)
>  		xremoveall(p);
> -	xmkdir(p);
> +	xmkdirall(p);
>  	if(!streq(goos, gohostos) || !streq(goarch, gohostarch)) {
>  		p = bpathf(&b, "%s/pkg/%s_%s", goroot, goos, goarch);
>  		if(rebuildall)
>  			xremoveall(p);
> -		xmkdir(p);
> +		xmkdirall(p);
>  	}
>  	
>  	// Create object directory.
> @@ -337,7 +337,8 @@
>
>  	// Create tool directory.
>  	// We keep it in pkg/, just like the object directory above.
> -	xremoveall(tooldir);
> +	if(rebuildall)
> +		xremoveall(tooldir);
>  	xmkdirall(tooldir);
>
>  	// Remove tool binaries from before the tool/gohostos_gohostarch
> @@ -1330,7 +1331,8 @@
>  	if(argc > 0)
>  		usage();
>
> -	clean();
> +	if(rebuildall)
> +		clean();
>  	goversion = findgoversion();
>  	setup();
>  	
> Index: src/make.bash
> ===================================================================
> --- a/src/make.bash
> +++ b/src/make.bash
> @@ -75,8 +75,12 @@
>  fi
>
>  echo "# Building compilers and Go bootstrap tool for host,
> $GOHOSTOS/$GOHOSTARCH."
> -./cmd/dist/dist bootstrap -a -v # builds go_bootstrap
> -# Delay move of dist tool to now, because bootstrap cleared tool directory.
> +buildall="-a"
> +if [ "$1" = "--no-clean" ]; then
> +	buildall=""
> +fi
> +./cmd/dist/dist bootstrap $buildall -v # builds go_bootstrap
> +# Delay move of dist tool to now, because bootstrap may clear tool
> directory.
>  mv cmd/dist/dist $GOTOOLDIR/dist
>  $GOTOOLDIR/go_bootstrap clean -i std
>  echo
Sign in to reply to this message.

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