Commit 18c70075 by Ian Lance Taylor

libgo: Generate dependencies automatically.

From-SVN: r181955
parent 4bd97bee
......@@ -665,6 +665,7 @@ LIBGO_IS_FREEBSD_FALSE
LIBGO_IS_FREEBSD_TRUE
LIBGO_IS_DARWIN_FALSE
LIBGO_IS_DARWIN_TRUE
go_include
LIBFFIINCS
LIBFFI
glibgo_toolexeclibdir
......@@ -11096,7 +11097,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11099 "configure"
#line 11100 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -11202,7 +11203,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11205 "configure"
#line 11206 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -13455,6 +13456,11 @@ fi
# Used to tell GNU make to include a file without telling automake to
# include it.
go_include="-include"
is_darwin=no
is_freebsd=no
is_irix=no
......
......@@ -117,6 +117,11 @@ fi
AC_SUBST(LIBFFI)
AC_SUBST(LIBFFIINCS)
# Used to tell GNU make to include a file without telling automake to
# include it.
go_include="-include"
AC_SUBST(go_include)
is_darwin=no
is_freebsd=no
is_irix=no
......
#!/bin/sh
# Copyright 2011 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.
# The godeps.sh script outputs a dependency file for a package. The
# dependency file is then included in the libgo Makefile. This is
# automatic dependency generation, Go style.
# The first parameter is the name of the file being generated. The
# remaining parameters are the names of Go files which are scanned for
# imports.
set -e
if test $# = 0; then
echo 1>&2 "Usage: godeps.sh OUTPUT INPUTS..."
exit 1
fi
output=$1
shift
deps=`for f in $*; do cat $f; done |
sed -n -e '/^import.*"/p; /^import[ ]*(/,/^)/p' |
grep '"' |
grep -v '"unsafe"' |
sed -e 's/^.*"\([^"]*\)".*$/\1/' -e 's/$/.gox/' |
sort -u`
echo $output: $deps
......@@ -169,6 +169,7 @@ exec_prefix = @exec_prefix@
glibgo_prefixdir = @glibgo_prefixdir@
glibgo_toolexecdir = @glibgo_toolexecdir@
glibgo_toolexeclibdir = @glibgo_toolexeclibdir@
go_include = @go_include@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment