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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [godeps.sh] - Blame information for rev 780

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
#!/bin/sh
2
 
3
# Copyright 2011 The Go Authors. All rights reserved.
4
# Use of this source code is governed by a BSD-style
5
# license that can be found in the LICENSE file.
6
 
7
# The godeps.sh script outputs a dependency file for a package.  The
8
# dependency file is then included in the libgo Makefile.  This is
9
# automatic dependency generation, Go style.
10
 
11
# The first parameter is the name of the file being generated.  The
12
# remaining parameters are the names of Go files which are scanned for
13
# imports.
14
 
15
set -e
16
 
17
if test $# = 0; then
18
    echo 1>&2 "Usage: godeps.sh OUTPUT INPUTS..."
19
    exit 1
20
fi
21
 
22
output=$1
23
shift
24
 
25
deps=`for f in $*; do cat $f; done |
26
  sed -n -e '/^import.*"/p; /^import[   ]*(/,/^)/p' |
27
  grep '"' |
28
  grep -v '"unsafe"' |
29
  sed -e 's/^.*"\([^"]*\)".*$/\1/' -e 's/$/.gox/' |
30
  sort -u`
31
 
32
echo $output: $deps

powered by: WebSVN 2.1.0

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