OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [libgo/] [godeps.sh] - Diff between revs 747 and 783

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 747 Rev 783
#!/bin/sh
#!/bin/sh
 
 
# Copyright 2011 The Go Authors. All rights reserved.
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# license that can be found in the LICENSE file.
 
 
# The godeps.sh script outputs a dependency file for a package.  The
# The godeps.sh script outputs a dependency file for a package.  The
# dependency file is then included in the libgo Makefile.  This is
# dependency file is then included in the libgo Makefile.  This is
# automatic dependency generation, Go style.
# automatic dependency generation, Go style.
 
 
# The first parameter is the name of the file being generated.  The
# The first parameter is the name of the file being generated.  The
# remaining parameters are the names of Go files which are scanned for
# remaining parameters are the names of Go files which are scanned for
# imports.
# imports.
 
 
set -e
set -e
 
 
if test $# = 0; then
if test $# = 0; then
    echo 1>&2 "Usage: godeps.sh OUTPUT INPUTS..."
    echo 1>&2 "Usage: godeps.sh OUTPUT INPUTS..."
    exit 1
    exit 1
fi
fi
 
 
output=$1
output=$1
shift
shift
 
 
deps=`for f in $*; do cat $f; done |
deps=`for f in $*; do cat $f; done |
  sed -n -e '/^import.*"/p; /^import[   ]*(/,/^)/p' |
  sed -n -e '/^import.*"/p; /^import[   ]*(/,/^)/p' |
  grep '"' |
  grep '"' |
  grep -v '"unsafe"' |
  grep -v '"unsafe"' |
  sed -e 's/^.*"\([^"]*\)".*$/\1/' -e 's/$/.gox/' |
  sed -e 's/^.*"\([^"]*\)".*$/\1/' -e 's/$/.gox/' |
  sort -u`
  sort -u`
 
 
echo $output: $deps
echo $output: $deps
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.