| # Copyright 2009 The Go Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style |
| # license that can be found in the LICENSE file. |
| if [ -f $OUT ] && ! [ -w $OUT ]; then |
| echo "$0: $OUT is read-only; aborting." 1>&2 |
| # Get list of directories from Makefile |
| dirs=$(sed '1,/^DIRS=/d; /^$/,$d; s/\\//g' Makefile) |
| dirs2=$(sed '1,/^DIRS=/d; /^$/,$d; s/\\//g' $GOROOT/src/pkg/Makefile) |
| dirpat=$(echo $dirs $dirs2 $dirs3 | sed 's/ /|/g; s/.*/^(&)$/') |
| sources=$(sed -n 's/\.go\\/.go/p' Makefile) |
| sources=$(ls $sources 2> /dev/null) # remove .s, .c, etc. |
| sed -n '/^import.*"/p; /^import[ \t]*(/,/^)/p' $sources /dev/null | |
| echo $dir.install: \${GOROOT}/pkg/\${GOOS}_\${GOARCH}/${dir}.a |
| echo $dir.install: \${GOROOT}/pkg/\${GOOS}_\${GOARCH}/${dir}.a |