Remove gvm from dot files
parent
2b7ba65b59
commit
c615f145d0
@ -1,11 +0,0 @@
|
|||||||
*~
|
|
||||||
go
|
|
||||||
gos/
|
|
||||||
pkgsets/
|
|
||||||
archive/
|
|
||||||
environments/
|
|
||||||
tmp/
|
|
||||||
*.log
|
|
||||||
scripts/gvm
|
|
||||||
Gemfile.lock
|
|
||||||
.vagrant/
|
|
@ -1,12 +0,0 @@
|
|||||||
language: c
|
|
||||||
os: [linux, osx]
|
|
||||||
osx_image: mavericks
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- SRC_REPO=$TRAVIS_BUILD_DIR
|
|
||||||
- GVM_NO_GIT_BAK=1
|
|
||||||
- GVM_NO_UPDATE_PROFILE=1
|
|
||||||
before_install:
|
|
||||||
- binscripts/gvm-installer $TRAVIS_COMMIT $TRAVIS_BUILD_DIR/tmp
|
|
||||||
install: gem install tf -v '>=0.4.1'
|
|
||||||
script: source $TRAVIS_BUILD_DIR/tmp/gvm/scripts/gvm; rake default scenario
|
|
@ -1 +0,0 @@
|
|||||||
Joshua Bussdieker <josh.bussdieker@moovweb.com>
|
|
@ -1,93 +0,0 @@
|
|||||||
Fri Apr 6 04:06:29 PDT 2012 Joshua Bussdieker <jbussdieker@gmail.com>
|
|
||||||
|
|
||||||
* Created automake template
|
|
||||||
|
|
||||||
Version: 1.0.x
|
|
||||||
State: LTR
|
|
||||||
|
|
||||||
CHANGES:
|
|
||||||
* Minor bug fixes and cleanup. 1.0.x will always be a safe upgrade path.
|
|
||||||
|
|
||||||
Version: 0.0.8
|
|
||||||
State: Stable
|
|
||||||
|
|
||||||
CHANGES:
|
|
||||||
* Complete overhaul of the package system. Now uses
|
|
||||||
http://github.com/moovweb/gpkg
|
|
||||||
|
|
||||||
Version: 0.0.7
|
|
||||||
State: Stable
|
|
||||||
|
|
||||||
CHANGES:
|
|
||||||
* Fixed issue with gvm use where multiple versions matched.
|
|
||||||
* Added gvm diff for checking the state of a GOROOT.
|
|
||||||
* Install now uses hg clone to copy source.
|
|
||||||
* Fixed remaining error handling. Error now output to stderr.
|
|
||||||
* Fixed error/state checking in `gvm pkg list` and `gvm pkgset list`
|
|
||||||
* Removed all command's gvm- prefix
|
|
||||||
* Revamped the folder structure for scripts so they don't show up in the path
|
|
||||||
* Added gvm prompt for including Go version and/or package set info in the bash prompt
|
|
||||||
* Added ability to build from source when running `gvm pkg install <name>` in a folder
|
|
||||||
named <name>.
|
|
||||||
|
|
||||||
Version: 0.0.6
|
|
||||||
State: Stable
|
|
||||||
|
|
||||||
CHANGES:
|
|
||||||
* Added gvm pkg install to replace gvminstall
|
|
||||||
* Added a log folder for Go download/install logs
|
|
||||||
* Running install for the same Go version twice no longer rebuilds
|
|
||||||
* Failed Go installs now get deleted.
|
|
||||||
* Cache Go source.
|
|
||||||
* Added fuzzy match for gvm uninstall
|
|
||||||
* Allow gvm use shorthand (ex. gvm use 60.3)
|
|
||||||
* Fixed bug with gvm install when GOBIN is set
|
|
||||||
* Added gvminstall for version management installs
|
|
||||||
* Added gvmake as a shortcut to running Makefile.gvm files
|
|
||||||
|
|
||||||
Version: 0.0.5
|
|
||||||
State: Stable
|
|
||||||
|
|
||||||
CHANGES:
|
|
||||||
* Added `gvm get` for updating gvm source code
|
|
||||||
* Added package sets which are containers for GOPATHs
|
|
||||||
* Major folder restructuring. MUST gvm implode to upgrade!
|
|
||||||
|
|
||||||
Version: 0.0.4
|
|
||||||
State: Stable
|
|
||||||
|
|
||||||
CHANGES:
|
|
||||||
* Lots more error handling
|
|
||||||
* Added stable option for install
|
|
||||||
* Added system install option
|
|
||||||
* Cleaned up enviroment handling
|
|
||||||
|
|
||||||
Version: 0.0.3
|
|
||||||
State: Beta
|
|
||||||
|
|
||||||
CHANGES:
|
|
||||||
* Go versions are now identified by the full tag name. Fuzzy matches of Go
|
|
||||||
versions still works (ex. "60.3").
|
|
||||||
* Fixed bug with ~/.gvm/gos folder not being created by Mercurial
|
|
||||||
* Fixed error message in `gvm list` when no Go versions are installed
|
|
||||||
* Added `gvm listall` to list all available Go versions
|
|
||||||
|
|
||||||
Version: 0.0.2
|
|
||||||
State: Alpha
|
|
||||||
|
|
||||||
CHANGES:
|
|
||||||
* Added prerequisite checks for packages needed to build Go
|
|
||||||
* Fixed error with version not displaying on new installs
|
|
||||||
* Better error handling for the cloning and building of Go (log files too!)
|
|
||||||
* Improved enviroment handling
|
|
||||||
* Better install handling for .bashrc and .profile
|
|
||||||
* Added ability to uninstall Go versions
|
|
||||||
* `gvm list` is now a parsed ls list and indicates the current version
|
|
||||||
* Switch to symbolic links to change Go versions
|
|
||||||
|
|
||||||
Version: 0.0.1
|
|
||||||
State: Experimental
|
|
||||||
|
|
||||||
CHANGES:
|
|
||||||
* Hacky proof of concept implementation. Installs in subfolders and uses cp to
|
|
||||||
switch between versions.
|
|
@ -1,3 +0,0 @@
|
|||||||
source 'https://rubygems.org'
|
|
||||||
|
|
||||||
gem 'tf', '>=0.4.1'
|
|
@ -1,19 +0,0 @@
|
|||||||
Copyright (C) 2012 Moov Corp.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the "Software"),
|
|
||||||
to deal in the Software without restriction, including without limitation
|
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
DEALINGS IN THE SOFTWARE.
|
|
@ -1,13 +0,0 @@
|
|||||||
EXTRA_INSTALL = scripts/
|
|
||||||
|
|
||||||
gvmdir = $(bindir)/
|
|
||||||
gvm_SCRIPTS = bin/gvm
|
|
||||||
install_dir = $(prefix)/gvm
|
|
||||||
|
|
||||||
install-exec-hook:
|
|
||||||
(mkdir -p $(install_dir) ; \
|
|
||||||
cp -rf . $(install_dir))
|
|
||||||
|
|
||||||
#install-data-hook:
|
|
||||||
# (mkdir -p $(help_dir) ; \
|
|
||||||
# cp -f *_help.txt $(help_dir))
|
|
@ -1,147 +0,0 @@
|
|||||||
# gvm
|
|
||||||
by Josh Bussdieker (jbuss, jaja, jbussdieker)
|
|
||||||
|
|
||||||
GVM provides an interface to manage Go versions.
|
|
||||||
|
|
||||||
Features
|
|
||||||
========
|
|
||||||
* Install/Uninstall Go versions with `gvm install [tag]` where tag is "60.3", "go1", "weekly.2011-11-08", or "tip"
|
|
||||||
* List added/removed files in GOROOT with `gvm diff`
|
|
||||||
* Manage GOPATHs with `gvm pkgset [create/use/delete] [name]`. Use `--local` as `name` to manage repository under local path (`/path/to/repo/.gvm_local`).
|
|
||||||
* List latest release tags with `gvm listall`. Use `--all` to list weekly as well.
|
|
||||||
* Cache a clean copy of the latest Go source for multiple version installs.
|
|
||||||
* Link project directories into GOPATH
|
|
||||||
|
|
||||||
Background
|
|
||||||
==========
|
|
||||||
When we started developing in Go mismatched dependencies and API changes plauged our build process and made it extremely difficult to merge with other peoples changes.
|
|
||||||
|
|
||||||
After nuking my entire GOROOT several times and rebuilding I decided to come up with a tool to oversee the process. It eventually evolved into what gvm is today.
|
|
||||||
|
|
||||||
Installing
|
|
||||||
==========
|
|
||||||
|
|
||||||
To install:
|
|
||||||
|
|
||||||
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
|
|
||||||
|
|
||||||
Or if you are using zsh just change `bash` with `zsh`
|
|
||||||
|
|
||||||
Installing Go
|
|
||||||
=============
|
|
||||||
gvm install go1
|
|
||||||
gvm use go1 [--default]
|
|
||||||
Once this is done Go will be in the path and ready to use. $GOROOT and $GOPATH are set automatically.
|
|
||||||
|
|
||||||
Additional options can be specified when installing Go:
|
|
||||||
|
|
||||||
Usage: gvm install [version] [options]
|
|
||||||
-s, --source=SOURCE Install Go from specified source.
|
|
||||||
-n, --name=NAME Override the default name for this version.
|
|
||||||
-pb, --with-protobuf Install Go protocol buffers.
|
|
||||||
-b, --with-build-tools Install package build tools.
|
|
||||||
-B, --binary Only install from binary.
|
|
||||||
-h, --help Display this message.
|
|
||||||
|
|
||||||
List Go Versions
|
|
||||||
================
|
|
||||||
To list all installed Go versions (The current version is prefixed with "=>"):
|
|
||||||
|
|
||||||
gvm list
|
|
||||||
|
|
||||||
Uninstalling
|
|
||||||
============
|
|
||||||
To completely remove gvm and all installed Go versions and packages:
|
|
||||||
|
|
||||||
gvm implode
|
|
||||||
|
|
||||||
If that doesn't work see the troubleshooting steps at the bottom of this page.
|
|
||||||
|
|
||||||
Mac OS X Requirements
|
|
||||||
====================
|
|
||||||
* Install Mercurial from http://mercurial.berkwood.com/
|
|
||||||
* Install Xcode Command Line Tools from the App Store.
|
|
||||||
|
|
||||||
Linux Requirements
|
|
||||||
==================
|
|
||||||
|
|
||||||
Debian/Ubuntu
|
|
||||||
==================
|
|
||||||
sudo apt-get install curl
|
|
||||||
sudo apt-get install git
|
|
||||||
sudo apt-get install mercurial
|
|
||||||
sudo apt-get install make
|
|
||||||
sudo apt-get install binutils
|
|
||||||
sudo apt-get install bison
|
|
||||||
sudo apt-get install gcc
|
|
||||||
sudo apt-get install build-essential
|
|
||||||
|
|
||||||
Redhat/Centos
|
|
||||||
==================
|
|
||||||
|
|
||||||
sudo yum install curl
|
|
||||||
sudo yum install git
|
|
||||||
sudo yum install make
|
|
||||||
sudo yum install gcc
|
|
||||||
sudo yum install bison-devel
|
|
||||||
sudo yum install glibc-devel
|
|
||||||
|
|
||||||
* Install Mercurial from http://pkgs.repoforge.org/mercurial/
|
|
||||||
|
|
||||||
FreeBSD Requirements
|
|
||||||
====================
|
|
||||||
|
|
||||||
sudo pkg_add -r bash
|
|
||||||
sudo pkg_add -r git
|
|
||||||
sudo pkg_add -r mercurial
|
|
||||||
|
|
||||||
Vendoring Native Code and Dependencies
|
|
||||||
==================================================
|
|
||||||
GVM supports vendoring package set-specific native code and related
|
|
||||||
dependencies, which is useful if you need to qualify a new configuration
|
|
||||||
or version of one of these dependencies against a last-known-good version
|
|
||||||
in an isolated manner. Such behavior is critical to maintaining good release
|
|
||||||
engineering and production environment hygiene.
|
|
||||||
|
|
||||||
As a convenience matter, GVM will furnish the following environment variables to
|
|
||||||
aid in this manner if you want to decouple your work from what the operating
|
|
||||||
system provides:
|
|
||||||
|
|
||||||
1. ``${GVM_OVERLAY_PREFIX}`` functions in a manner akin to a root directory
|
|
||||||
hierarchy suitable for auto{conf,make,tools} where it could be passed in
|
|
||||||
to ``./configure --prefix=${GVM_OVERLAY_PREFIX}`` and not conflict with any
|
|
||||||
existing operating system artifacts and hermetically be used by your
|
|
||||||
workspace. This is suitable to use with ``C{PP,XX}FLAGS and LDFLAGS``, but you will have
|
|
||||||
to manage these yourself, since each tool that uses them is different.
|
|
||||||
|
|
||||||
2. ``${PATH}`` includes ``${GVM_OVERLAY_PREFIX}/bin`` so that any tools you
|
|
||||||
manually install will reside there, available for you.
|
|
||||||
|
|
||||||
3. ``${LD_LIBRARY_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib`` so that any
|
|
||||||
runtime library searching can be fulfilled there on FreeBSD and Linux.
|
|
||||||
|
|
||||||
4. ``${DYLD_LIBRARY_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib`` so that any
|
|
||||||
runtime library searching can be fulfilled there on Mac OS X.
|
|
||||||
|
|
||||||
5. ``${PKG_CONFIG_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib/pkgconfig`` so
|
|
||||||
that ``pkg-config`` can automatically resolve any vendored dependencies.
|
|
||||||
|
|
||||||
Recipe for success:
|
|
||||||
|
|
||||||
gvm use go1.1
|
|
||||||
gvm pkgset use current-known-good
|
|
||||||
# Let's assume that this includes some C headers and native libraries, which
|
|
||||||
# Go's CGO facility wraps for us. Let's assume that these native
|
|
||||||
# dependencies are at version V.
|
|
||||||
gvm pkgset create trial-next-version
|
|
||||||
# Let's assume that V+1 has come along and you want to safely trial it in
|
|
||||||
# your workspace.
|
|
||||||
gvm pkgset use trial-next-version
|
|
||||||
# Do your work here replicating current-known-good from above, but install
|
|
||||||
# V+1 into ${GVM_OVERLAY_PREFIX}.
|
|
||||||
|
|
||||||
See examples/native for a working example.
|
|
||||||
|
|
||||||
Troubleshooting
|
|
||||||
===============
|
|
||||||
Sometimes especially during upgrades the state of gvm's files can get mixed up. This is mostly true for upgrade from older version than 0.0.8. Changes are slowing down and a LTR is imminent. But for now `rm -rf ~/.gvm` will always remove gvm. Stay tuned!
|
|
@ -1,144 +0,0 @@
|
|||||||
# gvm
|
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/moovweb/gvm.svg?branch=master)](https://travis-ci.org/moovweb/gvm)
|
|
||||||
|
|
||||||
by Josh Bussdieker (jbuss, jaja, jbussdieker)
|
|
||||||
|
|
||||||
GVM provides an interface to manage Go versions.
|
|
||||||
|
|
||||||
Features
|
|
||||||
========
|
|
||||||
* Install/Uninstall Go versions with `gvm install [tag]` where tag is "60.3", "go1", "weekly.2011-11-08", or "tip"
|
|
||||||
* List added/removed files in GOROOT with `gvm diff`
|
|
||||||
* Manage GOPATHs with `gvm pkgset [create/use/delete] [name]`. Use `--local` as `name` to manage repository under local path (`/path/to/repo/.gvm_local`).
|
|
||||||
* List latest release tags with `gvm listall`. Use `--all` to list weekly as well.
|
|
||||||
* Cache a clean copy of the latest Go source for multiple version installs.
|
|
||||||
* Link project directories into GOPATH
|
|
||||||
|
|
||||||
Background
|
|
||||||
==========
|
|
||||||
When we started developing in Go mismatched dependencies and API changes plauged our build process and made it extremely difficult to merge with other peoples changes.
|
|
||||||
|
|
||||||
After nuking my entire GOROOT several times and rebuilding I decided to come up with a tool to oversee the process. It eventually evolved into what gvm is today.
|
|
||||||
|
|
||||||
Installing
|
|
||||||
==========
|
|
||||||
|
|
||||||
To install:
|
|
||||||
|
|
||||||
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
|
|
||||||
|
|
||||||
Or if you are using zsh just change `bash` with `zsh`
|
|
||||||
|
|
||||||
Installing Go
|
|
||||||
=============
|
|
||||||
gvm install go1
|
|
||||||
gvm use go1 [--default]
|
|
||||||
Once this is done Go will be in the path and ready to use. $GOROOT and $GOPATH are set automatically.
|
|
||||||
|
|
||||||
Additional options can be specified when installing Go:
|
|
||||||
|
|
||||||
Usage: gvm install [version] [options]
|
|
||||||
-s, --source=SOURCE Install Go from specified source.
|
|
||||||
-n, --name=NAME Override the default name for this version.
|
|
||||||
-pb, --with-protobuf Install Go protocol buffers.
|
|
||||||
-b, --with-build-tools Install package build tools.
|
|
||||||
-B, --binary Only install from binary.
|
|
||||||
--prefer-binary Attempt a binary install, falling back to source.
|
|
||||||
-h, --help Display this message.
|
|
||||||
|
|
||||||
List Go Versions
|
|
||||||
================
|
|
||||||
To list all installed Go versions (The current version is prefixed with "=>"):
|
|
||||||
|
|
||||||
gvm list
|
|
||||||
|
|
||||||
Uninstalling
|
|
||||||
============
|
|
||||||
To completely remove gvm and all installed Go versions and packages:
|
|
||||||
|
|
||||||
gvm implode
|
|
||||||
|
|
||||||
If that doesn't work see the troubleshooting steps at the bottom of this page.
|
|
||||||
|
|
||||||
Mac OS X Requirements
|
|
||||||
====================
|
|
||||||
* Install Mercurial from http://mercurial.berkwood.com/
|
|
||||||
* Install Xcode Command Line Tools from the App Store.
|
|
||||||
|
|
||||||
Linux Requirements
|
|
||||||
==================
|
|
||||||
|
|
||||||
Debian/Ubuntu
|
|
||||||
==================
|
|
||||||
sudo apt-get install curl git mercurial make binutils bison gcc build-essential
|
|
||||||
|
|
||||||
Redhat/Centos
|
|
||||||
==================
|
|
||||||
|
|
||||||
sudo yum install curl
|
|
||||||
sudo yum install git
|
|
||||||
sudo yum install make
|
|
||||||
sudo yum install bison
|
|
||||||
sudo yum install gcc
|
|
||||||
sudo yum install glibc-devel
|
|
||||||
|
|
||||||
* Install Mercurial from http://pkgs.repoforge.org/mercurial/
|
|
||||||
|
|
||||||
FreeBSD Requirements
|
|
||||||
====================
|
|
||||||
|
|
||||||
sudo pkg_add -r bash
|
|
||||||
sudo pkg_add -r git
|
|
||||||
sudo pkg_add -r mercurial
|
|
||||||
|
|
||||||
Vendoring Native Code and Dependencies
|
|
||||||
==================================================
|
|
||||||
GVM supports vendoring package set-specific native code and related
|
|
||||||
dependencies, which is useful if you need to qualify a new configuration
|
|
||||||
or version of one of these dependencies against a last-known-good version
|
|
||||||
in an isolated manner. Such behavior is critical to maintaining good release
|
|
||||||
engineering and production environment hygiene.
|
|
||||||
|
|
||||||
As a convenience matter, GVM will furnish the following environment variables to
|
|
||||||
aid in this manner if you want to decouple your work from what the operating
|
|
||||||
system provides:
|
|
||||||
|
|
||||||
1. ``${GVM_OVERLAY_PREFIX}`` functions in a manner akin to a root directory
|
|
||||||
hierarchy suitable for auto{conf,make,tools} where it could be passed in
|
|
||||||
to ``./configure --prefix=${GVM_OVERLAY_PREFIX}`` and not conflict with any
|
|
||||||
existing operating system artifacts and hermetically be used by your
|
|
||||||
workspace. This is suitable to use with ``C{PP,XX}FLAGS and LDFLAGS``, but you will have
|
|
||||||
to manage these yourself, since each tool that uses them is different.
|
|
||||||
|
|
||||||
2. ``${PATH}`` includes ``${GVM_OVERLAY_PREFIX}/bin`` so that any tools you
|
|
||||||
manually install will reside there, available for you.
|
|
||||||
|
|
||||||
3. ``${LD_LIBRARY_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib`` so that any
|
|
||||||
runtime library searching can be fulfilled there on FreeBSD and Linux.
|
|
||||||
|
|
||||||
4. ``${DYLD_LIBRARY_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib`` so that any
|
|
||||||
runtime library searching can be fulfilled there on Mac OS X.
|
|
||||||
|
|
||||||
5. ``${PKG_CONFIG_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib/pkgconfig`` so
|
|
||||||
that ``pkg-config`` can automatically resolve any vendored dependencies.
|
|
||||||
|
|
||||||
Recipe for success:
|
|
||||||
|
|
||||||
gvm use go1.1
|
|
||||||
gvm pkgset use current-known-good
|
|
||||||
# Let's assume that this includes some C headers and native libraries, which
|
|
||||||
# Go's CGO facility wraps for us. Let's assume that these native
|
|
||||||
# dependencies are at version V.
|
|
||||||
gvm pkgset create trial-next-version
|
|
||||||
# Let's assume that V+1 has come along and you want to safely trial it in
|
|
||||||
# your workspace.
|
|
||||||
gvm pkgset use trial-next-version
|
|
||||||
# Do your work here replicating current-known-good from above, but install
|
|
||||||
# V+1 into ${GVM_OVERLAY_PREFIX}.
|
|
||||||
|
|
||||||
See examples/native for a working example.
|
|
||||||
|
|
||||||
Troubleshooting
|
|
||||||
===============
|
|
||||||
Sometimes especially during upgrades the state of gvm's files can get mixed up. This is mostly true for upgrade from older version than 0.0.8. Changes are slowing down and a LTR is imminent. But for now `rm -rf ~/.gvm` will always remove gvm. Stay tuned!
|
|
@ -1,41 +0,0 @@
|
|||||||
require 'tmpdir'
|
|
||||||
|
|
||||||
def root_path
|
|
||||||
File.expand_path('../.', __FILE__)
|
|
||||||
end
|
|
||||||
|
|
||||||
def commit
|
|
||||||
@commit ||= (
|
|
||||||
ENV['TRAVIS_COMMIT'] || `git rev-parse --abbrev-ref HEAD`.chomp
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
task :default do
|
|
||||||
Dir.mktmpdir('gvm-test') do |tmpdir|
|
|
||||||
system(<<-EOSH) || fail
|
|
||||||
bash -c '
|
|
||||||
set -e
|
|
||||||
#{root_path}/binscripts/gvm-installer #{commit} #{tmpdir}
|
|
||||||
source #{tmpdir}/gvm/scripts/gvm
|
|
||||||
tf --text #{tmpdir}/gvm/tests/*.sh
|
|
||||||
'
|
|
||||||
EOSH
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
task :scenario do
|
|
||||||
Dir["#{root_path}/tests/scenario/*_comment_test.sh"].each do |test|
|
|
||||||
name = File.basename(test)
|
|
||||||
puts "Running scenario #{name}..."
|
|
||||||
Dir.mktmpdir('gvm-test') do |tmpdir|
|
|
||||||
system(<<-EOSH) || fail
|
|
||||||
bash -c '
|
|
||||||
set -e
|
|
||||||
#{root_path}/binscripts/gvm-installer #{commit} #{tmpdir}
|
|
||||||
source #{tmpdir}/gvm/scripts/gvm
|
|
||||||
tf --text #{tmpdir}/gvm/tests/scenario/#{name}
|
|
||||||
'
|
|
||||||
EOSH
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1 +0,0 @@
|
|||||||
1.0.22
|
|
@ -1,9 +0,0 @@
|
|||||||
Vagrant.configure("2") do |config|
|
|
||||||
config.vm.define "precise32" do |ubuntu|
|
|
||||||
ubuntu.vm.box = "hashicorp/precise32"
|
|
||||||
end
|
|
||||||
|
|
||||||
config.vm.define "precise64" do |ubuntu|
|
|
||||||
ubuntu.vm.box = "hashicorp/precise64"
|
|
||||||
end
|
|
||||||
end
|
|
@ -1 +0,0 @@
|
|||||||
aclocal && automake --add-missing && autoconf && ./configure $@
|
|
@ -1,62 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
[ -n "$GVM_DEBUG" ] && {
|
|
||||||
set -x
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -z "$GVM_ROOT" ]; then
|
|
||||||
tput sgr0
|
|
||||||
tput setaf 1
|
|
||||||
echo 'ERROR: GVM_ROOT is not set! Please add the following line to your .bashrc or .profile
|
|
||||||
|
|
||||||
[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"
|
|
||||||
' >&2
|
|
||||||
tput sgr0
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
. "$GVM_ROOT/scripts/functions" || exit 1
|
|
||||||
|
|
||||||
command=$1
|
|
||||||
if [[ $command == "implode" ]]; then
|
|
||||||
gvm_implode
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
"$GVM_ROOT/scripts/gvm-check"
|
|
||||||
if [[ "$?" != "0" ]]; then
|
|
||||||
display_fatal "Missing requirements."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $command == "version" ]]; then
|
|
||||||
display_message "Go Version Manager v$GVM_VERSION installed at $GVM_ROOT"
|
|
||||||
else
|
|
||||||
if [ -f "$GVM_ROOT/scripts/$command" ]; then
|
|
||||||
shift
|
|
||||||
"$GVM_ROOT/scripts/$command" "$@"
|
|
||||||
elif [[ -n $command ]]; then
|
|
||||||
display_fatal "Unrecognized command line argument: '$command'"
|
|
||||||
else
|
|
||||||
echo "Usage: gvm [command]
|
|
||||||
|
|
||||||
Description:
|
|
||||||
GVM is the Go Version Manager
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
version - print the gvm version number
|
|
||||||
get - gets the latest code (for debugging)
|
|
||||||
use - select a go version to use
|
|
||||||
diff - view changes to Go root
|
|
||||||
implode - completely remove gvm
|
|
||||||
install - install go versions
|
|
||||||
uninstall - uninstall go versions
|
|
||||||
cross - install go cross compilers
|
|
||||||
linkthis - link this directory into GOPATH
|
|
||||||
list - list installed go versions
|
|
||||||
listall - list available versions
|
|
||||||
alias - manage go version aliases
|
|
||||||
pkgset - manage go packages sets
|
|
||||||
pkgenv - edit the environment for a package set
|
|
||||||
"
|
|
||||||
fi
|
|
||||||
fi
|
|
@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function gvm_prompt() {
|
|
||||||
if [[ "$1" == "g" ]]; then
|
|
||||||
echo "$gvm_go_name"
|
|
||||||
elif [[ "$1" == "ps" ]]; then
|
|
||||||
echo "$gvm_pkgset_name"
|
|
||||||
else
|
|
||||||
if [[ $gvm_pkgset_name != "" ]]; then
|
|
||||||
if [[ $gvm_pkgset_name != "global" ]]; then
|
|
||||||
echo "$gvm_go_name@$gvm_pkgset_name"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo "$gvm_go_name"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
gvm_prompt "$@"
|
|
@ -1,50 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
sudo_args=()
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]] ; do
|
|
||||||
token="${1}"
|
|
||||||
|
|
||||||
#rvm trace flag
|
|
||||||
case "${token}" in
|
|
||||||
(--trace)
|
|
||||||
export PS4="+ \${BASH_SOURCE##\${gvm_path:-}} : \${FUNCNAME[0]:+\${FUNCNAME[0]}()} \${LINENO} > "
|
|
||||||
set -o xtrace
|
|
||||||
;;
|
|
||||||
|
|
||||||
#rvm verbose flag
|
|
||||||
(--verbose)
|
|
||||||
set -o verbose
|
|
||||||
;;
|
|
||||||
|
|
||||||
#not an rvm option, treat as sudo option
|
|
||||||
(-*)
|
|
||||||
sudo_args+=("$token")
|
|
||||||
|
|
||||||
#option with value
|
|
||||||
case "$token" in
|
|
||||||
(-g|-u|-p|-r|-t|-U|-C)
|
|
||||||
shift
|
|
||||||
#read & append the value
|
|
||||||
sudo_args+=("$1")
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
|
|
||||||
#no more options skip processing
|
|
||||||
(*)
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
#go to next param
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $# -gt 0 ]]
|
|
||||||
then
|
|
||||||
eval sudo "${sudo_args[@]}" /usr/bin/env "$(/usr/bin/env | grep -E '^GO|^GVM|^PATH' | sed 's/=\(.*\)$/="\1"/' )" "$@"
|
|
||||||
else
|
|
||||||
printf "Usage:\n %s [--trace] [--verbose] [sudo-options] command [command-options]\n $0"
|
|
||||||
fi
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
display_error() {
|
|
||||||
tput sgr0
|
|
||||||
tput setaf 1
|
|
||||||
echo "ERROR: $1"
|
|
||||||
tput sgr0
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
update_profile() {
|
|
||||||
[ -f "$1" ] || return 1
|
|
||||||
|
|
||||||
grep "$source_line" "$1" > /dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "$source_line" >> "$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
check_existing_go() {
|
|
||||||
|
|
||||||
if [ "$GOROOT" = "" ]; then
|
|
||||||
if which go > /dev/null; then
|
|
||||||
GOROOT=$(go env | grep GOROOT | cut -d"=" -f2)
|
|
||||||
else
|
|
||||||
echo "No existing Go versions detected"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo "Created profile for existing install of Go at $GOROOT"
|
|
||||||
mkdir -p "$GVM_DEST/$GVM_NAME/environments" &> /dev/null || display_error "Failed to create environment directory"
|
|
||||||
mkdir -p "$GVM_DEST/$GVM_NAME/pkgsets/system/global" &> /dev/null || display_error "Failed to create new package set"
|
|
||||||
mkdir -p "$GVM_DEST/$GVM_NAME/gos/system" &> /dev/null || display_error "Failed to create new Go folder"
|
|
||||||
cat << EOF > $GVM_DEST/$GVM_NAME/environments/system
|
|
||||||
# Automatically generated file. DO NOT EDIT!
|
|
||||||
export GVM_ROOT; GVM_ROOT="$GVM_DEST/$GVM_NAME"
|
|
||||||
export gvm_go_name; gvm_go_name="system"
|
|
||||||
export gvm_pkgset_name; gvm_pkgset_name="global"
|
|
||||||
export GOROOT; GOROOT="$GOROOT"
|
|
||||||
export GOPATH; GOPATH="$GVM_DEST/$GVM_NAME/pkgsets/system/global"
|
|
||||||
export PATH; PATH="$GVM_DEST/$GVM_NAME/pkgsets/system/global/bin:$GOROOT/bin:$GVM_ROOT/bin:\$PATH"
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
BRANCH=${1:-master}
|
|
||||||
GVM_DEST=${2:-$HOME}
|
|
||||||
GVM_NAME="gvm"
|
|
||||||
SRC_REPO=${SRC_REPO:-https://github.com/moovweb/gvm.git}
|
|
||||||
|
|
||||||
[ "$GVM_DEST" = "$HOME" ] && GVM_NAME=".gvm"
|
|
||||||
|
|
||||||
[ -d "$GVM_DEST/$GVM_NAME" ] && display_error "Already installed!"
|
|
||||||
[ -d "$GVM_DEST" ] || mkdir -p "$GVM_DEST" > /dev/null 2>&1 || display_error "Failed to create $GVM_DEST"
|
|
||||||
[ -z "$(which git)" ] && display_error "Could not find git
|
|
||||||
|
|
||||||
debian/ubuntu: apt-get install git
|
|
||||||
redhat/centos: yum install git
|
|
||||||
mac: brew install git
|
|
||||||
"
|
|
||||||
|
|
||||||
# Is gvm-installer being called from the origin repo?
|
|
||||||
# If so, skip the clone and source locally!
|
|
||||||
# This prevents CI from breaking on non-merge commits.
|
|
||||||
|
|
||||||
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
||||||
|
|
||||||
if [[ -z "$GIT_ROOT" || "$(basename "$GIT_ROOT")" != "gvm" ]]
|
|
||||||
then
|
|
||||||
echo "Cloning from $SRC_REPO to $GVM_DEST/$GVM_NAME"
|
|
||||||
|
|
||||||
git clone --quiet "$SRC_REPO" "$GVM_DEST/$GVM_NAME" 2> /dev/null ||
|
|
||||||
display_error "Failed to clone from $SRC_REPO into $GVM_DEST/$GVM_NAME"
|
|
||||||
else
|
|
||||||
if [[ $GVM_DEST == *"$GIT_ROOT"* ]]
|
|
||||||
then
|
|
||||||
ln -s "$GIT_ROOT" "$GVM_DEST"
|
|
||||||
else
|
|
||||||
cp -r "$GIT_ROOT" "$GVM_DEST/$GVM_NAME"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# GVM_DEST may be a non-relative path
|
|
||||||
# i.e: gvm-installer master foo
|
|
||||||
pushd . > /dev/null
|
|
||||||
|
|
||||||
cd "$GVM_DEST/$GVM_NAME" && git checkout --quiet "$BRANCH" 2> /dev/null || display_error "Failed to checkout $BRANCH branch"
|
|
||||||
|
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
[ -z "$GVM_NO_GIT_BAK" ] && mv "$GVM_DEST/$GVM_NAME/.git" "$GVM_DEST/$GVM_NAME/git.bak"
|
|
||||||
|
|
||||||
source_line="[[ -s \"${GVM_DEST}/$GVM_NAME/scripts/gvm\" ]] && source \"${GVM_DEST}/$GVM_NAME/scripts/gvm\""
|
|
||||||
source_file="${GVM_DEST}/$GVM_NAME/scripts/gvm"
|
|
||||||
|
|
||||||
if [ -z "$GVM_NO_UPDATE_PROFILE" ] ; then
|
|
||||||
if [ -n "$ZSH_NAME" ]; then
|
|
||||||
update_profile "$HOME/.zshrc"
|
|
||||||
elif [ "$(uname)" == "Linux" ]; then
|
|
||||||
update_profile "$HOME/.bashrc" || update_profile "$HOME/.bash_profile"
|
|
||||||
elif [ "$(uname)" == "Darwin" ]; then
|
|
||||||
update_profile "$HOME/.profile" || update_profile "$HOME/.bash_profile"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$GVM_NO_UPDATE_PROFILE" ] && [ "$?" != "0" ]; then
|
|
||||||
echo "Unable to locate profile settings file(Something like $HOME/.bashrc or $HOME/.bash_profile)"
|
|
||||||
echo
|
|
||||||
echo " You will have to manually add the following line:"
|
|
||||||
echo
|
|
||||||
echo " $source_line"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "export GVM_ROOT=$GVM_DEST/$GVM_NAME" > "$GVM_DEST/$GVM_NAME/scripts/gvm"
|
|
||||||
echo ". \$GVM_ROOT/scripts/gvm-default" >> "$GVM_DEST/$GVM_NAME/scripts/gvm"
|
|
||||||
check_existing_go
|
|
||||||
[[ -s "$GVM_DEST/$GVM_NAME/scripts/gvm" ]] && source "$GVM_DEST/$GVM_NAME/scripts/gvm"
|
|
||||||
echo "Installed GVM v${GVM_VERSION}"
|
|
||||||
echo
|
|
||||||
echo "Please restart your terminal session or to get started right away run"
|
|
||||||
echo " \`source ${source_file}\`"
|
|
||||||
echo
|
|
@ -1 +0,0 @@
|
|||||||
git://github.com/moovweb
|
|
@ -1,4 +0,0 @@
|
|||||||
AC_INIT(gvm, m4_esyscmd([tr -d '\n' <VERSION]))
|
|
||||||
AM_INIT_AUTOMAKE
|
|
||||||
AC_CONFIG_FILES([Makefile scripts/gvm])
|
|
||||||
AC_OUTPUT
|
|
@ -1,674 +0,0 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -1,370 +0,0 @@
|
|||||||
Installation Instructions
|
|
||||||
*************************
|
|
||||||
|
|
||||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
|
||||||
Inc.
|
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
|
||||||
are permitted in any medium without royalty provided the copyright
|
|
||||||
notice and this notice are preserved. This file is offered as-is,
|
|
||||||
without warranty of any kind.
|
|
||||||
|
|
||||||
Basic Installation
|
|
||||||
==================
|
|
||||||
|
|
||||||
Briefly, the shell commands `./configure; make; make install' should
|
|
||||||
configure, build, and install this package. The following
|
|
||||||
more-detailed instructions are generic; see the `README' file for
|
|
||||||
instructions specific to this package. Some packages provide this
|
|
||||||
`INSTALL' file but do not implement all of the features documented
|
|
||||||
below. The lack of an optional feature in a given package is not
|
|
||||||
necessarily a bug. More recommendations for GNU packages can be found
|
|
||||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
|
||||||
|
|
||||||
The `configure' shell script attempts to guess correct values for
|
|
||||||
various system-dependent variables used during compilation. It uses
|
|
||||||
those values to create a `Makefile' in each directory of the package.
|
|
||||||
It may also create one or more `.h' files containing system-dependent
|
|
||||||
definitions. Finally, it creates a shell script `config.status' that
|
|
||||||
you can run in the future to recreate the current configuration, and a
|
|
||||||
file `config.log' containing compiler output (useful mainly for
|
|
||||||
debugging `configure').
|
|
||||||
|
|
||||||
It can also use an optional file (typically called `config.cache'
|
|
||||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
|
||||||
the results of its tests to speed up reconfiguring. Caching is
|
|
||||||
disabled by default to prevent problems with accidental use of stale
|
|
||||||
cache files.
|
|
||||||
|
|
||||||
If you need to do unusual things to compile the package, please try
|
|
||||||
to figure out how `configure' could check whether to do them, and mail
|
|
||||||
diffs or instructions to the address given in the `README' so they can
|
|
||||||
be considered for the next release. If you are using the cache, and at
|
|
||||||
some point `config.cache' contains results you don't want to keep, you
|
|
||||||
may remove or edit it.
|
|
||||||
|
|
||||||
The file `configure.ac' (or `configure.in') is used to create
|
|
||||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
|
||||||
you want to change it or regenerate `configure' using a newer version
|
|
||||||
of `autoconf'.
|
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
|
||||||
|
|
||||||
1. `cd' to the directory containing the package's source code and type
|
|
||||||
`./configure' to configure the package for your system.
|
|
||||||
|
|
||||||
Running `configure' might take a while. While running, it prints
|
|
||||||
some messages telling which features it is checking for.
|
|
||||||
|
|
||||||
2. Type `make' to compile the package.
|
|
||||||
|
|
||||||
3. Optionally, type `make check' to run any self-tests that come with
|
|
||||||
the package, generally using the just-built uninstalled binaries.
|
|
||||||
|
|
||||||
4. Type `make install' to install the programs and any data files and
|
|
||||||
documentation. When installing into a prefix owned by root, it is
|
|
||||||
recommended that the package be configured and built as a regular
|
|
||||||
user, and only the `make install' phase executed with root
|
|
||||||
privileges.
|
|
||||||
|
|
||||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
|
||||||
this time using the binaries in their final installed location.
|
|
||||||
This target does not install anything. Running this target as a
|
|
||||||
regular user, particularly if the prior `make install' required
|
|
||||||
root privileges, verifies that the installation completed
|
|
||||||
correctly.
|
|
||||||
|
|
||||||
6. You can remove the program binaries and object files from the
|
|
||||||
source code directory by typing `make clean'. To also remove the
|
|
||||||
files that `configure' created (so you can compile the package for
|
|
||||||
a different kind of computer), type `make distclean'. There is
|
|
||||||
also a `make maintainer-clean' target, but that is intended mainly
|
|
||||||
for the package's developers. If you use it, you may have to get
|
|
||||||
all sorts of other programs in order to regenerate files that came
|
|
||||||
with the distribution.
|
|
||||||
|
|
||||||
7. Often, you can also type `make uninstall' to remove the installed
|
|
||||||
files again. In practice, not all packages have tested that
|
|
||||||
uninstallation works correctly, even though it is required by the
|
|
||||||
GNU Coding Standards.
|
|
||||||
|
|
||||||
8. Some packages, particularly those that use Automake, provide `make
|
|
||||||
distcheck', which can by used by developers to test that all other
|
|
||||||
targets like `make install' and `make uninstall' work correctly.
|
|
||||||
This target is generally not run by end users.
|
|
||||||
|
|
||||||
Compilers and Options
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Some systems require unusual options for compilation or linking that
|
|
||||||
the `configure' script does not know about. Run `./configure --help'
|
|
||||||
for details on some of the pertinent environment variables.
|
|
||||||
|
|
||||||
You can give `configure' initial values for configuration parameters
|
|
||||||
by setting variables in the command line or in the environment. Here
|
|
||||||
is an example:
|
|
||||||
|
|
||||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
|
||||||
|
|
||||||
*Note Defining Variables::, for more details.
|
|
||||||
|
|
||||||
Compiling For Multiple Architectures
|
|
||||||
====================================
|
|
||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
|
||||||
same time, by placing the object files for each architecture in their
|
|
||||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
|
||||||
directory where you want the object files and executables to go and run
|
|
||||||
the `configure' script. `configure' automatically checks for the
|
|
||||||
source code in the directory that `configure' is in and in `..'. This
|
|
||||||
is known as a "VPATH" build.
|
|
||||||
|
|
||||||
With a non-GNU `make', it is safer to compile the package for one
|
|
||||||
architecture at a time in the source code directory. After you have
|
|
||||||
installed the package for one architecture, use `make distclean' before
|
|
||||||
reconfiguring for another architecture.
|
|
||||||
|
|
||||||
On MacOS X 10.5 and later systems, you can create libraries and
|
|
||||||
executables that work on multiple system types--known as "fat" or
|
|
||||||
"universal" binaries--by specifying multiple `-arch' options to the
|
|
||||||
compiler but only a single `-arch' option to the preprocessor. Like
|
|
||||||
this:
|
|
||||||
|
|
||||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
|
||||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
|
||||||
CPP="gcc -E" CXXCPP="g++ -E"
|
|
||||||
|
|
||||||
This is not guaranteed to produce working output in all cases, you
|
|
||||||
may have to build one architecture at a time and combine the results
|
|
||||||
using the `lipo' tool if you have problems.
|
|
||||||
|
|
||||||
Installation Names
|
|
||||||
==================
|
|
||||||
|
|
||||||
By default, `make install' installs the package's commands under
|
|
||||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
|
||||||
can specify an installation prefix other than `/usr/local' by giving
|
|
||||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
|
||||||
absolute file name.
|
|
||||||
|
|
||||||
You can specify separate installation prefixes for
|
|
||||||
architecture-specific files and architecture-independent files. If you
|
|
||||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
|
||||||
PREFIX as the prefix for installing programs and libraries.
|
|
||||||
Documentation and other data files still use the regular prefix.
|
|
||||||
|
|
||||||
In addition, if you use an unusual directory layout you can give
|
|
||||||
options like `--bindir=DIR' to specify different values for particular
|
|
||||||
kinds of files. Run `configure --help' for a list of the directories
|
|
||||||
you can set and what kinds of files go in them. In general, the
|
|
||||||
default for these options is expressed in terms of `${prefix}', so that
|
|
||||||
specifying just `--prefix' will affect all of the other directory
|
|
||||||
specifications that were not explicitly provided.
|
|
||||||
|
|
||||||
The most portable way to affect installation locations is to pass the
|
|
||||||
correct locations to `configure'; however, many packages provide one or
|
|
||||||
both of the following shortcuts of passing variable assignments to the
|
|
||||||
`make install' command line to change installation locations without
|
|
||||||
having to reconfigure or recompile.
|
|
||||||
|
|
||||||
The first method involves providing an override variable for each
|
|
||||||
affected directory. For example, `make install
|
|
||||||
prefix=/alternate/directory' will choose an alternate location for all
|
|
||||||
directory configuration variables that were expressed in terms of
|
|
||||||
`${prefix}'. Any directories that were specified during `configure',
|
|
||||||
but not in terms of `${prefix}', must each be overridden at install
|
|
||||||
time for the entire installation to be relocated. The approach of
|
|
||||||
makefile variable overrides for each directory variable is required by
|
|
||||||
the GNU Coding Standards, and ideally causes no recompilation.
|
|
||||||
However, some platforms have known limitations with the semantics of
|
|
||||||
shared libraries that end up requiring recompilation when using this
|
|
||||||
method, particularly noticeable in packages that use GNU Libtool.
|
|
||||||
|
|
||||||
The second method involves providing the `DESTDIR' variable. For
|
|
||||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
|
||||||
`/alternate/directory' before all installation names. The approach of
|
|
||||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
|
||||||
does not work on platforms that have drive letters. On the other hand,
|
|
||||||
it does better at avoiding recompilation issues, and works well even
|
|
||||||
when some directory options were not specified in terms of `${prefix}'
|
|
||||||
at `configure' time.
|
|
||||||
|
|
||||||
Optional Features
|
|
||||||
=================
|
|
||||||
|
|
||||||
If the package supports it, you can cause programs to be installed
|
|
||||||
with an extra prefix or suffix on their names by giving `configure' the
|
|
||||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
|
||||||
|
|
||||||
Some packages pay attention to `--enable-FEATURE' options to
|
|
||||||
`configure', where FEATURE indicates an optional part of the package.
|
|
||||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
|
||||||
is something like `gnu-as' or `x' (for the X Window System). The
|
|
||||||
`README' should mention any `--enable-' and `--with-' options that the
|
|
||||||
package recognizes.
|
|
||||||
|
|
||||||
For packages that use the X Window System, `configure' can usually
|
|
||||||
find the X include and library files automatically, but if it doesn't,
|
|
||||||
you can use the `configure' options `--x-includes=DIR' and
|
|
||||||
`--x-libraries=DIR' to specify their locations.
|
|
||||||
|
|
||||||
Some packages offer the ability to configure how verbose the
|
|
||||||
execution of `make' will be. For these packages, running `./configure
|
|
||||||
--enable-silent-rules' sets the default to minimal output, which can be
|
|
||||||
overridden with `make V=1'; while running `./configure
|
|
||||||
--disable-silent-rules' sets the default to verbose, which can be
|
|
||||||
overridden with `make V=0'.
|
|
||||||
|
|
||||||
Particular systems
|
|
||||||
==================
|
|
||||||
|
|
||||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
|
||||||
CC is not installed, it is recommended to use the following options in
|
|
||||||
order to use an ANSI C compiler:
|
|
||||||
|
|
||||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
|
||||||
|
|
||||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
|
||||||
|
|
||||||
HP-UX `make' updates targets which have the same time stamps as
|
|
||||||
their prerequisites, which makes it generally unusable when shipped
|
|
||||||
generated files such as `configure' are involved. Use GNU `make'
|
|
||||||
instead.
|
|
||||||
|
|
||||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
|
||||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
|
||||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
|
||||||
to try
|
|
||||||
|
|
||||||
./configure CC="cc"
|
|
||||||
|
|
||||||
and if that doesn't work, try
|
|
||||||
|
|
||||||
./configure CC="cc -nodtk"
|
|
||||||
|
|
||||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
|
||||||
directory contains several dysfunctional programs; working variants of
|
|
||||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
|
||||||
in your `PATH', put it _after_ `/usr/bin'.
|
|
||||||
|
|
||||||
On Haiku, software installed for all users goes in `/boot/common',
|
|
||||||
not `/usr/local'. It is recommended to use the following options:
|
|
||||||
|
|
||||||
./configure --prefix=/boot/common
|
|
||||||
|
|
||||||
Specifying the System Type
|
|
||||||
==========================
|
|
||||||
|
|
||||||
There may be some features `configure' cannot figure out
|
|
||||||
automatically, but needs to determine by the type of machine the package
|
|
||||||
will run on. Usually, assuming the package is built to be run on the
|
|
||||||
_same_ architectures, `configure' can figure that out, but if it prints
|
|
||||||
a message saying it cannot guess the machine type, give it the
|
|
||||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
|
||||||
type, such as `sun4', or a canonical name which has the form:
|
|
||||||
|
|
||||||
CPU-COMPANY-SYSTEM
|
|
||||||
|
|
||||||
where SYSTEM can have one of these forms:
|
|
||||||
|
|
||||||
OS
|
|
||||||
KERNEL-OS
|
|
||||||
|
|
||||||
See the file `config.sub' for the possible values of each field. If
|
|
||||||
`config.sub' isn't included in this package, then this package doesn't
|
|
||||||
need to know the machine type.
|
|
||||||
|
|
||||||
If you are _building_ compiler tools for cross-compiling, you should
|
|
||||||
use the option `--target=TYPE' to select the type of system they will
|
|
||||||
produce code for.
|
|
||||||
|
|
||||||
If you want to _use_ a cross compiler, that generates code for a
|
|
||||||
platform different from the build platform, you should specify the
|
|
||||||
"host" platform (i.e., that on which the generated programs will
|
|
||||||
eventually be run) with `--host=TYPE'.
|
|
||||||
|
|
||||||
Sharing Defaults
|
|
||||||
================
|
|
||||||
|
|
||||||
If you want to set default values for `configure' scripts to share,
|
|
||||||
you can create a site shell script called `config.site' that gives
|
|
||||||
default values for variables like `CC', `cache_file', and `prefix'.
|
|
||||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
|
||||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
|
||||||
`CONFIG_SITE' environment variable to the location of the site script.
|
|
||||||
A warning: not all `configure' scripts look for a site script.
|
|
||||||
|
|
||||||
Defining Variables
|
|
||||||
==================
|
|
||||||
|
|
||||||
Variables not defined in a site shell script can be set in the
|
|
||||||
environment passed to `configure'. However, some packages may run
|
|
||||||
configure again during the build, and the customized values of these
|
|
||||||
variables may be lost. In order to avoid this problem, you should set
|
|
||||||
them in the `configure' command line, using `VAR=value'. For example:
|
|
||||||
|
|
||||||
./configure CC=/usr/local2/bin/gcc
|
|
||||||
|
|
||||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
|
||||||
overridden in the site shell script).
|
|
||||||
|
|
||||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
|
||||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
|
||||||
this workaround:
|
|
||||||
|
|
||||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
|
||||||
|
|
||||||
`configure' Invocation
|
|
||||||
======================
|
|
||||||
|
|
||||||
`configure' recognizes the following options to control how it
|
|
||||||
operates.
|
|
||||||
|
|
||||||
`--help'
|
|
||||||
`-h'
|
|
||||||
Print a summary of all of the options to `configure', and exit.
|
|
||||||
|
|
||||||
`--help=short'
|
|
||||||
`--help=recursive'
|
|
||||||
Print a summary of the options unique to this package's
|
|
||||||
`configure', and exit. The `short' variant lists options used
|
|
||||||
only in the top level, while the `recursive' variant lists options
|
|
||||||
also present in any nested packages.
|
|
||||||
|
|
||||||
`--version'
|
|
||||||
`-V'
|
|
||||||
Print the version of Autoconf used to generate the `configure'
|
|
||||||
script, and exit.
|
|
||||||
|
|
||||||
`--cache-file=FILE'
|
|
||||||
Enable the cache: use and save the results of the tests in FILE,
|
|
||||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
|
||||||
disable caching.
|
|
||||||
|
|
||||||
`--config-cache'
|
|
||||||
`-C'
|
|
||||||
Alias for `--cache-file=config.cache'.
|
|
||||||
|
|
||||||
`--quiet'
|
|
||||||
`--silent'
|
|
||||||
`-q'
|
|
||||||
Do not print messages saying which checks are being made. To
|
|
||||||
suppress all normal output, redirect it to `/dev/null' (any error
|
|
||||||
messages will still be shown).
|
|
||||||
|
|
||||||
`--srcdir=DIR'
|
|
||||||
Look for the package's source code in directory DIR. Usually
|
|
||||||
`configure' can determine that directory automatically.
|
|
||||||
|
|
||||||
`--prefix=DIR'
|
|
||||||
Use DIR as the installation prefix. *note Installation Names::
|
|
||||||
for more details, including other options available for fine-tuning
|
|
||||||
the installation locations.
|
|
||||||
|
|
||||||
`--no-create'
|
|
||||||
`-n'
|
|
||||||
Run the configure checks, but stop before creating any output
|
|
||||||
files.
|
|
||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options. Run
|
|
||||||
`configure --help' for more details.
|
|
@ -1,5 +0,0 @@
|
|||||||
lib_LTLIBRARIES = libnative.la
|
|
||||||
libnative_la_SOURCES = src/native.c
|
|
||||||
libnative_la_CFLAGS = -I$(srcdir)/include
|
|
||||||
libnative_la_LDFLAGS = -version-info 0:0:0
|
|
||||||
pkginclude_HEADERS = include/libnative/native.h
|
|
@ -1,827 +0,0 @@
|
|||||||
# Makefile.in generated by automake 1.13.2 from Makefile.am.
|
|
||||||
# @configure_input@
|
|
||||||
|
|
||||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
|
||||||
# with or without modifications, as long as this notice is preserved.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
||||||
# PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
@SET_MAKE@
|
|
||||||
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
|
||||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
|
||||||
am__make_running_with_option = \
|
|
||||||
case $${target_option-} in \
|
|
||||||
?) ;; \
|
|
||||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
|
||||||
"target option '$${target_option-}' specified" >&2; \
|
|
||||||
exit 1;; \
|
|
||||||
esac; \
|
|
||||||
has_opt=no; \
|
|
||||||
sane_makeflags=$$MAKEFLAGS; \
|
|
||||||
if $(am__is_gnu_make); then \
|
|
||||||
sane_makeflags=$$MFLAGS; \
|
|
||||||
else \
|
|
||||||
case $$MAKEFLAGS in \
|
|
||||||
*\\[\ \ ]*) \
|
|
||||||
bs=\\; \
|
|
||||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
|
||||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
|
||||||
esac; \
|
|
||||||
fi; \
|
|
||||||
skip_next=no; \
|
|
||||||
strip_trailopt () \
|
|
||||||
{ \
|
|
||||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
|
||||||
}; \
|
|
||||||
for flg in $$sane_makeflags; do \
|
|
||||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
|
||||||
case $$flg in \
|
|
||||||
*=*|--*) continue;; \
|
|
||||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
|
||||||
-*I?*) strip_trailopt 'I';; \
|
|
||||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
|
||||||
-*O?*) strip_trailopt 'O';; \
|
|
||||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
|
||||||
-*l?*) strip_trailopt 'l';; \
|
|
||||||
-[dEDm]) skip_next=yes;; \
|
|
||||||
-[JT]) skip_next=yes;; \
|
|
||||||
esac; \
|
|
||||||
case $$flg in \
|
|
||||||
*$$target_option*) has_opt=yes; break;; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
test $$has_opt = yes
|
|
||||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
|
||||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
|
||||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
|
||||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
|
||||||
install_sh_DATA = $(install_sh) -c -m 644
|
|
||||||
install_sh_PROGRAM = $(install_sh) -c
|
|
||||||
install_sh_SCRIPT = $(install_sh) -c
|
|
||||||
INSTALL_HEADER = $(INSTALL_DATA)
|
|
||||||
transform = $(program_transform_name)
|
|
||||||
NORMAL_INSTALL = :
|
|
||||||
PRE_INSTALL = :
|
|
||||||
POST_INSTALL = :
|
|
||||||
NORMAL_UNINSTALL = :
|
|
||||||
PRE_UNINSTALL = :
|
|
||||||
POST_UNINSTALL = :
|
|
||||||
build_triplet = @build@
|
|
||||||
host_triplet = @host@
|
|
||||||
subdir = .
|
|
||||||
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
|
|
||||||
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
|
||||||
$(top_srcdir)/configure $(am__configure_deps) depcomp \
|
|
||||||
$(pkginclude_HEADERS) COPYING config.guess config.sub \
|
|
||||||
install-sh missing ltmain.sh
|
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
|
||||||
$(ACLOCAL_M4)
|
|
||||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
|
||||||
configure.lineno config.status.lineno
|
|
||||||
mkinstalldirs = $(install_sh) -d
|
|
||||||
CONFIG_CLEAN_FILES =
|
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
|
||||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
|
||||||
am__vpath_adj = case $$p in \
|
|
||||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
|
||||||
*) f=$$p;; \
|
|
||||||
esac;
|
|
||||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
|
||||||
am__install_max = 40
|
|
||||||
am__nobase_strip_setup = \
|
|
||||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
|
||||||
am__nobase_strip = \
|
|
||||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
|
||||||
am__nobase_list = $(am__nobase_strip_setup); \
|
|
||||||
for p in $$list; do echo "$$p $$p"; done | \
|
|
||||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
|
||||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
|
||||||
if (++n[$$2] == $(am__install_max)) \
|
|
||||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
|
||||||
END { for (dir in files) print dir, files[dir] }'
|
|
||||||
am__base_list = \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
|
||||||
am__uninstall_files_from_dir = { \
|
|
||||||
test -z "$$files" \
|
|
||||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
|
||||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
|
||||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
|
||||||
}
|
|
||||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"
|
|
||||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
|
||||||
libnative_la_LIBADD =
|
|
||||||
am_libnative_la_OBJECTS = libnative_la-native.lo
|
|
||||||
libnative_la_OBJECTS = $(am_libnative_la_OBJECTS)
|
|
||||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
|
||||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
|
||||||
am__v_lt_0 = --silent
|
|
||||||
am__v_lt_1 =
|
|
||||||
libnative_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
|
||||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libnative_la_CFLAGS) \
|
|
||||||
$(CFLAGS) $(libnative_la_LDFLAGS) $(LDFLAGS) -o $@
|
|
||||||
AM_V_P = $(am__v_P_@AM_V@)
|
|
||||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
|
||||||
am__v_P_0 = false
|
|
||||||
am__v_P_1 = :
|
|
||||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
|
||||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
|
||||||
am__v_GEN_0 = @echo " GEN " $@;
|
|
||||||
am__v_GEN_1 =
|
|
||||||
AM_V_at = $(am__v_at_@AM_V@)
|
|
||||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
|
||||||
am__v_at_0 = @
|
|
||||||
am__v_at_1 =
|
|
||||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
|
||||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
|
||||||
am__depfiles_maybe = depfiles
|
|
||||||
am__mv = mv -f
|
|
||||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
|
||||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
|
||||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
|
||||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
|
||||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
|
||||||
$(AM_CFLAGS) $(CFLAGS)
|
|
||||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
|
||||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
|
||||||
am__v_CC_0 = @echo " CC " $@;
|
|
||||||
am__v_CC_1 =
|
|
||||||
CCLD = $(CC)
|
|
||||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
|
||||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
|
||||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
|
||||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
|
||||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
|
||||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
|
||||||
am__v_CCLD_1 =
|
|
||||||
SOURCES = $(libnative_la_SOURCES)
|
|
||||||
DIST_SOURCES = $(libnative_la_SOURCES)
|
|
||||||
am__can_run_installinfo = \
|
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
|
||||||
n|no|NO) false;; \
|
|
||||||
*) (install-info --version) >/dev/null 2>&1;; \
|
|
||||||
esac
|
|
||||||
HEADERS = $(pkginclude_HEADERS)
|
|
||||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
|
||||||
# Read a list of newline-separated strings from the standard input,
|
|
||||||
# and print each of them once, without duplicates. Input order is
|
|
||||||
# *not* preserved.
|
|
||||||
am__uniquify_input = $(AWK) '\
|
|
||||||
BEGIN { nonempty = 0; } \
|
|
||||||
{ items[$$0] = 1; nonempty = 1; } \
|
|
||||||
END { if (nonempty) { for (i in items) print i; }; } \
|
|
||||||
'
|
|
||||||
# Make sure the list of sources is unique. This is necessary because,
|
|
||||||
# e.g., the same source file might be shared among _SOURCES variables
|
|
||||||
# for different programs/libraries.
|
|
||||||
am__define_uniq_tagged_files = \
|
|
||||||
list='$(am__tagged_files)'; \
|
|
||||||
unique=`for i in $$list; do \
|
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
|
||||||
done | $(am__uniquify_input)`
|
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
CSCOPE = cscope
|
|
||||||
AM_RECURSIVE_TARGETS = cscope
|
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|
||||||
distdir = $(PACKAGE)-$(VERSION)
|
|
||||||
top_distdir = $(distdir)
|
|
||||||
am__remove_distdir = \
|
|
||||||
if test -d "$(distdir)"; then \
|
|
||||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
|
||||||
&& rm -rf "$(distdir)" \
|
|
||||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
|
||||||
else :; fi
|
|
||||||
am__post_remove_distdir = $(am__remove_distdir)
|
|
||||||
DIST_ARCHIVES = $(distdir).tar.gz
|
|
||||||
GZIP_ENV = --best
|
|
||||||
DIST_TARGETS = dist-gzip
|
|
||||||
distuninstallcheck_listfiles = find . -type f -print
|
|
||||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
|
||||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
|
||||||
distcleancheck_listfiles = find . -type f -print
|
|
||||||
ACLOCAL = @ACLOCAL@
|
|
||||||
AMTAR = @AMTAR@
|
|
||||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
|
||||||
AR = @AR@
|
|
||||||
AUTOCONF = @AUTOCONF@
|
|
||||||
AUTOHEADER = @AUTOHEADER@
|
|
||||||
AUTOMAKE = @AUTOMAKE@
|
|
||||||
AWK = @AWK@
|
|
||||||
CC = @CC@
|
|
||||||
CCDEPMODE = @CCDEPMODE@
|
|
||||||
CFLAGS = @CFLAGS@
|
|
||||||
CPP = @CPP@
|
|
||||||
CPPFLAGS = @CPPFLAGS@
|
|
||||||
CYGPATH_W = @CYGPATH_W@
|
|
||||||
DEFS = @DEFS@
|
|
||||||
DEPDIR = @DEPDIR@
|
|
||||||
DLLTOOL = @DLLTOOL@
|
|
||||||
DSYMUTIL = @DSYMUTIL@
|
|
||||||
DUMPBIN = @DUMPBIN@
|
|
||||||
ECHO_C = @ECHO_C@
|
|
||||||
ECHO_N = @ECHO_N@
|
|
||||||
ECHO_T = @ECHO_T@
|
|
||||||
EGREP = @EGREP@
|
|
||||||
EXEEXT = @EXEEXT@
|
|
||||||
FGREP = @FGREP@
|
|
||||||
GREP = @GREP@
|
|
||||||
INSTALL = @INSTALL@
|
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
||||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
|
||||||
LD = @LD@
|
|
||||||
LDFLAGS = @LDFLAGS@
|
|
||||||
LIBOBJS = @LIBOBJS@
|
|
||||||
LIBS = @LIBS@
|
|
||||||
LIBTOOL = @LIBTOOL@
|
|
||||||
LIPO = @LIPO@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
|
||||||
MKDIR_P = @MKDIR_P@
|
|
||||||
NM = @NM@
|
|
||||||
NMEDIT = @NMEDIT@
|
|
||||||
OBJDUMP = @OBJDUMP@
|
|
||||||
OBJEXT = @OBJEXT@
|
|
||||||
OTOOL = @OTOOL@
|
|
||||||
OTOOL64 = @OTOOL64@
|
|
||||||
PACKAGE = @PACKAGE@
|
|
||||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
|
||||||
PACKAGE_STRING = @PACKAGE_STRING@
|
|
||||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
||||||
PACKAGE_URL = @PACKAGE_URL@
|
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
|
||||||
RANLIB = @RANLIB@
|
|
||||||
SED = @SED@
|
|
||||||
SET_MAKE = @SET_MAKE@
|
|
||||||
SHELL = @SHELL@
|
|
||||||
STRIP = @STRIP@
|
|
||||||
VERSION = @VERSION@
|
|
||||||
abs_builddir = @abs_builddir@
|
|
||||||
abs_srcdir = @abs_srcdir@
|
|
||||||
abs_top_builddir = @abs_top_builddir@
|
|
||||||
abs_top_srcdir = @abs_top_srcdir@
|
|
||||||
ac_ct_AR = @ac_ct_AR@
|
|
||||||
ac_ct_CC = @ac_ct_CC@
|
|
||||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
|
||||||
am__include = @am__include@
|
|
||||||
am__leading_dot = @am__leading_dot@
|
|
||||||
am__quote = @am__quote@
|
|
||||||
am__tar = @am__tar@
|
|
||||||
am__untar = @am__untar@
|
|
||||||
bindir = @bindir@
|
|
||||||
build = @build@
|
|
||||||
build_alias = @build_alias@
|
|
||||||
build_cpu = @build_cpu@
|
|
||||||
build_os = @build_os@
|
|
||||||
build_vendor = @build_vendor@
|
|
||||||
builddir = @builddir@
|
|
||||||
datadir = @datadir@
|
|
||||||
datarootdir = @datarootdir@
|
|
||||||
docdir = @docdir@
|
|
||||||
dvidir = @dvidir@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
host = @host@
|
|
||||||
host_alias = @host_alias@
|
|
||||||
host_cpu = @host_cpu@
|
|
||||||
host_os = @host_os@
|
|
||||||
host_vendor = @host_vendor@
|
|
||||||
htmldir = @htmldir@
|
|
||||||
includedir = @includedir@
|
|
||||||
infodir = @infodir@
|
|
||||||
install_sh = @install_sh@
|
|
||||||
libdir = @libdir@
|
|
||||||
libexecdir = @libexecdir@
|
|
||||||
localedir = @localedir@
|
|
||||||
localstatedir = @localstatedir@
|
|
||||||
mandir = @mandir@
|
|
||||||
mkdir_p = @mkdir_p@
|
|
||||||
oldincludedir = @oldincludedir@
|
|
||||||
pdfdir = @pdfdir@
|
|
||||||
prefix = @prefix@
|
|
||||||
program_transform_name = @program_transform_name@
|
|
||||||
psdir = @psdir@
|
|
||||||
sbindir = @sbindir@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
srcdir = @srcdir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
target_alias = @target_alias@
|
|
||||||
top_build_prefix = @top_build_prefix@
|
|
||||||
top_builddir = @top_builddir@
|
|
||||||
top_srcdir = @top_srcdir@
|
|
||||||
lib_LTLIBRARIES = libnative.la
|
|
||||||
libnative_la_SOURCES = src/native.c
|
|
||||||
libnative_la_CFLAGS = -I$(srcdir)/include
|
|
||||||
libnative_la_LDFLAGS = -version-info 0:0:0
|
|
||||||
pkginclude_HEADERS = include/libnative/native.h
|
|
||||||
all: all-am
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
.SUFFIXES: .c .lo .o .obj
|
|
||||||
am--refresh: Makefile
|
|
||||||
@:
|
|
||||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
|
||||||
@for dep in $?; do \
|
|
||||||
case '$(am__configure_deps)' in \
|
|
||||||
*$$dep*) \
|
|
||||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
|
||||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
|
||||||
&& exit 0; \
|
|
||||||
exit 1;; \
|
|
||||||
esac; \
|
|
||||||
done; \
|
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
|
||||||
$(am__cd) $(top_srcdir) && \
|
|
||||||
$(AUTOMAKE) --gnu Makefile
|
|
||||||
.PRECIOUS: Makefile
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
||||||
@case '$?' in \
|
|
||||||
*config.status*) \
|
|
||||||
echo ' $(SHELL) ./config.status'; \
|
|
||||||
$(SHELL) ./config.status;; \
|
|
||||||
*) \
|
|
||||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
|
||||||
esac;
|
|
||||||
|
|
||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
|
||||||
$(SHELL) ./config.status --recheck
|
|
||||||
|
|
||||||
$(top_srcdir)/configure: $(am__configure_deps)
|
|
||||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
|
||||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
|
||||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
|
||||||
$(am__aclocal_m4_deps):
|
|
||||||
|
|
||||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
|
||||||
list2=; for p in $$list; do \
|
|
||||||
if test -f $$p; then \
|
|
||||||
list2="$$list2 $$p"; \
|
|
||||||
else :; fi; \
|
|
||||||
done; \
|
|
||||||
test -z "$$list2" || { \
|
|
||||||
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
|
||||||
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
|
||||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
|
||||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
|
||||||
}
|
|
||||||
|
|
||||||
uninstall-libLTLIBRARIES:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
|
||||||
for p in $$list; do \
|
|
||||||
$(am__strip_dir) \
|
|
||||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
|
||||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
clean-libLTLIBRARIES:
|
|
||||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
|
||||||
@list='$(lib_LTLIBRARIES)'; \
|
|
||||||
locs=`for p in $$list; do echo $$p; done | \
|
|
||||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
|
||||||
sort -u`; \
|
|
||||||
test -z "$$locs" || { \
|
|
||||||
echo rm -f $${locs}; \
|
|
||||||
rm -f $${locs}; \
|
|
||||||
}
|
|
||||||
|
|
||||||
libnative.la: $(libnative_la_OBJECTS) $(libnative_la_DEPENDENCIES) $(EXTRA_libnative_la_DEPENDENCIES)
|
|
||||||
$(AM_V_CCLD)$(libnative_la_LINK) -rpath $(libdir) $(libnative_la_OBJECTS) $(libnative_la_LIBADD) $(LIBS)
|
|
||||||
|
|
||||||
mostlyclean-compile:
|
|
||||||
-rm -f *.$(OBJEXT)
|
|
||||||
|
|
||||||
distclean-compile:
|
|
||||||
-rm -f *.tab.c
|
|
||||||
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnative_la-native.Plo@am__quote@
|
|
||||||
|
|
||||||
.c.o:
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
|
|
||||||
|
|
||||||
.c.obj:
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
|
||||||
|
|
||||||
.c.lo:
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
|
||||||
|
|
||||||
libnative_la-native.lo: src/native.c
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -MT libnative_la-native.lo -MD -MP -MF $(DEPDIR)/libnative_la-native.Tpo -c -o libnative_la-native.lo `test -f 'src/native.c' || echo '$(srcdir)/'`src/native.c
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnative_la-native.Tpo $(DEPDIR)/libnative_la-native.Plo
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/native.c' object='libnative_la-native.lo' libtool=yes @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnative_la_CFLAGS) $(CFLAGS) -c -o libnative_la-native.lo `test -f 'src/native.c' || echo '$(srcdir)/'`src/native.c
|
|
||||||
|
|
||||||
mostlyclean-libtool:
|
|
||||||
-rm -f *.lo
|
|
||||||
|
|
||||||
clean-libtool:
|
|
||||||
-rm -rf .libs _libs
|
|
||||||
|
|
||||||
distclean-libtool:
|
|
||||||
-rm -f libtool config.lt
|
|
||||||
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
|
|
||||||
@$(NORMAL_INSTALL)
|
|
||||||
@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
|
|
||||||
if test -n "$$list"; then \
|
|
||||||
echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
|
|
||||||
$(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \
|
|
||||||
fi; \
|
|
||||||
for p in $$list; do \
|
|
||||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
|
||||||
echo "$$d$$p"; \
|
|
||||||
done | $(am__base_list) | \
|
|
||||||
while read files; do \
|
|
||||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
|
|
||||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
|
|
||||||
done
|
|
||||||
|
|
||||||
uninstall-pkgincludeHEADERS:
|
|
||||||
@$(NORMAL_UNINSTALL)
|
|
||||||
@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
|
|
||||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
|
||||||
dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
|
|
||||||
|
|
||||||
ID: $(am__tagged_files)
|
|
||||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
|
||||||
tags: tags-am
|
|
||||||
TAGS: tags
|
|
||||||
|
|
||||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
|
||||||
set x; \
|
|
||||||
here=`pwd`; \
|
|
||||||
$(am__define_uniq_tagged_files); \
|
|
||||||
shift; \
|
|
||||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
|
||||||
test -n "$$unique" || unique=$$empty_fix; \
|
|
||||||
if test $$# -gt 0; then \
|
|
||||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
|
||||||
"$$@" $$unique; \
|
|
||||||
else \
|
|
||||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
|
||||||
$$unique; \
|
|
||||||
fi; \
|
|
||||||
fi
|
|
||||||
ctags: ctags-am
|
|
||||||
|
|
||||||
CTAGS: ctags
|
|
||||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
|
||||||
$(am__define_uniq_tagged_files); \
|
|
||||||
test -z "$(CTAGS_ARGS)$$unique" \
|
|
||||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
|
||||||
$$unique
|
|
||||||
|
|
||||||
GTAGS:
|
|
||||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
|
||||||
&& $(am__cd) $(top_srcdir) \
|
|
||||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
|
||||||
cscope: cscope.files
|
|
||||||
test ! -s cscope.files \
|
|
||||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
|
||||||
clean-cscope:
|
|
||||||
-rm -f cscope.files
|
|
||||||
cscope.files: clean-cscope cscopelist
|
|
||||||
cscopelist: cscopelist-am
|
|
||||||
|
|
||||||
cscopelist-am: $(am__tagged_files)
|
|
||||||
list='$(am__tagged_files)'; \
|
|
||||||
case "$(srcdir)" in \
|
|
||||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
|
||||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
|
||||||
esac; \
|
|
||||||
for i in $$list; do \
|
|
||||||
if test -f "$$i"; then \
|
|
||||||
echo "$(subdir)/$$i"; \
|
|
||||||
else \
|
|
||||||
echo "$$sdir/$$i"; \
|
|
||||||
fi; \
|
|
||||||
done >> $(top_builddir)/cscope.files
|
|
||||||
|
|
||||||
distclean-tags:
|
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
|
||||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
|
||||||
$(am__remove_distdir)
|
|
||||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
|
||||||
list='$(DISTFILES)'; \
|
|
||||||
dist_files=`for file in $$list; do echo $$file; done | \
|
|
||||||
sed -e "s|^$$srcdirstrip/||;t" \
|
|
||||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
|
||||||
case $$dist_files in \
|
|
||||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
|
||||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
|
||||||
sort -u` ;; \
|
|
||||||
esac; \
|
|
||||||
for file in $$dist_files; do \
|
|
||||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
|
||||||
if test -d $$d/$$file; then \
|
|
||||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
|
||||||
if test -d "$(distdir)/$$file"; then \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
|
||||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
|
||||||
fi; \
|
|
||||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
|
||||||
else \
|
|
||||||
test -f "$(distdir)/$$file" \
|
|
||||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
|
||||||
|| exit 1; \
|
|
||||||
fi; \
|
|
||||||
done
|
|
||||||
-test -n "$(am__skip_mode_fix)" \
|
|
||||||
|| find "$(distdir)" -type d ! -perm -755 \
|
|
||||||
-exec chmod u+rwx,go+rx {} \; -o \
|
|
||||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
|
||||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
|
||||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
|
||||||
|| chmod -R a+r "$(distdir)"
|
|
||||||
dist-gzip: distdir
|
|
||||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
|
|
||||||
dist-bzip2: distdir
|
|
||||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
|
|
||||||
dist-lzip: distdir
|
|
||||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
|
|
||||||
dist-xz: distdir
|
|
||||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
|
|
||||||
dist-tarZ: distdir
|
|
||||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
|
|
||||||
dist-shar: distdir
|
|
||||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
|
|
||||||
dist-zip: distdir
|
|
||||||
-rm -f $(distdir).zip
|
|
||||||
zip -rq $(distdir).zip $(distdir)
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
|
|
||||||
dist dist-all:
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
|
|
||||||
# This target untars the dist file and tries a VPATH configuration. Then
|
|
||||||
# it guarantees that the distribution is self-contained by making another
|
|
||||||
# tarfile.
|
|
||||||
distcheck: dist
|
|
||||||
case '$(DIST_ARCHIVES)' in \
|
|
||||||
*.tar.gz*) \
|
|
||||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
|
||||||
*.tar.bz2*) \
|
|
||||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
|
||||||
*.tar.lz*) \
|
|
||||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
|
||||||
*.tar.xz*) \
|
|
||||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
|
||||||
*.tar.Z*) \
|
|
||||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
|
||||||
*.shar.gz*) \
|
|
||||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
|
||||||
*.zip*) \
|
|
||||||
unzip $(distdir).zip ;;\
|
|
||||||
esac
|
|
||||||
chmod -R a-w $(distdir)
|
|
||||||
chmod u+w $(distdir)
|
|
||||||
mkdir $(distdir)/_build $(distdir)/_inst
|
|
||||||
chmod a-w $(distdir)
|
|
||||||
test -d $(distdir)/_build || exit 0; \
|
|
||||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
|
||||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
|
||||||
&& am__cwd=`pwd` \
|
|
||||||
&& $(am__cd) $(distdir)/_build \
|
|
||||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
|
||||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
|
||||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
|
||||||
distuninstallcheck \
|
|
||||||
&& chmod -R a-w "$$dc_install_base" \
|
|
||||||
&& ({ \
|
|
||||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
|
||||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
|
||||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
|
||||||
&& rm -rf "$$dc_destdir" \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
|
||||||
&& rm -rf $(DIST_ARCHIVES) \
|
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
|
||||||
&& cd "$$am__cwd" \
|
|
||||||
|| exit 1
|
|
||||||
$(am__post_remove_distdir)
|
|
||||||
@(echo "$(distdir) archives ready for distribution: "; \
|
|
||||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
|
||||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
|
||||||
distuninstallcheck:
|
|
||||||
@test -n '$(distuninstallcheck_dir)' || { \
|
|
||||||
echo 'ERROR: trying to run $@ with an empty' \
|
|
||||||
'$$(distuninstallcheck_dir)' >&2; \
|
|
||||||
exit 1; \
|
|
||||||
}; \
|
|
||||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
|
||||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
|
||||||
exit 1; \
|
|
||||||
}; \
|
|
||||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
|
||||||
|| { echo "ERROR: files left after uninstall:" ; \
|
|
||||||
if test -n "$(DESTDIR)"; then \
|
|
||||||
echo " (check DESTDIR support)"; \
|
|
||||||
fi ; \
|
|
||||||
$(distuninstallcheck_listfiles) ; \
|
|
||||||
exit 1; } >&2
|
|
||||||
distcleancheck: distclean
|
|
||||||
@if test '$(srcdir)' = . ; then \
|
|
||||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
|
||||||
exit 1 ; \
|
|
||||||
fi
|
|
||||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
|
||||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
|
||||||
$(distcleancheck_listfiles) ; \
|
|
||||||
exit 1; } >&2
|
|
||||||
check-am: all-am
|
|
||||||
check: check-am
|
|
||||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
|
||||||
installdirs:
|
|
||||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \
|
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
|
||||||
done
|
|
||||||
install: install-am
|
|
||||||
install-exec: install-exec-am
|
|
||||||
install-data: install-data-am
|
|
||||||
uninstall: uninstall-am
|
|
||||||
|
|
||||||
install-am: all-am
|
|
||||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
|
||||||
|
|
||||||
installcheck: installcheck-am
|
|
||||||
install-strip:
|
|
||||||
if test -z '$(STRIP)'; then \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
|
||||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
|
||||||
install; \
|
|
||||||
else \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
|
||||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
|
||||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
|
||||||
fi
|
|
||||||
mostlyclean-generic:
|
|
||||||
|
|
||||||
clean-generic:
|
|
||||||
|
|
||||||
distclean-generic:
|
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
|
||||||
|
|
||||||
maintainer-clean-generic:
|
|
||||||
@echo "This command is intended for maintainers to use"
|
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
|
||||||
clean: clean-am
|
|
||||||
|
|
||||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
|
||||||
mostlyclean-am
|
|
||||||
|
|
||||||
distclean: distclean-am
|
|
||||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
|
||||||
-rm -rf ./$(DEPDIR)
|
|
||||||
-rm -f Makefile
|
|
||||||
distclean-am: clean-am distclean-compile distclean-generic \
|
|
||||||
distclean-libtool distclean-tags
|
|
||||||
|
|
||||||
dvi: dvi-am
|
|
||||||
|
|
||||||
dvi-am:
|
|
||||||
|
|
||||||
html: html-am
|
|
||||||
|
|
||||||
html-am:
|
|
||||||
|
|
||||||
info: info-am
|
|
||||||
|
|
||||||
info-am:
|
|
||||||
|
|
||||||
install-data-am: install-pkgincludeHEADERS
|
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
|
||||||
|
|
||||||
install-dvi-am:
|
|
||||||
|
|
||||||
install-exec-am: install-libLTLIBRARIES
|
|
||||||
|
|
||||||
install-html: install-html-am
|
|
||||||
|
|
||||||
install-html-am:
|
|
||||||
|
|
||||||
install-info: install-info-am
|
|
||||||
|
|
||||||
install-info-am:
|
|
||||||
|
|
||||||
install-man:
|
|
||||||
|
|
||||||
install-pdf: install-pdf-am
|
|
||||||
|
|
||||||
install-pdf-am:
|
|
||||||
|
|
||||||
install-ps: install-ps-am
|
|
||||||
|
|
||||||
install-ps-am:
|
|
||||||
|
|
||||||
installcheck-am:
|
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
|
||||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
|
||||||
-rm -rf $(top_srcdir)/autom4te.cache
|
|
||||||
-rm -rf ./$(DEPDIR)
|
|
||||||
-rm -f Makefile
|
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
|
||||||
|
|
||||||
mostlyclean: mostlyclean-am
|
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
|
||||||
mostlyclean-libtool
|
|
||||||
|
|
||||||
pdf: pdf-am
|
|
||||||
|
|
||||||
pdf-am:
|
|
||||||
|
|
||||||
ps: ps-am
|
|
||||||
|
|
||||||
ps-am:
|
|
||||||
|
|
||||||
uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
|
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
|
||||||
|
|
||||||
.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \
|
|
||||||
clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \
|
|
||||||
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
|
|
||||||
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
|
|
||||||
distcheck distclean distclean-compile distclean-generic \
|
|
||||||
distclean-libtool distclean-tags distcleancheck distdir \
|
|
||||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
|
||||||
install install-am install-data install-data-am install-dvi \
|
|
||||||
install-dvi-am install-exec install-exec-am install-html \
|
|
||||||
install-html-am install-info install-info-am \
|
|
||||||
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
|
|
||||||
install-pkgincludeHEADERS install-ps install-ps-am \
|
|
||||||
install-strip installcheck installcheck-am installdirs \
|
|
||||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
|
||||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
|
||||||
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
|
|
||||||
uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
|
|
||||||
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
|
||||||
.NOEXPORT:
|
|
@ -1,17 +0,0 @@
|
|||||||
# Preparation
|
|
||||||
|
|
||||||
gvm install go1.1
|
|
||||||
gvm use go1.1
|
|
||||||
gvm pkgset create libnative
|
|
||||||
gvm pkgset use libnative
|
|
||||||
|
|
||||||
# Native Code Installation
|
|
||||||
|
|
||||||
gvm pkgset use libnative
|
|
||||||
./configure --prefix=${GVM_OVERLAY_PREFIX}
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
# Go Integration Testing
|
|
||||||
|
|
||||||
CGO_CFLAGS="-I${GVM_OVERLAY_PREFIX}/include" CGO_LDFLAGS="${GVM_OVERLAY_PREFIX}/lib/libnative.a" go build -v -x .go build
|
|
||||||
./native
|
|
@ -1,19 +0,0 @@
|
|||||||
This example demonstrates a workflow with native code integration.
|
|
||||||
|
|
||||||
# Preparation
|
|
||||||
|
|
||||||
gvm install go1.1
|
|
||||||
gvm use go1.1
|
|
||||||
gvm pkgset create libnative
|
|
||||||
gvm pkgset use libnative
|
|
||||||
|
|
||||||
# Native Code Installation
|
|
||||||
|
|
||||||
gvm pkgset use libnative
|
|
||||||
./configure --prefix=${GVM_OVERLAY_PREFIX}
|
|
||||||
make && make install
|
|
||||||
|
|
||||||
# Go Integration Testing
|
|
||||||
|
|
||||||
CGO_CFLAGS="-I${GVM_OVERLAY_PREFIX}/include" CGO_LDFLAGS="${GVM_OVERLAY_PREFIX}/lib/libnative.a" go build -v -x .go build
|
|
||||||
./native
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,8 +0,0 @@
|
|||||||
AC_INIT([libnative], [0.0.0])
|
|
||||||
AM_INIT_AUTOMAKE
|
|
||||||
AC_CONFIG_FILES([Makefile])
|
|
||||||
AC_ENABLE_SHARED
|
|
||||||
AC_ENABLE_STATIC
|
|
||||||
LT_INIT
|
|
||||||
AC_PROG_LIBTOOL(libtool)
|
|
||||||
AC_OUTPUT
|
|
@ -1,790 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
|
||||||
|
|
||||||
scriptversion=2012-10-18.11; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
'')
|
|
||||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
-h | --h*)
|
|
||||||
cat <<\EOF
|
|
||||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
|
||||||
|
|
||||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
|
||||||
as side-effects.
|
|
||||||
|
|
||||||
Environment variables:
|
|
||||||
depmode Dependency tracking mode.
|
|
||||||
source Source file read by 'PROGRAMS ARGS'.
|
|
||||||
object Object file output by 'PROGRAMS ARGS'.
|
|
||||||
DEPDIR directory where to store dependencies.
|
|
||||||
depfile Dependency file to output.
|
|
||||||
tmpdepfile Temporary file to use when outputting dependencies.
|
|
||||||
libtool Whether libtool is used (yes/no).
|
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
|
||||||
EOF
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
-v | --v*)
|
|
||||||
echo "depcomp $scriptversion"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Get the directory component of the given path, and save it in the
|
|
||||||
# global variables '$dir'. Note that this directory component will
|
|
||||||
# be either empty or ending with a '/' character. This is deliberate.
|
|
||||||
set_dir_from ()
|
|
||||||
{
|
|
||||||
case $1 in
|
|
||||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
|
||||||
*) dir=;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get the suffix-stripped basename of the given path, and save it the
|
|
||||||
# global variable '$base'.
|
|
||||||
set_base_from ()
|
|
||||||
{
|
|
||||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
|
||||||
}
|
|
||||||
|
|
||||||
# If no dependency file was actually created by the compiler invocation,
|
|
||||||
# we still have to create a dummy depfile, to avoid errors with the
|
|
||||||
# Makefile "include basename.Plo" scheme.
|
|
||||||
make_dummy_depfile ()
|
|
||||||
{
|
|
||||||
echo "#dummy" > "$depfile"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Factor out some common post-processing of the generated depfile.
|
|
||||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
|
||||||
aix_post_process_depfile ()
|
|
||||||
{
|
|
||||||
# If the compiler actually managed to produce a dependency file,
|
|
||||||
# post-process it.
|
|
||||||
if test -f "$tmpdepfile"; then
|
|
||||||
# Each line is of the form 'foo.o: dependency.h'.
|
|
||||||
# Do two passes, one to just change these to
|
|
||||||
# $object: dependency.h
|
|
||||||
# and one to simply output
|
|
||||||
# dependency.h:
|
|
||||||
# which is needed to avoid the deleted-header problem.
|
|
||||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
|
||||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
|
||||||
} > "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
else
|
|
||||||
make_dummy_depfile
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# A tabulation character.
|
|
||||||
tab=' '
|
|
||||||
# A newline character.
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
# Character ranges might be problematic outside the C locale.
|
|
||||||
# These definitions help.
|
|
||||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
||||||
lower=abcdefghijklmnopqrstuvwxyz
|
|
||||||
digits=0123456789
|
|
||||||
alpha=${upper}${lower}
|
|
||||||
|
|
||||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
|
||||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
|
||||||
depfile=${depfile-`echo "$object" |
|
|
||||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
|
||||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
|
||||||
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
|
|
||||||
# Avoid interferences from the environment.
|
|
||||||
gccflag= dashmflag=
|
|
||||||
|
|
||||||
# Some modes work just like other modes, but use different flags. We
|
|
||||||
# parameterize here, but still list the modes in the big case below,
|
|
||||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
|
||||||
# here, because this file can only contain one case statement.
|
|
||||||
if test "$depmode" = hp; then
|
|
||||||
# HP compiler uses -M and no extra arg.
|
|
||||||
gccflag=-M
|
|
||||||
depmode=gcc
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$depmode" = dashXmstdout; then
|
|
||||||
# This is just like dashmstdout with a different argument.
|
|
||||||
dashmflag=-xM
|
|
||||||
depmode=dashmstdout
|
|
||||||
fi
|
|
||||||
|
|
||||||
cygpath_u="cygpath -u -f -"
|
|
||||||
if test "$depmode" = msvcmsys; then
|
|
||||||
# This is just like msvisualcpp but w/o cygpath translation.
|
|
||||||
# Just convert the backslash-escaped backslashes to single forward
|
|
||||||
# slashes to satisfy depend.m4
|
|
||||||
cygpath_u='sed s,\\\\,/,g'
|
|
||||||
depmode=msvisualcpp
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$depmode" = msvc7msys; then
|
|
||||||
# This is just like msvc7 but w/o cygpath translation.
|
|
||||||
# Just convert the backslash-escaped backslashes to single forward
|
|
||||||
# slashes to satisfy depend.m4
|
|
||||||
cygpath_u='sed s,\\\\,/,g'
|
|
||||||
depmode=msvc7
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$depmode" = xlc; then
|
|
||||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
|
||||||
gccflag=-qmakedep=gcc,-MF
|
|
||||||
depmode=gcc
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$depmode" in
|
|
||||||
gcc3)
|
|
||||||
## gcc 3 implements dependency tracking that does exactly what
|
|
||||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
|
||||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
|
||||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
|
||||||
## the command line argument order; so add the flags where they
|
|
||||||
## appear in depend2.am. Note that the slowdown incurred here
|
|
||||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
|
||||||
*) set fnord "$@" "$arg" ;;
|
|
||||||
esac
|
|
||||||
shift # fnord
|
|
||||||
shift # $arg
|
|
||||||
done
|
|
||||||
"$@"
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
mv "$tmpdepfile" "$depfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
gcc)
|
|
||||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
|
||||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
|
||||||
## (see the conditional assignment to $gccflag above).
|
|
||||||
## There are various ways to get dependency output from gcc. Here's
|
|
||||||
## why we pick this rather obscure method:
|
|
||||||
## - Don't want to use -MD because we'd like the dependencies to end
|
|
||||||
## up in a subdir. Having to rename by hand is ugly.
|
|
||||||
## (We might end up doing this anyway to support other compilers.)
|
|
||||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
|
||||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
|
||||||
## supported by the other compilers which use the 'gcc' depmode.
|
|
||||||
## - Using -M directly means running the compiler twice (even worse
|
|
||||||
## than renaming).
|
|
||||||
if test -z "$gccflag"; then
|
|
||||||
gccflag=-MD,
|
|
||||||
fi
|
|
||||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
# The second -e expression handles DOS-style file names with drive
|
|
||||||
# letters.
|
|
||||||
sed -e 's/^[^:]*: / /' \
|
|
||||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
|
||||||
## This next piece of magic avoids the "deleted header file" problem.
|
|
||||||
## The problem is that when a header file which appears in a .P file
|
|
||||||
## is deleted, the dependency causes make to die (because there is
|
|
||||||
## typically no way to rebuild the header). We avoid this by adding
|
|
||||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
|
||||||
## this for us directly.
|
|
||||||
## Some versions of gcc put a space before the ':'. On the theory
|
|
||||||
## that the space means something, we add a space to the output as
|
|
||||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
|
||||||
## to the object. Take care to not repeat it in the output.
|
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
hp)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
sgi)
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
|
||||||
else
|
|
||||||
"$@" -MDupdate "$tmpdepfile"
|
|
||||||
fi
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
|
|
||||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
# Clip off the initial element (the dependent). Don't try to be
|
|
||||||
# clever and replace this with sed code, as IRIX sed won't handle
|
|
||||||
# lines with more than a fixed number of characters (4096 in
|
|
||||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
|
||||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
|
||||||
# dependency line.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
|
||||||
| tr "$nl" ' ' >> "$depfile"
|
|
||||||
echo >> "$depfile"
|
|
||||||
# The second pass generates a dummy entry for each header file.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
|
||||||
>> "$depfile"
|
|
||||||
else
|
|
||||||
make_dummy_depfile
|
|
||||||
fi
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
xlc)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
aix)
|
|
||||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
|
||||||
# in a .u file. In older versions, this file always lives in the
|
|
||||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
|
||||||
# start of each line; $object doesn't have directory information.
|
|
||||||
# Version 6 uses the directory in both cases.
|
|
||||||
set_dir_from "$object"
|
|
||||||
set_base_from "$object"
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
tmpdepfile1=$dir$base.u
|
|
||||||
tmpdepfile2=$base.u
|
|
||||||
tmpdepfile3=$dir.libs/$base.u
|
|
||||||
"$@" -Wc,-M
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.u
|
|
||||||
tmpdepfile2=$dir$base.u
|
|
||||||
tmpdepfile3=$dir$base.u
|
|
||||||
"$@" -M
|
|
||||||
fi
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
do
|
|
||||||
test -f "$tmpdepfile" && break
|
|
||||||
done
|
|
||||||
aix_post_process_depfile
|
|
||||||
;;
|
|
||||||
|
|
||||||
tcc)
|
|
||||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
|
||||||
# FIXME: That version still under development at the moment of writing.
|
|
||||||
# Make that this statement remains true also for stable, released
|
|
||||||
# versions.
|
|
||||||
# It will wrap lines (doesn't matter whether long or short) with a
|
|
||||||
# trailing '\', as in:
|
|
||||||
#
|
|
||||||
# foo.o : \
|
|
||||||
# foo.c \
|
|
||||||
# foo.h \
|
|
||||||
#
|
|
||||||
# It will put a trailing '\' even on the last line, and will use leading
|
|
||||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
|
||||||
# "Emit spaces for -MD").
|
|
||||||
"$@" -MD -MF "$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
|
||||||
# We have to change lines of the first kind to '$object: \'.
|
|
||||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
|
||||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
|
||||||
# dummy dependency, to avoid the deleted-header problem.
|
|
||||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
## The order of this option in the case statement is important, since the
|
|
||||||
## shell code in configure will try each of these formats in the order
|
|
||||||
## listed in this file. A plain '-MD' option would be understood by many
|
|
||||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
|
||||||
pgcc)
|
|
||||||
# Portland's C compiler understands '-MD'.
|
|
||||||
# Will always output deps to 'file.d' where file is the root name of the
|
|
||||||
# source file under compilation, even if file resides in a subdirectory.
|
|
||||||
# The object file name does not affect the name of the '.d' file.
|
|
||||||
# pgcc 10.2 will output
|
|
||||||
# foo.o: sub/foo.c sub/foo.h
|
|
||||||
# and will wrap long lines using '\' :
|
|
||||||
# foo.o: sub/foo.c ... \
|
|
||||||
# sub/foo.h ... \
|
|
||||||
# ...
|
|
||||||
set_dir_from "$object"
|
|
||||||
# Use the source, not the object, to determine the base name, since
|
|
||||||
# that's sadly what pgcc will do too.
|
|
||||||
set_base_from "$source"
|
|
||||||
tmpdepfile=$base.d
|
|
||||||
|
|
||||||
# For projects that build the same source file twice into different object
|
|
||||||
# files, the pgcc approach of using the *source* file root name can cause
|
|
||||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
|
||||||
# the same $tmpdepfile.
|
|
||||||
lockdir=$base.d-lock
|
|
||||||
trap "
|
|
||||||
echo '$0: caught signal, cleaning up...' >&2
|
|
||||||
rmdir '$lockdir'
|
|
||||||
exit 1
|
|
||||||
" 1 2 13 15
|
|
||||||
numtries=100
|
|
||||||
i=$numtries
|
|
||||||
while test $i -gt 0; do
|
|
||||||
# mkdir is a portable test-and-set.
|
|
||||||
if mkdir "$lockdir" 2>/dev/null; then
|
|
||||||
# This process acquired the lock.
|
|
||||||
"$@" -MD
|
|
||||||
stat=$?
|
|
||||||
# Release the lock.
|
|
||||||
rmdir "$lockdir"
|
|
||||||
break
|
|
||||||
else
|
|
||||||
# If the lock is being held by a different process, wait
|
|
||||||
# until the winning process is done or we timeout.
|
|
||||||
while test -d "$lockdir" && test $i -gt 0; do
|
|
||||||
sleep 1
|
|
||||||
i=`expr $i - 1`
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
i=`expr $i - 1`
|
|
||||||
done
|
|
||||||
trap - 1 2 13 15
|
|
||||||
if test $i -le 0; then
|
|
||||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
|
||||||
echo "$0: check lockdir '$lockdir'" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
# Each line is of the form `foo.o: dependent.h',
|
|
||||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
|
||||||
# Do two passes, one to just change these to
|
|
||||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
|
||||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
|
||||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
|
||||||
# correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
hp2)
|
|
||||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
|
||||||
# compilers, which have integrated preprocessors. The correct option
|
|
||||||
# to use with these is +Maked; it writes dependencies to a file named
|
|
||||||
# 'foo.d', which lands next to the object file, wherever that
|
|
||||||
# happens to be.
|
|
||||||
# Much of this is similar to the tru64 case; see comments there.
|
|
||||||
set_dir_from "$object"
|
|
||||||
set_base_from "$object"
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
tmpdepfile1=$dir$base.d
|
|
||||||
tmpdepfile2=$dir.libs/$base.d
|
|
||||||
"$@" -Wc,+Maked
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.d
|
|
||||||
tmpdepfile2=$dir$base.d
|
|
||||||
"$@" +Maked
|
|
||||||
fi
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
|
||||||
do
|
|
||||||
test -f "$tmpdepfile" && break
|
|
||||||
done
|
|
||||||
if test -f "$tmpdepfile"; then
|
|
||||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
|
||||||
# Add 'dependent.h:' lines.
|
|
||||||
sed -ne '2,${
|
|
||||||
s/^ *//
|
|
||||||
s/ \\*$//
|
|
||||||
s/$/:/
|
|
||||||
p
|
|
||||||
}' "$tmpdepfile" >> "$depfile"
|
|
||||||
else
|
|
||||||
make_dummy_depfile
|
|
||||||
fi
|
|
||||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
|
||||||
;;
|
|
||||||
|
|
||||||
tru64)
|
|
||||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
|
||||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
|
||||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
|
||||||
# dependencies in 'foo.d' instead, so we check for that too.
|
|
||||||
# Subdirectories are respected.
|
|
||||||
set_dir_from "$object"
|
|
||||||
set_base_from "$object"
|
|
||||||
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
|
||||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
|
||||||
# in $dir$base.o.d. We have to check for both files, because
|
|
||||||
# one of the two compilations can be disabled. We should prefer
|
|
||||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
|
||||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
|
||||||
# the former would cause a distcleancheck panic.
|
|
||||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
|
||||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
|
||||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
|
||||||
"$@" -Wc,-MD
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.d
|
|
||||||
tmpdepfile2=$dir$base.d
|
|
||||||
tmpdepfile3=$dir$base.d
|
|
||||||
"$@" -MD
|
|
||||||
fi
|
|
||||||
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
do
|
|
||||||
test -f "$tmpdepfile" && break
|
|
||||||
done
|
|
||||||
# Same post-processing that is required for AIX mode.
|
|
||||||
aix_post_process_depfile
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvc7)
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
showIncludes=-Wc,-showIncludes
|
|
||||||
else
|
|
||||||
showIncludes=-showIncludes
|
|
||||||
fi
|
|
||||||
"$@" $showIncludes > "$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
# The first sed program below extracts the file names and escapes
|
|
||||||
# backslashes for cygpath. The second sed program outputs the file
|
|
||||||
# name when reading, but also accumulates all include files in the
|
|
||||||
# hold buffer in order to output them again at the end. This only
|
|
||||||
# works with sed implementations that can handle large buffers.
|
|
||||||
sed < "$tmpdepfile" -n '
|
|
||||||
/^Note: including file: *\(.*\)/ {
|
|
||||||
s//\1/
|
|
||||||
s/\\/\\\\/g
|
|
||||||
p
|
|
||||||
}' | $cygpath_u | sort -u | sed -n '
|
|
||||||
s/ /\\ /g
|
|
||||||
s/\(.*\)/'"$tab"'\1 \\/p
|
|
||||||
s/.\(.*\) \\/\1:/
|
|
||||||
H
|
|
||||||
$ {
|
|
||||||
s/.*/'"$tab"'/
|
|
||||||
G
|
|
||||||
p
|
|
||||||
}' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvc7msys)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
#nosideeffect)
|
|
||||||
# This comment above is used by automake to tell side-effect
|
|
||||||
# dependency tracking mechanisms from slower ones.
|
|
||||||
|
|
||||||
dashmstdout)
|
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
|
||||||
# always write the preprocessed file to stdout, regardless of -o.
|
|
||||||
"$@" || exit $?
|
|
||||||
|
|
||||||
# Remove the call to Libtool.
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove '-o $object'.
|
|
||||||
IFS=" "
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
-o)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
$object)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"
|
|
||||||
shift # fnord
|
|
||||||
shift # $arg
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
test -z "$dashmflag" && dashmflag=-M
|
|
||||||
# Require at least two characters before searching for ':'
|
|
||||||
# in the target name. This is to cope with DOS-style filenames:
|
|
||||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
|
||||||
"$@" $dashmflag |
|
|
||||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
|
||||||
rm -f "$depfile"
|
|
||||||
cat < "$tmpdepfile" > "$depfile"
|
|
||||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
|
||||||
# correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
dashXmstdout)
|
|
||||||
# This case only exists to satisfy depend.m4. It is never actually
|
|
||||||
# run, as this mode is specially recognized in the preamble.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
makedepend)
|
|
||||||
"$@" || exit $?
|
|
||||||
# Remove any Libtool call
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
# X makedepend
|
|
||||||
shift
|
|
||||||
cleared=no eat=no
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $cleared in
|
|
||||||
no)
|
|
||||||
set ""; shift
|
|
||||||
cleared=yes ;;
|
|
||||||
esac
|
|
||||||
if test $eat = yes; then
|
|
||||||
eat=no
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
case "$arg" in
|
|
||||||
-D*|-I*)
|
|
||||||
set fnord "$@" "$arg"; shift ;;
|
|
||||||
# Strip any option that makedepend may not understand. Remove
|
|
||||||
# the object too, otherwise makedepend will parse it as a source file.
|
|
||||||
-arch)
|
|
||||||
eat=yes ;;
|
|
||||||
-*|$object)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"; shift ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
|
||||||
touch "$tmpdepfile"
|
|
||||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
|
||||||
rm -f "$depfile"
|
|
||||||
# makedepend may prepend the VPATH from the source file name to the object.
|
|
||||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
|
||||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
|
||||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
|
||||||
# correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
sed '1,2d' "$tmpdepfile" \
|
|
||||||
| tr ' ' "$nl" \
|
|
||||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
|
||||||
;;
|
|
||||||
|
|
||||||
cpp)
|
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
|
||||||
# always write the preprocessed file to stdout.
|
|
||||||
"$@" || exit $?
|
|
||||||
|
|
||||||
# Remove the call to Libtool.
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove '-o $object'.
|
|
||||||
IFS=" "
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
-o)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
$object)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"
|
|
||||||
shift # fnord
|
|
||||||
shift # $arg
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
"$@" -E \
|
|
||||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
|
||||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
|
||||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
cat < "$tmpdepfile" >> "$depfile"
|
|
||||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvisualcpp)
|
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
|
||||||
# always write the preprocessed file to stdout.
|
|
||||||
"$@" || exit $?
|
|
||||||
|
|
||||||
# Remove the call to Libtool.
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
IFS=" "
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case "$arg" in
|
|
||||||
-o)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
$object)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
|
||||||
set fnord "$@"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
"$@" -E 2>/dev/null |
|
|
||||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
|
||||||
echo "$tab" >> "$depfile"
|
|
||||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvcmsys)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
none)
|
|
||||||
exec "$@"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "Unknown depmode $depmode" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: shell-script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
@ -1,8 +0,0 @@
|
|||||||
#ifndef NATIVE_H
|
|
||||||
#define NATIVE_H
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
void native_example();
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,527 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# install - install a program, script, or datafile
|
|
||||||
|
|
||||||
scriptversion=2011-11-20.07; # UTC
|
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
|
||||||
# following copyright and license.
|
|
||||||
#
|
|
||||||
# Copyright (C) 1994 X Consortium
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
# of this software and associated documentation files (the "Software"), to
|
|
||||||
# deal in the Software without restriction, including without limitation the
|
|
||||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
# sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
# furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included in
|
|
||||||
# all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
|
||||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
#
|
|
||||||
# Except as contained in this notice, the name of the X Consortium shall not
|
|
||||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
|
||||||
# ings in this Software without prior written authorization from the X Consor-
|
|
||||||
# tium.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# FSF changes to this file are in the public domain.
|
|
||||||
#
|
|
||||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
|
||||||
# 'make' implicit rules from creating a file called install from it
|
|
||||||
# when there is no Makefile.
|
|
||||||
#
|
|
||||||
# This script is compatible with the BSD install script, but was written
|
|
||||||
# from scratch.
|
|
||||||
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
IFS=" "" $nl"
|
|
||||||
|
|
||||||
# set DOITPROG to echo to test this script
|
|
||||||
|
|
||||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
|
||||||
doit=${DOITPROG-}
|
|
||||||
if test -z "$doit"; then
|
|
||||||
doit_exec=exec
|
|
||||||
else
|
|
||||||
doit_exec=$doit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Put in absolute file names if you don't have them in your path;
|
|
||||||
# or use environment vars.
|
|
||||||
|
|
||||||
chgrpprog=${CHGRPPROG-chgrp}
|
|
||||||
chmodprog=${CHMODPROG-chmod}
|
|
||||||
chownprog=${CHOWNPROG-chown}
|
|
||||||
cmpprog=${CMPPROG-cmp}
|
|
||||||
cpprog=${CPPROG-cp}
|
|
||||||
mkdirprog=${MKDIRPROG-mkdir}
|
|
||||||
mvprog=${MVPROG-mv}
|
|
||||||
rmprog=${RMPROG-rm}
|
|
||||||
stripprog=${STRIPPROG-strip}
|
|
||||||
|
|
||||||
posix_glob='?'
|
|
||||||
initialize_posix_glob='
|
|
||||||
test "$posix_glob" != "?" || {
|
|
||||||
if (set -f) 2>/dev/null; then
|
|
||||||
posix_glob=
|
|
||||||
else
|
|
||||||
posix_glob=:
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
'
|
|
||||||
|
|
||||||
posix_mkdir=
|
|
||||||
|
|
||||||
# Desired mode of installed file.
|
|
||||||
mode=0755
|
|
||||||
|
|
||||||
chgrpcmd=
|
|
||||||
chmodcmd=$chmodprog
|
|
||||||
chowncmd=
|
|
||||||
mvcmd=$mvprog
|
|
||||||
rmcmd="$rmprog -f"
|
|
||||||
stripcmd=
|
|
||||||
|
|
||||||
src=
|
|
||||||
dst=
|
|
||||||
dir_arg=
|
|
||||||
dst_arg=
|
|
||||||
|
|
||||||
copy_on_change=false
|
|
||||||
no_target_directory=
|
|
||||||
|
|
||||||
usage="\
|
|
||||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
|
||||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
|
||||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
|
||||||
or: $0 [OPTION]... -d DIRECTORIES...
|
|
||||||
|
|
||||||
In the 1st form, copy SRCFILE to DSTFILE.
|
|
||||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
|
||||||
In the 4th, create DIRECTORIES.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--help display this help and exit.
|
|
||||||
--version display version info and exit.
|
|
||||||
|
|
||||||
-c (ignored)
|
|
||||||
-C install only if different (preserve the last data modification time)
|
|
||||||
-d create directories instead of installing files.
|
|
||||||
-g GROUP $chgrpprog installed files to GROUP.
|
|
||||||
-m MODE $chmodprog installed files to MODE.
|
|
||||||
-o USER $chownprog installed files to USER.
|
|
||||||
-s $stripprog installed files.
|
|
||||||
-t DIRECTORY install into DIRECTORY.
|
|
||||||
-T report an error if DSTFILE is a directory.
|
|
||||||
|
|
||||||
Environment variables override the default commands:
|
|
||||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
|
||||||
RMPROG STRIPPROG
|
|
||||||
"
|
|
||||||
|
|
||||||
while test $# -ne 0; do
|
|
||||||
case $1 in
|
|
||||||
-c) ;;
|
|
||||||
|
|
||||||
-C) copy_on_change=true;;
|
|
||||||
|
|
||||||
-d) dir_arg=true;;
|
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
--help) echo "$usage"; exit $?;;
|
|
||||||
|
|
||||||
-m) mode=$2
|
|
||||||
case $mode in
|
|
||||||
*' '* | *' '* | *'
|
|
||||||
'* | *'*'* | *'?'* | *'['*)
|
|
||||||
echo "$0: invalid mode: $mode" >&2
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-s) stripcmd=$stripprog;;
|
|
||||||
|
|
||||||
-t) dst_arg=$2
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-T) no_target_directory=true;;
|
|
||||||
|
|
||||||
--version) echo "$0 $scriptversion"; exit $?;;
|
|
||||||
|
|
||||||
--) shift
|
|
||||||
break;;
|
|
||||||
|
|
||||||
-*) echo "$0: invalid option: $1" >&2
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
*) break;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
|
||||||
# When -d is used, all remaining arguments are directories to create.
|
|
||||||
# When -t is used, the destination is already specified.
|
|
||||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$dst_arg"; then
|
|
||||||
# $@ is not empty: it contains at least $arg.
|
|
||||||
set fnord "$@" "$dst_arg"
|
|
||||||
shift # fnord
|
|
||||||
fi
|
|
||||||
shift # arg
|
|
||||||
dst_arg=$arg
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
echo "$0: no input file specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# It's OK to call 'install-sh -d' without argument.
|
|
||||||
# This can happen when creating conditional directories.
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
do_exit='(exit $ret); exit $ret'
|
|
||||||
trap "ret=129; $do_exit" 1
|
|
||||||
trap "ret=130; $do_exit" 2
|
|
||||||
trap "ret=141; $do_exit" 13
|
|
||||||
trap "ret=143; $do_exit" 15
|
|
||||||
|
|
||||||
# Set umask so as not to create temps with too-generous modes.
|
|
||||||
# However, 'strip' requires both read and write access to temps.
|
|
||||||
case $mode in
|
|
||||||
# Optimize common cases.
|
|
||||||
*644) cp_umask=133;;
|
|
||||||
*755) cp_umask=22;;
|
|
||||||
|
|
||||||
*[0-7])
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw='% 200'
|
|
||||||
fi
|
|
||||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
|
||||||
*)
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw=,u+rw
|
|
||||||
fi
|
|
||||||
cp_umask=$mode$u_plus_rw;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
for src
|
|
||||||
do
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $src in
|
|
||||||
-* | [=\(\)!]) src=./$src;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
dst=$src
|
|
||||||
dstdir=$dst
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
else
|
|
||||||
|
|
||||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
|
||||||
# might cause directories to be created, which would be especially bad
|
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
|
||||||
if test ! -f "$src" && test ! -d "$src"; then
|
|
||||||
echo "$0: $src does not exist." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dst_arg"; then
|
|
||||||
echo "$0: no destination specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dst=$dst_arg
|
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; won't work
|
|
||||||
# if double slashes aren't ignored.
|
|
||||||
if test -d "$dst"; then
|
|
||||||
if test -n "$no_target_directory"; then
|
|
||||||
echo "$0: $dst_arg: Is a directory" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dstdir=$dst
|
|
||||||
dst=$dstdir/`basename "$src"`
|
|
||||||
dstdir_status=0
|
|
||||||
else
|
|
||||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
|
||||||
dstdir=`
|
|
||||||
(dirname "$dst") 2>/dev/null ||
|
|
||||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
|
||||||
X"$dst" : 'X\(//\)[^/]' \| \
|
|
||||||
X"$dst" : 'X\(//\)$' \| \
|
|
||||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
|
||||||
echo X"$dst" |
|
|
||||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\/\)[^/].*/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\/\)$/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\).*/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
s/.*/./; q'
|
|
||||||
`
|
|
||||||
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
obsolete_mkdir_used=false
|
|
||||||
|
|
||||||
if test $dstdir_status != 0; then
|
|
||||||
case $posix_mkdir in
|
|
||||||
'')
|
|
||||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
|
||||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
|
||||||
umask=`umask`
|
|
||||||
case $stripcmd.$umask in
|
|
||||||
# Optimize common cases.
|
|
||||||
*[2367][2367]) mkdir_umask=$umask;;
|
|
||||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
|
||||||
|
|
||||||
*[0-7])
|
|
||||||
mkdir_umask=`expr $umask + 22 \
|
|
||||||
- $umask % 100 % 40 + $umask % 20 \
|
|
||||||
- $umask % 10 % 4 + $umask % 2
|
|
||||||
`;;
|
|
||||||
*) mkdir_umask=$umask,go-w;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# With -d, create the new directory with the user-specified mode.
|
|
||||||
# Otherwise, rely on $mkdir_umask.
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
mkdir_mode=-m$mode
|
|
||||||
else
|
|
||||||
mkdir_mode=
|
|
||||||
fi
|
|
||||||
|
|
||||||
posix_mkdir=false
|
|
||||||
case $umask in
|
|
||||||
*[123567][0-7][0-7])
|
|
||||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
|
||||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
|
||||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
|
||||||
|
|
||||||
if (umask $mkdir_umask &&
|
|
||||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
if test -z "$dir_arg" || {
|
|
||||||
# Check for POSIX incompatibilities with -m.
|
|
||||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
|
||||||
# other-writable bit of parent directory when it shouldn't.
|
|
||||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
|
||||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
|
||||||
case $ls_ld_tmpdir in
|
|
||||||
d????-?r-*) different_mode=700;;
|
|
||||||
d????-?--*) different_mode=755;;
|
|
||||||
*) false;;
|
|
||||||
esac &&
|
|
||||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
|
||||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
|
||||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
then posix_mkdir=:
|
|
||||||
fi
|
|
||||||
rmdir "$tmpdir/d" "$tmpdir"
|
|
||||||
else
|
|
||||||
# Remove any dirs left behind by ancient mkdir implementations.
|
|
||||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
|
||||||
fi
|
|
||||||
trap '' 0;;
|
|
||||||
esac;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if
|
|
||||||
$posix_mkdir && (
|
|
||||||
umask $mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
|
||||||
)
|
|
||||||
then :
|
|
||||||
else
|
|
||||||
|
|
||||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
|
||||||
# or it failed possibly due to a race condition. Create the
|
|
||||||
# directory the slow way, step by step, checking for races as we go.
|
|
||||||
|
|
||||||
case $dstdir in
|
|
||||||
/*) prefix='/';;
|
|
||||||
[-=\(\)!]*) prefix='./';;
|
|
||||||
*) prefix='';;
|
|
||||||
esac
|
|
||||||
|
|
||||||
eval "$initialize_posix_glob"
|
|
||||||
|
|
||||||
oIFS=$IFS
|
|
||||||
IFS=/
|
|
||||||
$posix_glob set -f
|
|
||||||
set fnord $dstdir
|
|
||||||
shift
|
|
||||||
$posix_glob set +f
|
|
||||||
IFS=$oIFS
|
|
||||||
|
|
||||||
prefixes=
|
|
||||||
|
|
||||||
for d
|
|
||||||
do
|
|
||||||
test X"$d" = X && continue
|
|
||||||
|
|
||||||
prefix=$prefix$d
|
|
||||||
if test -d "$prefix"; then
|
|
||||||
prefixes=
|
|
||||||
else
|
|
||||||
if $posix_mkdir; then
|
|
||||||
(umask=$mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
test -d "$prefix" || exit 1
|
|
||||||
else
|
|
||||||
case $prefix in
|
|
||||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
|
||||||
*) qprefix=$prefix;;
|
|
||||||
esac
|
|
||||||
prefixes="$prefixes '$qprefix'"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
prefix=$prefix/
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -n "$prefixes"; then
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
(umask $mkdir_umask &&
|
|
||||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
|
||||||
test -d "$dstdir" || exit 1
|
|
||||||
obsolete_mkdir_used=true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
|
||||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
|
||||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
|
||||||
else
|
|
||||||
|
|
||||||
# Make a couple of temp file names in the proper directory.
|
|
||||||
dsttmp=$dstdir/_inst.$$_
|
|
||||||
rmtmp=$dstdir/_rm.$$_
|
|
||||||
|
|
||||||
# Trap to clean up those temp files at exit.
|
|
||||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
|
||||||
|
|
||||||
# Copy the file name to the temp name.
|
|
||||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
|
||||||
|
|
||||||
# and set any options; do chmod last to preserve setuid bits.
|
|
||||||
#
|
|
||||||
# If any of these fail, we abort the whole thing. If we want to
|
|
||||||
# ignore errors from any of these, just make sure not to ignore
|
|
||||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
|
||||||
#
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
|
||||||
|
|
||||||
# If -C, don't bother to copy if it wouldn't change the file.
|
|
||||||
if $copy_on_change &&
|
|
||||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
|
||||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
|
||||||
|
|
||||||
eval "$initialize_posix_glob" &&
|
|
||||||
$posix_glob set -f &&
|
|
||||||
set X $old && old=:$2:$4:$5:$6 &&
|
|
||||||
set X $new && new=:$2:$4:$5:$6 &&
|
|
||||||
$posix_glob set +f &&
|
|
||||||
|
|
||||||
test "$old" = "$new" &&
|
|
||||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
rm -f "$dsttmp"
|
|
||||||
else
|
|
||||||
# Rename the file to the real destination.
|
|
||||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
|
||||||
|
|
||||||
# The rename failed, perhaps because mv can't rename something else
|
|
||||||
# to itself, or perhaps because mv is so ancient that it does not
|
|
||||||
# support -f.
|
|
||||||
{
|
|
||||||
# Now remove or move aside any old file at destination location.
|
|
||||||
# We try this two ways since rm can't unlink itself on some
|
|
||||||
# systems and the destination file might be busy for other
|
|
||||||
# reasons. In this case, the final cleanup might fail but the new
|
|
||||||
# file should still install successfully.
|
|
||||||
{
|
|
||||||
test ! -f "$dst" ||
|
|
||||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
|
||||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
|
||||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
|
||||||
} ||
|
|
||||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
|
||||||
(exit 1); exit 1
|
|
||||||
}
|
|
||||||
} &&
|
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
|
||||||
$doit $mvcmd "$dsttmp" "$dst"
|
|
||||||
}
|
|
||||||
fi || exit 1
|
|
||||||
|
|
||||||
trap '' 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Local variables:
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
File diff suppressed because it is too large
Load Diff
@ -1,215 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# Common wrapper for a few potentially missing GNU programs.
|
|
||||||
|
|
||||||
scriptversion=2012-06-26.16; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
|
||||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
echo 1>&2 "Try '$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
--is-lightweight)
|
|
||||||
# Used by our autoconf macros to check whether the available missing
|
|
||||||
# script is modern enough.
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
|
|
||||||
--run)
|
|
||||||
# Back-compat with the calling convention used by older automake.
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
|
|
||||||
-h|--h|--he|--hel|--help)
|
|
||||||
echo "\
|
|
||||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
|
||||||
|
|
||||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
|
||||||
to PROGRAM being missing or too old.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-h, --help display this help and exit
|
|
||||||
-v, --version output version information and exit
|
|
||||||
|
|
||||||
Supported PROGRAM values:
|
|
||||||
aclocal autoconf autoheader autom4te automake makeinfo
|
|
||||||
bison yacc flex lex help2man
|
|
||||||
|
|
||||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
|
||||||
'g' are ignored when checking the name.
|
|
||||||
|
|
||||||
Send bug reports to <bug-automake@gnu.org>."
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
|
||||||
echo "missing $scriptversion (GNU Automake)"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
-*)
|
|
||||||
echo 1>&2 "$0: unknown '$1' option"
|
|
||||||
echo 1>&2 "Try '$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Run the given program, remember its exit status.
|
|
||||||
"$@"; st=$?
|
|
||||||
|
|
||||||
# If it succeeded, we are done.
|
|
||||||
test $st -eq 0 && exit 0
|
|
||||||
|
|
||||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
|
||||||
# passed; such an option is passed most likely to detect whether the
|
|
||||||
# program is present and works.
|
|
||||||
case $2 in --version|--help) exit $st;; esac
|
|
||||||
|
|
||||||
# Exit code 63 means version mismatch. This often happens when the user
|
|
||||||
# tries to use an ancient version of a tool on a file that requires a
|
|
||||||
# minimum version.
|
|
||||||
if test $st -eq 63; then
|
|
||||||
msg="probably too old"
|
|
||||||
elif test $st -eq 127; then
|
|
||||||
# Program was missing.
|
|
||||||
msg="missing on your system"
|
|
||||||
else
|
|
||||||
# Program was found and executed, but failed. Give up.
|
|
||||||
exit $st
|
|
||||||
fi
|
|
||||||
|
|
||||||
perl_URL=http://www.perl.org/
|
|
||||||
flex_URL=http://flex.sourceforge.net/
|
|
||||||
gnu_software_URL=http://www.gnu.org/software
|
|
||||||
|
|
||||||
program_details ()
|
|
||||||
{
|
|
||||||
case $1 in
|
|
||||||
aclocal|automake)
|
|
||||||
echo "The '$1' program is part of the GNU Automake package:"
|
|
||||||
echo "<$gnu_software_URL/automake>"
|
|
||||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
|
||||||
echo "<$gnu_software_URL/autoconf>"
|
|
||||||
echo "<$gnu_software_URL/m4/>"
|
|
||||||
echo "<$perl_URL>"
|
|
||||||
;;
|
|
||||||
autoconf|autom4te|autoheader)
|
|
||||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
|
||||||
echo "<$gnu_software_URL/autoconf/>"
|
|
||||||
echo "It also requires GNU m4 and Perl in order to run:"
|
|
||||||
echo "<$gnu_software_URL/m4/>"
|
|
||||||
echo "<$perl_URL>"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
give_advice ()
|
|
||||||
{
|
|
||||||
# Normalize program name to check for.
|
|
||||||
normalized_program=`echo "$1" | sed '
|
|
||||||
s/^gnu-//; t
|
|
||||||
s/^gnu//; t
|
|
||||||
s/^g//; t'`
|
|
||||||
|
|
||||||
printf '%s\n' "'$1' is $msg."
|
|
||||||
|
|
||||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
|
||||||
case $normalized_program in
|
|
||||||
autoconf*)
|
|
||||||
echo "You should only need it if you modified 'configure.ac',"
|
|
||||||
echo "or m4 files included by it."
|
|
||||||
program_details 'autoconf'
|
|
||||||
;;
|
|
||||||
autoheader*)
|
|
||||||
echo "You should only need it if you modified 'acconfig.h' or"
|
|
||||||
echo "$configure_deps."
|
|
||||||
program_details 'autoheader'
|
|
||||||
;;
|
|
||||||
automake*)
|
|
||||||
echo "You should only need it if you modified 'Makefile.am' or"
|
|
||||||
echo "$configure_deps."
|
|
||||||
program_details 'automake'
|
|
||||||
;;
|
|
||||||
aclocal*)
|
|
||||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
|
||||||
echo "$configure_deps."
|
|
||||||
program_details 'aclocal'
|
|
||||||
;;
|
|
||||||
autom4te*)
|
|
||||||
echo "You might have modified some maintainer files that require"
|
|
||||||
echo "the 'automa4te' program to be rebuilt."
|
|
||||||
program_details 'autom4te'
|
|
||||||
;;
|
|
||||||
bison*|yacc*)
|
|
||||||
echo "You should only need it if you modified a '.y' file."
|
|
||||||
echo "You may want to install the GNU Bison package:"
|
|
||||||
echo "<$gnu_software_URL/bison/>"
|
|
||||||
;;
|
|
||||||
lex*|flex*)
|
|
||||||
echo "You should only need it if you modified a '.l' file."
|
|
||||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
|
||||||
echo "<$flex_URL>"
|
|
||||||
;;
|
|
||||||
help2man*)
|
|
||||||
echo "You should only need it if you modified a dependency" \
|
|
||||||
"of a man page."
|
|
||||||
echo "You may want to install the GNU Help2man package:"
|
|
||||||
echo "<$gnu_software_URL/help2man/>"
|
|
||||||
;;
|
|
||||||
makeinfo*)
|
|
||||||
echo "You should only need it if you modified a '.texi' file, or"
|
|
||||||
echo "any other file indirectly affecting the aspect of the manual."
|
|
||||||
echo "You might want to install the Texinfo package:"
|
|
||||||
echo "<$gnu_software_URL/texinfo/>"
|
|
||||||
echo "The spurious makeinfo call might also be the consequence of"
|
|
||||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
|
||||||
echo "want to install GNU make:"
|
|
||||||
echo "<$gnu_software_URL/make/>"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "You might have modified some files without having the proper"
|
|
||||||
echo "tools for further handling them. Check the 'README' file, it"
|
|
||||||
echo "often tells you about the needed prerequisites for installing"
|
|
||||||
echo "this package. You may also peek at any GNU archive site, in"
|
|
||||||
echo "case some other package contains this missing '$1' program."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
|
||||||
-e '2,$s/^/ /' >&2
|
|
||||||
|
|
||||||
# Propagate the correct exit status (expected to be 127 for a program
|
|
||||||
# not found, 63 for a program that failed due to version mismatch).
|
|
||||||
exit $st
|
|
||||||
|
|
||||||
# Local variables:
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
@ -1,8 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
// #include "libnative/native.h"
|
|
||||||
import "C"
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
C.native_example()
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
#include "libnative/native.h"
|
|
||||||
|
|
||||||
void native_example() {
|
|
||||||
printf("Hello from C!\n");
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
Package: gvm
|
|
||||||
Version: 1.0.15
|
|
||||||
Architecture: all
|
|
||||||
Maintainer: Joshua Bussdieker <josh.bussdieker@moovweb.com>
|
|
||||||
Description: Go Version Manager
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
/vagrant/extra/vagrant/install-deps.sh
|
|
||||||
/vagrant/extra/vagrant/install-local.sh
|
|
@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
sudo apt-get -y install curl git mercurial bison make
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
rm -rf /home/vagrant/.gvm
|
|
||||||
cp -r /vagrant /home/vagrant/.gvm
|
|
||||||
echo "export GVM_ROOT=/vagrant
|
|
||||||
. \$GVM_ROOT/scripts/gvm-default" > /home/vagrant/.gvm/scripts/gvm
|
|
||||||
echo ". /home/vagrant/.gvm/scripts/gvm"
|
|
@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
command=$1
|
|
||||||
if [[ -f $GVM_ROOT/scripts/alias-$command ]]; then
|
|
||||||
shift
|
|
||||||
"$GVM_ROOT/scripts/alias-$command" "$@"
|
|
||||||
elif [[ -n $command ]]; then
|
|
||||||
display_fatal "Unrecognized command line argument: '$command'"
|
|
||||||
else
|
|
||||||
echo "= gvm alias
|
|
||||||
|
|
||||||
* http://github.com/moovweb/gvm
|
|
||||||
|
|
||||||
== DESCRIPTION:
|
|
||||||
|
|
||||||
GVM alias is used to manage go version aliases
|
|
||||||
|
|
||||||
== Usage
|
|
||||||
|
|
||||||
gvm alias Command
|
|
||||||
|
|
||||||
== Command
|
|
||||||
|
|
||||||
create - create a new alias
|
|
||||||
delete - delete an alias
|
|
||||||
list - list aliases"
|
|
||||||
fi
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
[[ $1 != "" ]] ||
|
|
||||||
display_fatal "Please specifiy the alias name"
|
|
||||||
|
|
||||||
[[ $2 != "" ]] ||
|
|
||||||
display_fatal "Please specifiy the go version name"
|
|
||||||
|
|
||||||
[[ ! -f "$GVM_ROOT/environments/$1" ]] ||
|
|
||||||
display_fatal "Alias already exists!"
|
|
||||||
[[ -f "$GVM_ROOT/environments/$2" ]] ||
|
|
||||||
display_fatal "Target doesn't exist!"
|
|
||||||
|
|
||||||
mkdir -p "$GVM_ROOT/environments" ||
|
|
||||||
display_fatal "Could not create folder"
|
|
||||||
mkdir -p "$GVM_ROOT/gos/$1" ||
|
|
||||||
display_fatal "Could not create folder"
|
|
||||||
cp "$GVM_ROOT/environments/$2" "$GVM_ROOT/environments/$1" ||
|
|
||||||
display_fatal "Could copy environment"
|
|
||||||
echo "export gvm_alias_name=\"$1\"" >> "$GVM_ROOT/environments/$1" ||
|
|
||||||
display_fatal "Could not extend environment"
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
[[ $1 != "" ]] ||
|
|
||||||
display_fatal "Please specifiy the name"
|
|
||||||
|
|
||||||
[[ -f $GVM_ROOT/environments/$1 ]] ||
|
|
||||||
display_fatal "Alias doesn't exist!"
|
|
||||||
|
|
||||||
$GREP_PATH "gvm_alias_name" "$GVM_ROOT/environments/$1" > /dev/null ||
|
|
||||||
display_fatal "$1 is not an alias!"
|
|
||||||
|
|
||||||
rm -rf "$GVM_ROOT/environments/$1" ||
|
|
||||||
display_fatal "Could not delete alias"
|
|
||||||
|
|
||||||
rm -rf "$GVM_ROOT/gos/$1" ||
|
|
||||||
display_fatal "Could not delete alias"
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
echo
|
|
||||||
display_message "gvm go aliases"
|
|
||||||
echo
|
|
||||||
|
|
||||||
for a in $(cd "$GVM_ROOT/environments" ; $GREP_PATH -l "gvm_alias_name" ./*); do
|
|
||||||
t=$(sh -c ". $GVM_ROOT/environments/$a ; echo \$gvm_go_name")
|
|
||||||
echo " $a ($t)"
|
|
||||||
done
|
|
||||||
echo
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
|||||||
. $GVM_ROOT/scripts/functions
|
|
||||||
|
|
||||||
_gvm()
|
|
||||||
{
|
|
||||||
local cur prev opts base
|
|
||||||
COMPREPLY=()
|
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
||||||
base="${COMP_WORDS[0]}"
|
|
||||||
cmd="${COMP_WORDS[1]}"
|
|
||||||
subcmd="${COMP_WORDS[2]}"
|
|
||||||
|
|
||||||
case "${cmd}" in
|
|
||||||
pkgset)
|
|
||||||
case "${subcmd}" in
|
|
||||||
use|delete|empty)
|
|
||||||
[[ "$gvm_go_name" == "" ]] && return 1
|
|
||||||
[[ $COMP_CWORD > 3 ]] && return 1
|
|
||||||
local version="$(for x in `$LS_PATH $GVM_ROOT/pkgsets/$gvm_go_name`; do echo ${x} ; done )"
|
|
||||||
COMPREPLY=( $(compgen -W "${version}" -- ${cur}) )
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
create|list)
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
opts="create delete empty list use"
|
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
pkg)
|
|
||||||
case "${subcmd}" in
|
|
||||||
uninstall)
|
|
||||||
[[ "$gvm_go_name" == "" ]] && return 1
|
|
||||||
[[ "$gvm_pkgset_name" == "" ]] && return 1
|
|
||||||
if [[ "$COMP_CWORD" == "3" ]]; then
|
|
||||||
local version="$(for x in `$LS_PATH $GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name/pkg.gvm`; do echo ${x} ; done )"
|
|
||||||
COMPREPLY=( $(compgen -W "${version}" -- ${cur}) )
|
|
||||||
return 0
|
|
||||||
elif [[ "$COMP_CWORD" == "4" ]]; then
|
|
||||||
local version="$(for x in `$LS_PATH $GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name/pkg.gvm/${COMP_WORDS[3]}`; do echo ${x} ; done )"
|
|
||||||
COMPREPLY=( $(compgen -W "${version}" -- ${cur}) )
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
install|list)
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
opts="install list uninstall"
|
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
install)
|
|
||||||
[ ! -d $GVM_ROOT/archive/go ] && return 1
|
|
||||||
[[ $COMP_CWORD > 2 ]] && return 1
|
|
||||||
local version="$(for x in `hg tags -R $GVM_ROOT/archive/go | awk '{print $1}' | $GREP_PATH -E "release|tip|go"`; do echo ${x} ; done )"
|
|
||||||
COMPREPLY=( $(compgen -W "${version}" -- ${cur}) )
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
use|uninstall)
|
|
||||||
[ ! -d $GVM_ROOT/gos ] && return 1
|
|
||||||
[[ $COMP_CWORD > 2 ]] && return 1
|
|
||||||
local installed_versions="$(for x in `$LS_PATH $GVM_ROOT/gos`; do echo ${x} ; done )"
|
|
||||||
COMPREPLY=( $(compgen -W "${installed_versions}" -- ${cur}) )
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
[[ $COMP_CWORD > 1 ]] && return 1
|
|
||||||
opts="alias get install list listall uninstall use version"
|
|
||||||
[[ "$gvm_go_name" != "" ]] && opts="alias cross diff get install list listall pkgset uninstall use version"
|
|
||||||
[[ "$gvm_pkgset_name" != "" ]] && opts="alias cross diff get install list listall pkg pkgset uninstall use version"
|
|
||||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
complete -F _gvm gvm
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
display_usage() {
|
|
||||||
display_message "Usage: gvm cross [os] [arch]"
|
|
||||||
display_message " os = linux/darwin/windows"
|
|
||||||
display_message " arch = amd64/386/arm"
|
|
||||||
}
|
|
||||||
|
|
||||||
display_list() {
|
|
||||||
echo
|
|
||||||
display_usage
|
|
||||||
echo
|
|
||||||
display_message "Installed platforms:"
|
|
||||||
echo
|
|
||||||
$LS_PATH "$GOROOT/pkg" | $GREP_PATH windows_ | sed 's/^/ /g'
|
|
||||||
$LS_PATH "$GOROOT/pkg" | $GREP_PATH darwin_ | sed 's/^/ /g'
|
|
||||||
$LS_PATH "$GOROOT/pkg" | $GREP_PATH linux_ | sed 's/^/ /g'
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
which go &> /dev/null || display_fatal "Only available in versions after Go 1"
|
|
||||||
|
|
||||||
[ -z "$1" ] && display_list
|
|
||||||
|
|
||||||
if [ ! -f "$GOROOT/pkg/tool/cross" ]; then
|
|
||||||
display_message "Installing x86, x86-64, and ARM commands"
|
|
||||||
set -e
|
|
||||||
for arch in 8 6 5; do
|
|
||||||
for cmd in a c g l; do
|
|
||||||
go tool dist install -v cmd/$arch$cmd ||
|
|
||||||
display_fatal "Couldn't compile tool: $arch$cmd"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
touch "$GOROOT/pkg/tool/cross"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export GOOS=$1
|
|
||||||
shift
|
|
||||||
[ -z "$1" ] && display_usage && display_fatal "arch is not specified"
|
|
||||||
export GOARCH=$1
|
|
||||||
|
|
||||||
if [ ! -d "$GOROOT/pkg/${GOOS}_${GOARCH}" ]; then
|
|
||||||
display_message "Installing $GOOS $GOARCH runtime library"
|
|
||||||
if [ "$GOOS" = "windows" ]; then
|
|
||||||
export CGO_ENABLED=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$GOROOT/src"
|
|
||||||
go tool dist install -v pkg/runtime ||
|
|
||||||
display_fatal "Couldn't compile runtime library for $GOOS $GOARCH"
|
|
||||||
go install -v -a std ||
|
|
||||||
display_fatal "Install runtime library for $GOOS $GOARCH"
|
|
||||||
else
|
|
||||||
display_message "Runtime library already installed for $GOOS $GOARCH"
|
|
||||||
fi
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
version=$1
|
|
||||||
|
|
||||||
if [ "$version" != "" ]; then
|
|
||||||
fuzzy_match=$($LS_PATH "$GVM_ROOT/gos" | $SORT_PATH | $GREP_PATH "$version" | $HEAD_PATH -n 1 | $GREP_PATH "$version") ||
|
|
||||||
display_fatal "Invalid version $version"
|
|
||||||
|
|
||||||
foldername=$GVM_ROOT/gos/$fuzzy_match
|
|
||||||
else
|
|
||||||
if [[ "$gvm_go_name" != "" ]]; then
|
|
||||||
foldername=$GVM_ROOT/gos/$gvm_go_name
|
|
||||||
else
|
|
||||||
display_fatal "No version selected"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -d $foldername ]]; then
|
|
||||||
cd "$foldername"
|
|
||||||
find . > /tmp/manifest.test
|
|
||||||
diff manifest /tmp/manifest.test
|
|
||||||
if [[ "$?" == "0" ]]; then
|
|
||||||
display_message "Clean $foldername"
|
|
||||||
else
|
|
||||||
display_message "*Dirty* $foldername"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
display_fatal "Invalid version"
|
|
||||||
fi
|
|
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions" || return 1
|
|
||||||
|
|
||||||
function gvm() {
|
|
||||||
if [[ "$GVM_ROOT" == "" ]]; then
|
|
||||||
display_error "GVM_ROOT not set. Please source \$GVM_ROOT/scripts/gvm"
|
|
||||||
return $?
|
|
||||||
fi
|
|
||||||
if [[ -d $GVM_ROOT/.git ]]; then
|
|
||||||
mv "$GVM_ROOT/.git" "$GVM_ROOT/git.bak" ||
|
|
||||||
display_error "Failed to move git info out of the way"
|
|
||||||
fi
|
|
||||||
if [[ ! -d $GVM_ROOT ]]; then
|
|
||||||
display_error "GVM_ROOT does not exist. Please reinstall GVM"
|
|
||||||
return $?
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$GVM_ROOT/logs" > /dev/null 2>&1
|
|
||||||
mkdir -p "$GVM_ROOT/gos" > /dev/null 2>&1
|
|
||||||
mkdir -p "$GVM_ROOT/archive" > /dev/null 2>&1
|
|
||||||
mkdir -p "$GVM_ROOT/archive/package" > /dev/null 2>&1
|
|
||||||
mkdir -p "$GVM_ROOT/environments" > /dev/null 2>&1
|
|
||||||
|
|
||||||
if [[ "$1" == "use" ]]; then
|
|
||||||
. "$GVM_ROOT/scripts/env/use"
|
|
||||||
shift
|
|
||||||
gvm_use "$@"
|
|
||||||
elif [[ "$1" == "implode" ]]; then
|
|
||||||
. "$GVM_ROOT/scripts/env/implode"
|
|
||||||
gvm_implode
|
|
||||||
elif [[ "$1" == "pkgset" ]] && [[ "$2" == "use" ]]; then
|
|
||||||
. "$GVM_ROOT/scripts/env/pkgset-use"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
gvm_pkgset_use "$@"
|
|
||||||
else
|
|
||||||
"$GVM_ROOT/bin/gvm" "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function gvm_implode() {
|
|
||||||
read -p "Are you sure? [Y/n] " -n 1 -r
|
|
||||||
echo
|
|
||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
||||||
display_message "Action cancelled"
|
|
||||||
else
|
|
||||||
(rm -rf "$GVM_ROOT" && display_message "GVM successfully removed") || display_error "Failed to uninstall gvm"
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
function gvm_pkgset_use() {
|
|
||||||
[[ "$1" != "" ]] ||
|
|
||||||
display_error "Please specify a package set" || return 1
|
|
||||||
|
|
||||||
[[ "$gvm_go_name" != "" ]] ||
|
|
||||||
display_error "No Go version selected" || return 1
|
|
||||||
|
|
||||||
if [[ "$1" == "--local" ]]; then
|
|
||||||
. "$GVM_ROOT/scripts/function/find_local_pkgset"
|
|
||||||
local LOCAL_TOP=$(find_local_pkgset)
|
|
||||||
unset -f find_local_pkgset
|
|
||||||
[[ -d $LOCAL_TOP ]] ||
|
|
||||||
display_error "Cannot find local package set" || return 1
|
|
||||||
LOCAL_TOP=$LOCAL_TOP/.gvm_local
|
|
||||||
|
|
||||||
fuzzy_match=$($LS_PATH "$LOCAL_TOP/environments" | $SORT_PATH | $GREP_PATH "$gvm_go_name@" | $GREP_PATH "local" | $HEAD_PATH -n 1) ||
|
|
||||||
display_error "Cannot find local package set" || return 1
|
|
||||||
|
|
||||||
[[ "$2" != "--default" ]] ||
|
|
||||||
display_error "Cannot set local pkgset as default" || return 1
|
|
||||||
|
|
||||||
gvm_export_path
|
|
||||||
. "$LOCAL_TOP/environments/$fuzzy_match" ||
|
|
||||||
display_error "Failed to source the package set environment" || return 1
|
|
||||||
|
|
||||||
echo "Now using version $gvm_go_name in local package set"
|
|
||||||
echo "Local GOPATH is now $LOCAL_TOP"
|
|
||||||
else
|
|
||||||
fuzzy_match=$($LS_PATH "$GVM_ROOT/environments" | $SORT_PATH | $GREP_PATH "$gvm_go_name@" | $GREP_PATH "$1" | $HEAD_PATH -n 1) ||
|
|
||||||
display_error "Invalid package set" || return 1
|
|
||||||
|
|
||||||
gvm_export_path
|
|
||||||
. "$GVM_ROOT/environments/$fuzzy_match" ||
|
|
||||||
display_error "Failed to source the package set environment" || return 1
|
|
||||||
|
|
||||||
if [[ "$2" == "--default" ]]; then
|
|
||||||
cp "$GVM_ROOT/environments/$fuzzy_match" "$GVM_ROOT/environments/default"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Now using version $fuzzy_match"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
function gvm_use() {
|
|
||||||
[[ "$1" != "" ]] ||
|
|
||||||
display_error "Please specifiy the version" || return 1
|
|
||||||
local VERSION=$1
|
|
||||||
fuzzy_match=$($LS_PATH "$GVM_ROOT/gos" | $SORT_PATH | $GREP_PATH "$1" | $HEAD_PATH -n 1 | $GREP_PATH "$1")
|
|
||||||
if [[ "$?" != "0" ]]; then
|
|
||||||
GO_CACHE_PATH=$GVM_ROOT/archive/go
|
|
||||||
version=$(hg tags -R "$GO_CACHE_PATH" | awk '{print $1}' | $SORT_PATH | $GREP_PATH "$VERSION" | $HEAD_PATH -n 1 | $GREP_PATH "$VERSION")
|
|
||||||
if [[ "x$version" == "x" ]]; then
|
|
||||||
display_error "Version not found locally. Try 'gvm install $1'" || return 1
|
|
||||||
else
|
|
||||||
display_warning "$version is not installed. Install it by running 'gvm install $version'" || return 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
gvm_export_path
|
|
||||||
. "$GVM_ROOT/environments/$fuzzy_match" &> /dev/null || display_error "Couldn't source environment" || return 1
|
|
||||||
if [[ "$2" == "--default" ]]; then
|
|
||||||
cp "$GVM_ROOT/environments/$fuzzy_match" "$GVM_ROOT/environments/default" || display_error "Couldn't make $fuzzy_match default"
|
|
||||||
fi
|
|
||||||
|
|
||||||
display_message "Now using version $fuzzy_match"
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
display_error() {
|
|
||||||
which tput &> /dev/null
|
|
||||||
if [[ "$?" == "0" ]] && [[ "$TERM" == "xterm" ]]; then
|
|
||||||
tput sgr0
|
|
||||||
tput setaf 1
|
|
||||||
echo "ERROR: $1" >&2
|
|
||||||
tput sgr0
|
|
||||||
else
|
|
||||||
echo "ERROR: $1" >&2
|
|
||||||
fi
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
display_fatal() {
|
|
||||||
which tput &> /dev/null
|
|
||||||
if [[ "$?" == "0" ]] && [[ "$TERM" == "xterm" ]]; then
|
|
||||||
tput sgr0
|
|
||||||
tput setaf 1
|
|
||||||
echo "ERROR: $1" >&2
|
|
||||||
tput sgr0
|
|
||||||
else
|
|
||||||
echo "ERROR: $1" >&2
|
|
||||||
fi
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
display_message() {
|
|
||||||
which tput &> /dev/null
|
|
||||||
if [[ "$?" == "0" ]] && [[ "$TERM" == "xterm" ]]; then
|
|
||||||
# GREEN!
|
|
||||||
tput sgr0
|
|
||||||
tput setaf 2
|
|
||||||
echo "$1"
|
|
||||||
tput sgr0
|
|
||||||
else
|
|
||||||
echo "$1"
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
display_warning() {
|
|
||||||
which tput &> /dev/null
|
|
||||||
if [[ "$?" == "0" ]] && [[ "$TERM" == "xterm" ]]; then
|
|
||||||
# YELLOW!
|
|
||||||
tput sgr0
|
|
||||||
tput setaf 3
|
|
||||||
echo "WARNING: $1"
|
|
||||||
tput sgr0
|
|
||||||
else
|
|
||||||
echo "$1"
|
|
||||||
fi
|
|
||||||
return 1
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
function find_local_pkgset
|
|
||||||
{
|
|
||||||
local TOPFILE=.gvm_local
|
|
||||||
if [ -d $TOPFILE ] ; then
|
|
||||||
PWD= /bin/pwd
|
|
||||||
else
|
|
||||||
local HERE=$PWD
|
|
||||||
T=
|
|
||||||
while [ \( ! \( -d $TOPFILE \) \) -a \( $PWD != "/" \) ]; do
|
|
||||||
\cd ..
|
|
||||||
T=`PWD= /bin/pwd`
|
|
||||||
done
|
|
||||||
\cd $HERE
|
|
||||||
if [ -d "$T/$TOPFILE" ]; then
|
|
||||||
echo $T
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
function gvm_export_path() {
|
|
||||||
export PATH="$GVM_ROOT/bin:$(echo "$PATH" | tr ":" "\n" | grep -v '^$' | egrep -v "$GVM_ROOT/(pkgsets|gos|bin)" | tr "\n" ":" | sed 's/:*$//')"
|
|
||||||
export GVM_PATH_BACKUP="$PATH"
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
LS_ERROR="GVM couldn't find ls"
|
|
||||||
GREP_ERROR="GVM couldn't find grep"
|
|
||||||
SORT_ERROR="GVM couldn't find sort"
|
|
||||||
HEAD_ERROR="GVM couldn't find head"
|
|
||||||
|
|
||||||
LS_PATH=$(unalias ls &> /dev/null; which ls) || display_error "$LS_ERROR" || return 1
|
|
||||||
GREP_PATH=$(unalias grep &> /dev/null; which grep) || display_error "$GREP_ERROR" || return 1
|
|
||||||
SORT_PATH=$(unalias sort &> /dev/null; which sort) || display_error "$SORT_ERROR" || return 1
|
|
||||||
HEAD_PATH=$(unalias head &> /dev/null; which head) || display_error "$HEAD_ERROR" || return 1
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
for function in $GVM_ROOT/scripts/function/*; do
|
|
||||||
. "$function"
|
|
||||||
done
|
|
@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
[[ -d $GVM_ROOT/.git ]] || mv "$GVM_ROOT/git.bak" "$GVM_ROOT/.git" &> /dev/null ||
|
|
||||||
display_fatal "Couldn't find git info"
|
|
||||||
|
|
||||||
cd "$GVM_ROOT"
|
|
||||||
|
|
||||||
if [[ -n $1 ]]; then
|
|
||||||
git checkout "$1" -f || display_fatal "Failed to checkout $1 branch"
|
|
||||||
else
|
|
||||||
git checkout -f || display_fatal "Failed to clean install"
|
|
||||||
fi
|
|
||||||
|
|
||||||
git pull || display_fatal "Failed to update"
|
|
||||||
|
|
||||||
mv ".git" "git.bak" || display_fatal "Couldn't backup git info"
|
|
@ -1,49 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
error_message=""
|
|
||||||
|
|
||||||
# Check for hg
|
|
||||||
which hg &> /dev/null ||
|
|
||||||
error_message="${error_message}
|
|
||||||
Could not find mercurial
|
|
||||||
|
|
||||||
linux: apt-get install mercurial
|
|
||||||
mac: brew install mercurial
|
|
||||||
"
|
|
||||||
# Check for ar
|
|
||||||
which ar &> /dev/null ||
|
|
||||||
error_message="${error_message}
|
|
||||||
Could not find binutils
|
|
||||||
|
|
||||||
linux: apt-get install binutils
|
|
||||||
"
|
|
||||||
# Check for bison
|
|
||||||
which bison &> /dev/null ||
|
|
||||||
error_message="${error_message}
|
|
||||||
Could not find bison
|
|
||||||
|
|
||||||
linux: apt-get install bison
|
|
||||||
"
|
|
||||||
# Check for gcc
|
|
||||||
which gcc &> /dev/null ||
|
|
||||||
error_message="${error_message}
|
|
||||||
Could not find gcc
|
|
||||||
|
|
||||||
linux: apt-get install gcc
|
|
||||||
"
|
|
||||||
# Check for make
|
|
||||||
which make &> /dev/null ||
|
|
||||||
error_message="${error_message}
|
|
||||||
Could not find make
|
|
||||||
|
|
||||||
linux: apt-get install make
|
|
||||||
"
|
|
||||||
|
|
||||||
if [ -n "$error_message" ]; then
|
|
||||||
display_warning "$error_message"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
# All good!
|
|
||||||
exit 0
|
|
||||||
fi
|
|
@ -1,21 +0,0 @@
|
|||||||
unset GOROOT
|
|
||||||
unset GOARCH
|
|
||||||
unset GOOS
|
|
||||||
unset GOPATH
|
|
||||||
unset GOBIN
|
|
||||||
|
|
||||||
unset gvm_go_name
|
|
||||||
unset gvm_pkgset_name
|
|
||||||
|
|
||||||
mkdir -p "$GVM_ROOT/logs" > /dev/null 2>&1
|
|
||||||
mkdir -p "$GVM_ROOT/gos" > /dev/null 2>&1
|
|
||||||
mkdir -p "$GVM_ROOT/archive" > /dev/null 2>&1
|
|
||||||
mkdir -p "$GVM_ROOT/archive/package" > /dev/null 2>&1
|
|
||||||
mkdir -p "$GVM_ROOT/environments" > /dev/null 2>&1
|
|
||||||
|
|
||||||
export GVM_VERSION=$(cat "$GVM_ROOT/VERSION")
|
|
||||||
export PATH="$GVM_ROOT/bin:$PATH"
|
|
||||||
export GVM_PATH_BACKUP="$PATH"
|
|
||||||
[ -f "$GVM_ROOT/environments/default" ] && . "$GVM_ROOT/environments/default"
|
|
||||||
. "$GVM_ROOT/scripts/env/gvm"
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
export GVM_ROOT=@prefix@/gvm
|
|
||||||
. $GVM_ROOT/scripts/gvm-default
|
|
||||||
|
|
@ -1,325 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
function show_usage() {
|
|
||||||
echo "Usage: gvm install [version] [options]"
|
|
||||||
echo " -s, --source=SOURCE Install Go from specified source."
|
|
||||||
echo " -n, --name=NAME Override the default name for this version."
|
|
||||||
echo " -pb, --with-protobuf Install Go protocol buffers."
|
|
||||||
echo " -b, --with-build-tools Install package build tools."
|
|
||||||
echo " -B, --binary Only install from binary."
|
|
||||||
echo " --prefer-binary Attempt a binary install, falling back to source."
|
|
||||||
echo " -h, --help Display this message."
|
|
||||||
}
|
|
||||||
|
|
||||||
read_command_line() {
|
|
||||||
VERSION=$1
|
|
||||||
if [[ "${VERSION:0:1}" != "-" ]]; then
|
|
||||||
shift
|
|
||||||
else
|
|
||||||
display_warning "Invalid version: $1"
|
|
||||||
show_usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
GO_SOURCE_URL=https://go.googlecode.com/hg/
|
|
||||||
for i in "$@"; do
|
|
||||||
case $i in
|
|
||||||
-s=*|--source=*)
|
|
||||||
GO_SOURCE_URL=$(echo "$i" | sed 's/[-a-zA-Z0-9]*=//')
|
|
||||||
;;
|
|
||||||
-n=*|--name=*)
|
|
||||||
GO_NAME=$(echo "$i" | sed 's/[-a-zA-Z0-9]*=//')
|
|
||||||
;;
|
|
||||||
-pb|--with-protobuf)
|
|
||||||
INSTALL_PB="true"
|
|
||||||
;;
|
|
||||||
-b|--with-build-tools)
|
|
||||||
INSTALL_BUILD_TOOLS="true"
|
|
||||||
;;
|
|
||||||
-B|--binary)
|
|
||||||
INSTALL_SOURCE="binary"
|
|
||||||
;;
|
|
||||||
--prefer-binary)
|
|
||||||
INSTALL_SOURCE="prefer-binary"
|
|
||||||
;;
|
|
||||||
-h|--help)
|
|
||||||
show_usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
display_warning "Invalid option $i"
|
|
||||||
show_usage
|
|
||||||
exit 65 # Bad arguments
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
download_source() {
|
|
||||||
GO_CACHE_PATH=$GVM_ROOT/archive/go
|
|
||||||
[[ -d $GO_CACHE_PATH ]] && return
|
|
||||||
display_message "Downloading Go source..."
|
|
||||||
hg clone "$GO_SOURCE_URL" "$GO_CACHE_PATH" >> "$GVM_ROOT/logs/go-download.log" 2>&1 ||
|
|
||||||
display_fatal "Couldn't download Go source. Check the logs $GVM_ROOT/logs/go-download.log"
|
|
||||||
}
|
|
||||||
|
|
||||||
check_tag() {
|
|
||||||
version=$(hg tags -R "$GO_CACHE_PATH" | awk '{print $1}' | $SORT_PATH | $GREP_PATH "$VERSION" | $HEAD_PATH -n 1 | $GREP_PATH -w "$VERSION")
|
|
||||||
}
|
|
||||||
|
|
||||||
update_source() {
|
|
||||||
display_message "Updating Go source..."
|
|
||||||
hg pull -R "$GO_CACHE_PATH" >> "$GVM_ROOT/logs/go-download.log" 2>&1 ||
|
|
||||||
display_fatal "Couldn't get latest Go version info. Check the logs $GVM_ROOT/logs/go-download.log"
|
|
||||||
}
|
|
||||||
|
|
||||||
copy_source() {
|
|
||||||
hg clone -u "$version" "$GO_CACHE_PATH" "$GO_INSTALL_ROOT" >> "$GVM_ROOT/logs/go-$GO_NAME-install.log" 2>&1 ||
|
|
||||||
display_fatal "Couldn't copy source to target folder. Check the logs $GVM_ROOT/logs/go-$GO_NAME-install.log"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
compile_go() {
|
|
||||||
display_message " * Compiling..."
|
|
||||||
unset GOARCH && unset GOOS && unset GOPATH && unset GOBIN && unset GOROOT &&
|
|
||||||
export GOBIN=$GO_INSTALL_ROOT/bin &&
|
|
||||||
export PATH=$GOBIN:$PATH &&
|
|
||||||
export GOROOT=$GO_INSTALL_ROOT &&
|
|
||||||
#cd $GO_INSTALL_ROOT/src && ./all.bash &> $GVM_ROOT/logs/go-$GO_NAME-compile.log ||
|
|
||||||
cd "$GO_INSTALL_ROOT/src" && ./make.bash &> "$GVM_ROOT/logs/go-$GO_NAME-compile.log" ||
|
|
||||||
(rm -rf "$GO_INSTALL_ROOT" && display_fatal "Failed to compile. Check the logs at $GVM_ROOT/logs/go-$GO_NAME-compile.log")
|
|
||||||
}
|
|
||||||
|
|
||||||
create_enviroment() {
|
|
||||||
new_env_file=$GVM_ROOT/environments/$GO_NAME
|
|
||||||
echo "export GVM_ROOT; GVM_ROOT=\"$GVM_ROOT\"" > "$new_env_file"
|
|
||||||
echo "export gvm_go_name; gvm_go_name=\"$GO_NAME\"" >> "$new_env_file"
|
|
||||||
echo "export gvm_pkgset_name; gvm_pkgset_name=\"global\"" >> "$new_env_file"
|
|
||||||
echo "export GOROOT; GOROOT=\"\$GVM_ROOT/gos/$GO_NAME\"" >> "$new_env_file"
|
|
||||||
echo "export GOPATH; GOPATH=\"\$GVM_ROOT/pkgsets/$GO_NAME/global\"" >> "$new_env_file"
|
|
||||||
echo "export GVM_OVERLAY_PREFIX; GVM_OVERLAY_PREFIX=\"\${GVM_ROOT}/pkgsets/${GO_NAME}/global/overlay\"" >> "$new_env_file"
|
|
||||||
echo "export PATH; PATH=\"\${GVM_ROOT}/pkgsets/${GO_NAME}/global/bin:\${GVM_ROOT}/gos/${GO_NAME}/bin:\${GVM_OVERLAY_PREFIX}/bin:\${GVM_ROOT}/bin:\${PATH}\"" >> "$new_env_file"
|
|
||||||
echo "export LD_LIBRARY_PATH; LD_LIBRARY_PATH=\"\${GVM_OVERLAY_PREFIX}/lib:\${LD_LIBRARY_PATH}\"" >> "$new_env_file"
|
|
||||||
echo "export DYLD_LIBRARY_PATH; DYLD_LIBRARY_PATH=\"\${GVM_OVERLAY_PREFIX}/lib:\${DYLD_LIBRARY_PATH}\"" >> "$new_env_file"
|
|
||||||
echo "export PKG_CONFIG_PATH; PKG_CONFIG_PATH=\"\${GVM_OVERLAY_PREFIX}/lib/pkgconfig:\${PKG_CONFIG_PATH}\"" >> "$new_env_file"
|
|
||||||
. "$GVM_ROOT/scripts/env/use"
|
|
||||||
. "$GVM_ROOT/scripts/env/implode"
|
|
||||||
gvm_use "$GO_NAME" &> /dev/null ||
|
|
||||||
display_fatal "Failed to use installed version"
|
|
||||||
gvm pkgset create global
|
|
||||||
unset GOPATH
|
|
||||||
}
|
|
||||||
|
|
||||||
create_global_package_set() {
|
|
||||||
# Create the global package set folder
|
|
||||||
mkdir -p "$GVM_ROOT/pkgsets/$GO_NAME" >> "$GVM_ROOT/logs/go-$GO_NAME-install.log" 2>&1 ||
|
|
||||||
display_fatal "Couldn't create global package set folder. Check the logs at ${GVM_ROOT}/logs/go-${GO_NAME}-install.log"
|
|
||||||
GVM_OVERLAY_ROOT="${GVM_ROOT}/pkgsets/${GO_NAME}/global/overlay"
|
|
||||||
mkdir -p "${GVM_OVERLAY_ROOT}/lib/pkgconfig" >> "${GVM_ROOT}/logs/go-${GO_NAME}-install.log" 2>&1 ||
|
|
||||||
display_fatal "Couldn't create global overlay library directory. Check the logs at ${GVM_ROOT}/logs/go-${GO_NAME}-install.log"
|
|
||||||
mkdir -p "${GVM_OVERLAY_ROOT}/bin" >> "${GVM_ROOT}/logs/go-${GO_NAME}-install.log" 2>&1 ||
|
|
||||||
display_fatal "Couldn't create global overlay bin directory. Check the logs at ${GVM_ROOT}/logs/go-${GO_NAME}-install.log"
|
|
||||||
}
|
|
||||||
|
|
||||||
install_go() {
|
|
||||||
GO_INSTALL_ROOT=$GVM_ROOT/gos/$GO_NAME
|
|
||||||
trap 'rm -rf $GO_INSTALL_ROOT; display_fatal "Cancelled!"' INT
|
|
||||||
|
|
||||||
# Check for existing install
|
|
||||||
if [[ -d "$GO_INSTALL_ROOT" ]]; then
|
|
||||||
if [[ -f "$GO_INSTALL_ROOT/manifest" ]]; then
|
|
||||||
display_message "Already installed!"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
display_warning "Removing corrupt install..."
|
|
||||||
gvm uninstall "$GO_NAME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$version" != "$GO_NAME" ]]; then
|
|
||||||
display_message "Installing $version as $GO_NAME..."
|
|
||||||
else
|
|
||||||
display_message "Installing $version..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
create_global_package_set
|
|
||||||
copy_source
|
|
||||||
compile_go
|
|
||||||
create_enviroment
|
|
||||||
}
|
|
||||||
|
|
||||||
download_binary() {
|
|
||||||
mkdir -p $GO_INSTALL_ROOT >> "${GVM_ROOT}/logs/go-${GO_NAME}-download-binary" 2>&1
|
|
||||||
|
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
|
||||||
GVM_OS="darwin"
|
|
||||||
osx_major_version="$(sw_vers -productVersion | cut -d "." -f 2)"
|
|
||||||
if [ "${osx_major_version}" -ge 8 ]; then
|
|
||||||
GVM_OS_VERSION="-osx10.8"
|
|
||||||
elif [ "${osx_major_version}" -ge 6 ]; then
|
|
||||||
GVM_OS_VERSION="-osx10.6"
|
|
||||||
else
|
|
||||||
display_error "Binary Go unavailable for this platform"
|
|
||||||
rm -rf $GO_INSTALL_ROOT
|
|
||||||
rm -f $GO_BINARY_PATH
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
GVM_OS="linux"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$(uname -m)" == "x86_64" ]; then
|
|
||||||
GVM_ARCH="amd64"
|
|
||||||
else
|
|
||||||
GVM_ARCH="386"
|
|
||||||
fi
|
|
||||||
|
|
||||||
GO_BINARY_FILE=${VERSION}.${GVM_OS}-${GVM_ARCH}${GVM_OS_VERSION}.tar.gz
|
|
||||||
GO_BINARY_URL="http://golang.org/dl/${GO_BINARY_FILE}"
|
|
||||||
GO_BINARY_PATH=${GVM_ROOT}/archive/${GO_BINARY_FILE}
|
|
||||||
|
|
||||||
if [ ! -f $GO_BINARY_PATH ]; then
|
|
||||||
curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH}
|
|
||||||
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
display_error "Failed to download binary go from http://golang.org. Trying https://storage.googleapis.com"
|
|
||||||
GO_BINARY_URL="https://storage.googleapis.com/golang/${GO_BINARY_FILE}"
|
|
||||||
|
|
||||||
curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH}
|
|
||||||
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
display_error "Failed to download binary go"
|
|
||||||
rm -rf $GO_INSTALL_ROOT
|
|
||||||
rm -f $GO_BINARY_PATH
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
tar zxf ${GO_BINARY_PATH} -C $GO_INSTALL_ROOT --strip-components 1 >> "${GVM_ROOT}/logs/go-${GO_NAME}-download-binary" 2>&1
|
|
||||||
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
display_error "Failed to extract binary go"
|
|
||||||
rm -rf $GO_INSTALL_ROOT
|
|
||||||
rm -f $GO_BINARY_PATH
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
install_go_binary() {
|
|
||||||
GO_INSTALL_ROOT=$GVM_ROOT/gos/$GO_NAME
|
|
||||||
trap 'rm -rf $GO_INSTALL_ROOT; display_fatal "Cancelled!"' INT
|
|
||||||
|
|
||||||
# Check for existing install
|
|
||||||
if [[ -d "$GO_INSTALL_ROOT" ]]; then
|
|
||||||
if [[ -f "$GO_INSTALL_ROOT/manifest" ]]; then
|
|
||||||
display_message "Already installed!"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
display_warning "Removing corrupt install..."
|
|
||||||
gvm uninstall "$GO_NAME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
display_message "Installing $GO_NAME from binary source"
|
|
||||||
|
|
||||||
create_global_package_set
|
|
||||||
download_binary
|
|
||||||
create_enviroment
|
|
||||||
}
|
|
||||||
|
|
||||||
install_gpkg() {
|
|
||||||
display_message " * Installing gpkg..."
|
|
||||||
$GVM_GOINSTALL github.com/moovweb/gpkg > "$GVM_ROOT/logs/$GO_NAME-gpkg.log" 2>&1 || return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
install_gb() {
|
|
||||||
display_message " * Installing gb..."
|
|
||||||
$GVM_GOINSTALL github.com/jbussdieker/go-gb/gb > "$GVM_ROOT/logs/$GO_NAME-gb.log" 2>&1 || return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
install_goprotobuf() {
|
|
||||||
which protoc &> /dev/null || display_warning "Could not find protocol buffer compiler
|
|
||||||
|
|
||||||
linux: apt-get install protobuf-compiler
|
|
||||||
mac: brew install protobuf
|
|
||||||
"
|
|
||||||
display_message " * Installing goprotobuf..."
|
|
||||||
if [[ "$GVM_GOINSTALL" == "goinstall" ]]; then
|
|
||||||
$GVM_GOINSTALL goprotobuf.googlecode.com/hg/proto > "$GVM_ROOT/logs/$GO_NAME-pb-compiler.log" 2>&1
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
display_warning "Failed to install goprotobuf. Check the logs at $GVM_ROOT/logs/$GO_NAME-pb-compiler.log"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
cd "$GVM_ROOT/gos/$GO_NAME/src/pkg/goprotobuf.googlecode.com/hg/compiler"
|
|
||||||
make install >> "$GVM_ROOT/logs/$GO_NAME-pb-compiler.log" 2>&1
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
display_warning "Failed to install goprotobuf compiler. Check the logs at $GVM_ROOT/logs/$GO_NAME-pb-compiler.log"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
$GVM_GOINSTALL code.google.com/p/goprotobuf/proto > "$GVM_ROOT/logs/$GO_NAME-pb-compiler.log" 2>&1
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
display_warning "Failed to install goprotobuf. Check the logs at $GVM_ROOT/logs/$GO_NAME-pb-compiler.log"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
$GVM_GOINSTALL code.google.com/p/goprotobuf/protoc-gen-go > "$GVM_ROOT/logs/$GO_NAME-pb-compiler.log" 2>&1
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
display_warning "Failed to install goprotobuf compiler. Check the logs at $GVM_ROOT/logs/$GO_NAME-pb-compiler.log"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
install_from_source() {
|
|
||||||
download_source
|
|
||||||
check_tag
|
|
||||||
if [[ "$?" == "1" ]]; then
|
|
||||||
update_source
|
|
||||||
check_tag || display_fatal "Unrecognized Go version"
|
|
||||||
fi
|
|
||||||
if [[ "$GO_NAME" == "" ]]; then
|
|
||||||
GO_NAME=$version
|
|
||||||
fi
|
|
||||||
install_go
|
|
||||||
|
|
||||||
GVM_GOINSTALL="goinstall"
|
|
||||||
which goinstall &> /dev/null ||
|
|
||||||
GVM_GOINSTALL="go get"
|
|
||||||
|
|
||||||
x="$(hg tags -R "$GO_CACHE_PATH")"; echo "${x#*b0819469a6df}" | $GREP_PATH "$version " &> /dev/null
|
|
||||||
if [[ "$?" == "1" ]]; then
|
|
||||||
if [[ "$INSTALL_BUILD_TOOLS" == "true" ]]; then
|
|
||||||
install_gb || display_warning "Failed to install gb"
|
|
||||||
install_gpkg || display_warning "Failed to install gpkg"
|
|
||||||
fi
|
|
||||||
if [[ "$INSTALL_PB" == "true" ]]; then
|
|
||||||
install_goprotobuf
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$GO_INSTALL_ROOT" && find . > manifest
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
trap 'display_fatal "Canceled!"' INT
|
|
||||||
read_command_line "$@"
|
|
||||||
[[ "$VERSION" == "" ]] && display_fatal "No version specified"
|
|
||||||
|
|
||||||
if [[ "$GO_NAME" == "" ]]; then
|
|
||||||
GO_NAME=$VERSION
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "x$INSTALL_SOURCE" == "xbinary" ]]; then
|
|
||||||
install_go_binary
|
|
||||||
elif [[ "x$INSTALL_SOURCE" == "xprefer-binary" ]]; then
|
|
||||||
install_go_binary || {
|
|
||||||
display_message "Falling back to source installation of $GO_NAME"
|
|
||||||
install_from_source
|
|
||||||
}
|
|
||||||
else
|
|
||||||
install_from_source
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$GO_INSTALL_ROOT" && find . > manifest
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
@ -1,44 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
function show_usage() {
|
|
||||||
echo "Usage: gvm linkthis [package-name] [options]"
|
|
||||||
echo " -h, --help Display this message."
|
|
||||||
echo
|
|
||||||
echo "If the [package-name] is provided, it will be used in the path based"
|
|
||||||
echo "at \${GOPATH%%:*}/src, e.g.:"
|
|
||||||
echo
|
|
||||||
echo " gvm linkthis github.com/moovweb/gpkg"
|
|
||||||
echo
|
|
||||||
echo "If omitted, the [package-name] will be the basename of the current"
|
|
||||||
echo "directory, e.g. '$package_name_basename'."
|
|
||||||
}
|
|
||||||
|
|
||||||
function read_command_line() {
|
|
||||||
for i in "$@"; do
|
|
||||||
case $i in
|
|
||||||
-h|--help*)
|
|
||||||
show_usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
-*|--*)
|
|
||||||
echo "Invalid option $i"
|
|
||||||
show_usage
|
|
||||||
exit 65 # Bad arguments
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
package_name="$i"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
package_name="$(basename "$PWD")"
|
|
||||||
package_name_basename="$package_name"
|
|
||||||
|
|
||||||
read_command_line "$@"
|
|
||||||
|
|
||||||
target="${GOPATH%%:*}/src/$package_name"
|
|
||||||
|
|
||||||
mkdir -p "$(dirname "$target")"
|
|
||||||
ln -sv "$PWD" "$target"
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
echo
|
|
||||||
display_message "gvm gos (installed)"
|
|
||||||
echo
|
|
||||||
if [[ -d $GVM_ROOT/gos ]]; then
|
|
||||||
if [[ "$gvm_go_name" != "" ]]; then
|
|
||||||
$LS_PATH -1 "$GVM_ROOT/gos" | sed 's/^/ /g' | sed 's/^ '$gvm_go_name\$'/=> '$gvm_go_name'/g'
|
|
||||||
else
|
|
||||||
$LS_PATH -1 "$GVM_ROOT/gos" | sed 's/^/ /g'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
function show_usage() {
|
|
||||||
echo "Usage: gvm listall [options]"
|
|
||||||
echo " -a, --all List all tags."
|
|
||||||
echo " -h, --help Display this message."
|
|
||||||
}
|
|
||||||
|
|
||||||
function read_command_line() {
|
|
||||||
tag_filter="release"
|
|
||||||
for i in "$@"; do
|
|
||||||
case $i in
|
|
||||||
-a|--all)
|
|
||||||
tag_filter=""
|
|
||||||
;;
|
|
||||||
-h|--help*)
|
|
||||||
show_usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Invalid option $i"
|
|
||||||
show_usage
|
|
||||||
exit 65 # Bad arguments
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
read_command_line "$@"
|
|
||||||
|
|
||||||
echo
|
|
||||||
display_message "gvm gos (available)"
|
|
||||||
echo
|
|
||||||
versions=$(curl -s https://go.googlecode.com/hg/.hgtags | awk '{ print $2 }' | $SORT_PATH)
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
display_fatal "Failed to get version list from Google"
|
|
||||||
fi
|
|
||||||
for version in $versions; do
|
|
||||||
if [[ "$tag_filter" == "release" ]]; then
|
|
||||||
if [[ "${version:0:7}" == "release" ]]; then
|
|
||||||
echo " $version"
|
|
||||||
elif [[ "${version:0:3}" == "go1" ]]; then
|
|
||||||
echo " $version"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo " $version"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
function show_usage() {
|
|
||||||
echo "Usage: gvm pkgenv [packageset-name]"
|
|
||||||
echo
|
|
||||||
echo " -h, --help Display this message."
|
|
||||||
echo " -o, --output Write content to stdout"
|
|
||||||
echo
|
|
||||||
echo "The [packageset-name] is optional."
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in "$@"; do
|
|
||||||
case $i in
|
|
||||||
-h|--help*)
|
|
||||||
show_usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
-o|--output*)
|
|
||||||
output=true
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
gvm_env="$i"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$gvm_go_name" ]; then
|
|
||||||
display_fatal "current go version not managed by gvm"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -z "$gvm_env" ]; then
|
|
||||||
gvm_env="@$gvm_env"
|
|
||||||
fi
|
|
||||||
|
|
||||||
env_file=$GVM_ROOT/environments/$gvm_go_name$gvm_env
|
|
||||||
|
|
||||||
if [ $output ]; then
|
|
||||||
cat "$env_file"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
${EDITOR:-vi} "$env_file"
|
|
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
[[ $gvm_go_name != "" ]] ||
|
|
||||||
display_fatal "No Go version selected"
|
|
||||||
[[ -d $GVM_ROOT/gos/$gvm_go_name ]] ||
|
|
||||||
display_fatal "Invalid or corrupt Go version"
|
|
||||||
[[ -d $GVM_ROOT/pkgsets/$gvm_go_name ]] ||
|
|
||||||
display_fatal "Missing package set folder for this Go version"
|
|
||||||
|
|
||||||
command=$1
|
|
||||||
if [[ -f $GVM_ROOT/scripts/pkgset-$command ]]; then
|
|
||||||
shift
|
|
||||||
"$GVM_ROOT/scripts/pkgset-$command" "$@"
|
|
||||||
elif [[ -n $command ]]; then
|
|
||||||
display_fatal "Unrecognized command line argument: '$command'"
|
|
||||||
else
|
|
||||||
echo "= gvm pkgset
|
|
||||||
|
|
||||||
* http://github.com/moovweb/gvm
|
|
||||||
|
|
||||||
== DESCRIPTION:
|
|
||||||
|
|
||||||
GVM pkgset is used to manage various Go packages
|
|
||||||
|
|
||||||
== Usage
|
|
||||||
|
|
||||||
gvm pkgset Command
|
|
||||||
|
|
||||||
== Command
|
|
||||||
|
|
||||||
create - create a new package set
|
|
||||||
delete - delete a package set
|
|
||||||
use - select where gb and goinstall target and link
|
|
||||||
empty - remove all code and compiled binaries from package set
|
|
||||||
list - list installed go packages"
|
|
||||||
fi
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
[[ $1 != "" ]] ||
|
|
||||||
display_fatal "Please specifiy the name"
|
|
||||||
|
|
||||||
target_top=$GVM_ROOT
|
|
||||||
target_set_name=$1
|
|
||||||
target_set_name_str=$1
|
|
||||||
add_gopath="$GVM_ROOT/pkgsets/$gvm_go_name/$1"
|
|
||||||
add_path="$GVM_ROOT/pkgsets/$gvm_go_name/$1/bin"
|
|
||||||
|
|
||||||
if [[ $1 == "--local" ]]; then
|
|
||||||
LOCAL_TOP=$(find_local_pkgset)
|
|
||||||
if [[ ! -d LOCAL_TOP ]]; then
|
|
||||||
LOCAL_TOP=$PWD
|
|
||||||
fi
|
|
||||||
target_top=$LOCAL_TOP/.gvm_local
|
|
||||||
target_set_name="local"
|
|
||||||
target_set_name_str="__local__"
|
|
||||||
add_gopath="$target_top/pkgsets/$gvm_go_name/$target_set_name"
|
|
||||||
add_gopath="$LOCAL_TOP:$add_gopath"
|
|
||||||
add_path="$target_top/pkgsets/$gvm_go_name/$target_set_name/bin"
|
|
||||||
add_path="$LOCAL_TOP/bin:$add_path"
|
|
||||||
fi
|
|
||||||
|
|
||||||
[[ ! -f "$target_top/environments/$gvm_go_name@$target_set_name" ]] ||
|
|
||||||
display_fatal "Packageset already exists!"
|
|
||||||
|
|
||||||
mkdir -p "$target_top/environments" ||
|
|
||||||
display_fatal "Could not create environments folder"
|
|
||||||
mkdir -p "$target_top/pkgsets/$gvm_go_name/$target_set_name" ||
|
|
||||||
display_fatal "Could not create packageset folder"
|
|
||||||
cp "$GVM_ROOT/environments/$gvm_go_name" "$target_top/environments/$gvm_go_name@$target_set_name" ||
|
|
||||||
display_fatal "Could copy environment"
|
|
||||||
echo "export gvm_pkgset_name=\"$target_set_name_str\"" >> "$target_top/environments/$gvm_go_name@$target_set_name" ||
|
|
||||||
display_fatal "Could not extend environment"
|
|
||||||
echo "export GOPATH; GOPATH=\"$add_gopath:\$GOPATH\"" >> "$target_top/environments/$gvm_go_name@$target_set_name" ||
|
|
||||||
display_fatal "Could not extend environment"
|
|
||||||
echo "export PATH; PATH=\"$add_path:\$PATH\"" >> "$target_top/environments/$gvm_go_name@$target_set_name" ||
|
|
||||||
display_fatal "Could not extend environment"
|
|
||||||
|
|
||||||
if [ "${target_set_name}" != "global" ]; then
|
|
||||||
echo "# Package Set-Specific Overrides" >> "${GVM_ROOT}/environments/${gvm_go_name}@${target_set_name}"
|
|
||||||
echo "export GVM_OVERLAY_PREFIX; GVM_OVERLAY_PREFIX=\"\${GVM_ROOT}/pkgsets/${gvm_go_name}/${target_set_name}/overlay\"" >> "${GVM_ROOT}/environments/${gvm_go_name}@${target_set_name}"
|
|
||||||
mkdir -p "${GVM_ROOT}/pkgsets/${gvm_go_name}/${target_set_name}/overlay/"{bin,lib/pkgconfig}
|
|
||||||
echo "export PATH; PATH=\"${GVM_ROOT}/pkgsets/${gvm_go_name}/${target_set_name}/bin:\${GVM_OVERLAY_PREFIX}/bin:\${PATH}\"" >> "$GVM_ROOT/environments/${gvm_go_name}@${target_set_name}" ||
|
|
||||||
display_fatal "Could not extend environment"
|
|
||||||
echo "export LD_LIBRARY_PATH; LD_LIBRARY_PATH=\"\${GVM_OVERLAY_PREFIX}/lib:\${LD_LIBRARY_PATH}\"" >> "${GVM_ROOT}/environments/${gvm_go_name}@${target_set_name}" ||
|
|
||||||
display_fatal "Could not extend environment"
|
|
||||||
echo "export DYLD_LIBRARY_PATH; DYLD_LIBRARY_PATH=\"\${GVM_OVERLAY_PREFIX}/lib:\${DYLD_LIBRARY_PATH}\"" >> "${GVM_ROOT}/environments/${gvm_go_name}@${target_set_name}" ||
|
|
||||||
display_fatal "Could not extend environment"
|
|
||||||
echo "export PKG_CONFIG_PATH; PKG_CONFIG_PATH=\"\${GVM_OVERLAY_PREFIX}/lib/pkgconfig:\${PKG_CONFIG_PATH}\"" >> "${GVM_ROOT}/environments/${gvm_go_name}@${target_set_name}" ||
|
|
||||||
display_fatal "Could not extend environment"
|
|
||||||
fi
|
|
@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
[[ $gvm_go_name != "" ]] ||
|
|
||||||
display_fatal "No Go version selected"
|
|
||||||
|
|
||||||
[[ $1 != "" ]] ||
|
|
||||||
display_fatal "Please specifiy the name"
|
|
||||||
|
|
||||||
target_top=$GVM_ROOT
|
|
||||||
target_set_name=$1
|
|
||||||
if [[ $1 == "--local" ]]; then
|
|
||||||
target_top=$(find_local_pkgset)/.gvm_local
|
|
||||||
target_set_name="local"
|
|
||||||
fi
|
|
||||||
|
|
||||||
[[ -d $target_top/pkgsets/$gvm_go_name/$target_set_name ]] ||
|
|
||||||
display_fatal "Packageset doesn't exist!"
|
|
||||||
|
|
||||||
rm -rf "$target_top/pkgsets/$gvm_go_name/$target_set_name" ||
|
|
||||||
display_fatal "Could not delete package set"
|
|
||||||
|
|
||||||
rm -rf "$target_top/environments/$gvm_go_name@$target_set_name" ||
|
|
||||||
display_fatal "Could not delete package set"
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
[[ $gvm_pkgset_name != "" ]] ||
|
|
||||||
display_fatal "No Package set selected"
|
|
||||||
rm -rf "$GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name/"* ||
|
|
||||||
display_fatal "Could not delete package set files"
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
echo
|
|
||||||
display_message "gvm go package sets ($gvm_go_name)"
|
|
||||||
echo
|
|
||||||
|
|
||||||
if [[ -d $GVM_ROOT/pkgsets/$gvm_go_name ]]; then
|
|
||||||
pkgset_local=$(find_local_pkgset)
|
|
||||||
if [[ -d $pkgset_local ]]; then
|
|
||||||
if [[ "$gvm_pkgset_name" == "__local__" ]]; then
|
|
||||||
echo "=>L $pkgset_local"
|
|
||||||
else
|
|
||||||
echo " L $pkgset_local"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
for cur_dir in $GVM_ROOT/pkgsets/$gvm_go_name/*; do
|
|
||||||
[[ "$cur_dir" == "$GVM_ROOT/pkgsets/$gvm_go_name/*" ]] && exit
|
|
||||||
pkgset=$(basename "$cur_dir")
|
|
||||||
if [[ "$gvm_pkgset_name" == "$pkgset" ]]; then
|
|
||||||
echo "=> $pkgset"
|
|
||||||
else
|
|
||||||
echo " $pkgset"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions/tools"
|
|
||||||
echo "$1" | sed -n -e '/_.*_/ p' | $GREP_PATH "_" &> /dev/null
|
|
||||||
if [ "$?" == "0" ]; then
|
|
||||||
version=$(echo $1 | sed 's/_\(.*\)_/\1/')
|
|
||||||
if [[ ! -f $GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name/pkg.gvm/{{package_name}}/$version/bin/{{binary_name}} ]]; then
|
|
||||||
echo "GVM: Invalid version"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
"$GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name/pkg.gvm/{{package_name}}/$version/bin/{{binary_name}}" "$@"
|
|
||||||
else
|
|
||||||
"$GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name/pkg.gvm/{{package_name}}/current/bin/{{binary_name}}" "$@"
|
|
||||||
fi
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
[[ "$1" == "" ]] &&
|
|
||||||
display_fatal "Please specifiy the version"
|
|
||||||
|
|
||||||
fuzzy_match=$($LS_PATH "$GVM_ROOT/gos" | $SORT_PATH | $GREP_PATH "$1" | $HEAD_PATH -n 1 | $GREP_PATH "$1") ||
|
|
||||||
display_fatal "Invalid version $1"
|
|
||||||
|
|
||||||
if [[ -d $GVM_ROOT/gos/$fuzzy_match ]]; then
|
|
||||||
rm -rf "$GVM_ROOT/pkgsets/$fuzzy_match" &> /dev/null ||
|
|
||||||
display_fatal "Couldn't remove pkgsets"
|
|
||||||
rm -f "$GVM_ROOT/environments/$fuzzy_match" &> /dev/null ||
|
|
||||||
display_fatal "Couldn't remove environment files"
|
|
||||||
rm -f "$GVM_ROOT/environments/$fuzzy_match@"* &> /dev/null ||
|
|
||||||
display_fatal "Couldn't remove pkgset environment files"
|
|
||||||
rm -rf "$GVM_ROOT/gos/$fuzzy_match" &> /dev/null ||
|
|
||||||
display_fatal "Couldn't remove Go folder"
|
|
||||||
display_message "Uninstalled version $fuzzy_match"
|
|
||||||
else
|
|
||||||
display_fatal "Invalid version"
|
|
||||||
fi
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
. "$GVM_ROOT/scripts/functions"
|
|
||||||
|
|
||||||
cd "$GVM_ROOT/archive/go" &> /dev/null ||
|
|
||||||
display_fatal "Failed to find local Go source"
|
|
||||||
|
|
||||||
hg pull || display_fatal "Failed to update"
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
## Cleanup test objects
|
|
||||||
gvm uninstall tip > /dev/null 2>&1
|
|
||||||
gvm uninstall go1.1.1 > /dev/null 2>&1
|
|
||||||
gvm uninstall go1.2.2 > /dev/null 2>&1
|
|
||||||
#######################
|
|
||||||
|
|
||||||
gvm install tip #status=0
|
|
||||||
gvm list #status=0; match=/tip/
|
|
||||||
gvm install go1.1.1 #status=0
|
|
||||||
gvm list #status=0; match=/go1.1.1/
|
|
||||||
gvm install go1.2.2 #status=0
|
|
||||||
gvm list #status=0; match=/go1.2.2/
|
|
@ -1,19 +0,0 @@
|
|||||||
source $GVM_ROOT/scripts/gvm
|
|
||||||
|
|
||||||
## Cleanup test objects
|
|
||||||
gvm alias delete foo
|
|
||||||
gvm alias delete bar
|
|
||||||
#######################
|
|
||||||
|
|
||||||
gvm alias # status=0
|
|
||||||
gvm alias create foo go1.2.2 # status=0
|
|
||||||
gvm alias create bar go1.1.1 # status=0
|
|
||||||
gvm alias list # status=0; match=/gvm go aliases/; match=/foo \(go1\.2\.2\)/; match=/bar \(go1\.1\.1\)/
|
|
||||||
gvm use foo # status=0
|
|
||||||
go version # status=0; match=/go1\.2\.2/
|
|
||||||
gvm use bar # status=0
|
|
||||||
go version # status=0; match=/go1\.1\.1/
|
|
||||||
gvm alias delete foo
|
|
||||||
gvm alias list # status=0; match=/gvm go aliases/; match!=/foo \(go1\.2\.2\)/; match=/bar \(go1\.1\.1\)/
|
|
||||||
gvm alias delete bar
|
|
||||||
gvm alias list # status=0; match=/gvm go aliases/; match!=/foo \(go1\.2\.2\)/; match!=/bar \(go1\.1\.1\)/
|
|
@ -1 +0,0 @@
|
|||||||
gvm # status=0; match=/GVM is the Go Version Manager/
|
|
@ -1 +0,0 @@
|
|||||||
gvm list # status=0
|
|
@ -1 +0,0 @@
|
|||||||
gvm listall #status=0
|
|
@ -1,5 +0,0 @@
|
|||||||
source $GVM_ROOT/scripts/gvm
|
|
||||||
gvm use go1.2.2 # status=0
|
|
||||||
go version # status=0; match=/go1\.2\.2/
|
|
||||||
gvm use go1.1.1 # status=0
|
|
||||||
go version # status=0; match=/go1\.1\.1/
|
|
@ -1 +0,0 @@
|
|||||||
gvm version # status=0
|
|
@ -1 +0,0 @@
|
|||||||
gvm install go1.2.2 --binary #status=0
|
|
@ -1 +0,0 @@
|
|||||||
gvm install go1.2.2 #status=0
|
|
@ -1 +0,0 @@
|
|||||||
gvm install go1.2 --prefer-binary #status=0
|
|
@ -1,3 +0,0 @@
|
|||||||
source $GVM_ROOT/scripts/gvm
|
|
||||||
yes n | gvm implode # status=0; match=/Action cancelled/
|
|
||||||
yes | gvm implode # status=0; match=/GVM successfully removed/
|
|
Loading…
Reference in New Issue