summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2007-11-06 02:03:25 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2007-11-06 02:03:25 +0100
commitc10a9463210f289b155a342019b21b4a93050878 (patch)
tree7c234e5d234446daa3197e6efd08ddddefb8bd66 /src
parent78c5ea3ffb42c884ba9a8e80ff311abe8094dbf9 (diff)
downloadndim-git-utils-c10a9463210f289b155a342019b21b4a93050878.tar.gz
ndim-git-utils-c10a9463210f289b155a342019b21b4a93050878.tar.xz
ndim-git-utils-c10a9463210f289b155a342019b21b4a93050878.zip
Move git-amb into its own git-amb/ dir
Diffstat (limited to 'src')
-rw-r--r--src/Makefile-files13
-rwxr-xr-xsrc/git-amb216
-rw-r--r--src/git-amb.1.in116
3 files changed, 0 insertions, 345 deletions
diff --git a/src/Makefile-files b/src/Makefile-files
deleted file mode 100644
index 2fb281f..0000000
--- a/src/Makefile-files
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- makefile -*-
-bin_SCRIPTS += src/git-amb
-EXTRA_DIST += src/git-amb
-UPLOAD_FILES += src/git-amb
-
-man_MANS += src/git-amb.1
-EXTRA_DIST += src/git-amb.1.in
-
-if HAVE_NDIM_MAN2TXT
-dist_doc_DATA += src/git-amb.txt
-CLEANFILES += src/git-amb.txt
-UPLOAD_FILES += src/git-amb.txt
-endif
diff --git a/src/git-amb b/src/git-amb
deleted file mode 100755
index 433667a..0000000
--- a/src/git-amb
+++ /dev/null
@@ -1,216 +0,0 @@
-#!/bin/sh
-# git-amb - git automake build utility
-# Copyright (C) 2007 Hans Ulrich Niedermann <hun@n-dimensional.de>
-#
-# Build automake based git checkout in branch specific build and install trees.
-# That makes it easy to compare build results from different branches.
-#
-# 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 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, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-# Known to work and tested with
-# - git 1.5.3.4
-
-USAGE="<command> [params...]"
-
-LONG_USAGE="\
-Build automake based git checkout in branch specific build and install trees.
-For more details, see the git-amb(1) man page."
-. git-sh-setup
-
-require_work_tree
-
-self="$(basename "$0")"
-
-amb_detect_configure() {
- for configure_ac in \
- "${top_srcdir}/configure.ac" \
- "${top_srcdir}/configure.in"
- do
- if test -s "${configure_ac}"; then
- break
- fi
- configure_ac=""
- done
- test -z "${configure_ac}" && die "configure.{ac,in} not found"
- configure="$top_srcdir/configure"
-}
-
-cond_cat_path() {
- path="."
- for dir
- do
- if echo "$dir" | grep '^/' > /dev/null; then
- path="$dir"
- else
- path="$path/$dir"
- fi
- done
- echo "$path"
-}
-
-amb_init() {
- if test "x$1" = "x"; then
- git_branch="$(git branch | sed -n 's/^* //p')"
- elif git branch | sed 's/^[ *] //' | grep "$1" > /dev/null; then
- git_branch="${1}"
- else
- die "Invalid branch \"$1\" given."
- fi
- test "x.git" = "x$(basename "$GIT_DIR")" || die "GIT_DIR=$GIT_DIR is not foo/.git"
- top_srcdir="$(cd_to_toplevel && pwd)"
-
- tmp="$(git-config amb.builddir)" || tmp="$GIT_DIR/amb/build"
- top_builddir="$(cond_cat_path "${top_srcdir}" "$tmp" "${git_branch}")"
-
- tmp="$(git-config amb.installdir)" || tmp="$GIT_DIR/amb/install"
- top_installdir="$(cond_cat_path "${top_srcdir}" "$tmp" "$git_branch")"
-
- amb_detect_configure
-}
-
-amb_autoreconf() {
- echo "$self: Running autoreconf for branch ${git_branch}"
- autoreconf -vis "$@" "$top_srcdir"
-}
-
-amb_cond_autoreconf() {
- if test ! -s "$configure" || test "$configure_ac" -nt "$configure"; then
- amb_autoreconf
- fi
-}
-
-amb_configure() {
- amb_cond_autoreconf
- echo "$self: Running configure for branch ${git_branch}"
- mkdir -p "$top_builddir"
- cd "$top_builddir"
- "$top_srcdir/configure" --prefix="$top_installdir" --enable-maintainer-mode "$@"
-}
-
-amb_cond_configure() {
- test -s "$top_builddir/Makefile" || amb_configure
-}
-
-amb_make() {
- amb_cond_configure
- echo "$self: Running make for branch ${git_branch}"
- cd "$top_builddir"
- make "$@"
-}
-
-amb_printvars() {
- echo "$self: Settings for branch ${git_branch}"
- echo "$self: source dir $top_srcdir"
- echo "$self: build dir $top_builddir"
- echo "$self: install dir $top_installdir"
-}
-
-amb_purge() {
- echo "$self: Purging branch ${git_branch} build and install"
- echo "$self: Purging $top_builddir..."
- rm -rf "$top_builddir"
- echo "$self: Purging $top_installdir..."
- rm -rf "$top_installdir"
- echo "$self: Finished."
-}
-
-amb_uninstall() {
- echo "$self: Uninstalling branch ${git_branch}"
- echo "$self: Purging $top_builddir..."
- rm -rf "$top_installdir"
- echo "$self: Finished."
-}
-
-amb_shell() {
- if test -d "$top_builddir"; then :; else
- die "Build directory does not exist yet: ${top_builddir}"
- fi
- echo "$self: Starting shell for branch ${git_branch}"
- export git_amb_srcdir="top_srcdir"
- export git_amb_builddir="top_builddir"
- export git_amb_installdir="top_installdir"
- amb_printvars
- export PS1="\
-[Ctrl-D or 'exit' to quit $self shell for branch ${git_branch}]\n\
-[<$self> \w]\n\
-[<$(echo "$self" | sed 's/./-/g')> \u@\h \W]\$ \
-"
- cd "$top_builddir" && ${SHELL} "$@"
-}
-
-# Abort on error
-set -e
-
-# The great command case
-command="$1"
-if shift; then
- case "$command" in
- builddir)
- amb_init "$@"
- echo "$top_builddir"
- ;;
- installdir)
- amb_init "$@"
- echo "$top_installdir"
- ;;
- autoreconf)
- amb_init
- amb_autoreconf "$@"
- amb_printvars
- ;;
- configure)
- amb_init
- amb_configure "$@"
- amb_printvars
- ;;
- make)
- amb_init
- amb_make "$@"
- amb_printvars
- ;;
- clean)
- amb_init "$@"
- amb_make clean
- amb_printvars
- ;;
- distclean)
- amb_init "$@"
- amb_make distclean
- amb_printvars
- ;;
- purge)
- amb_init "$@"
- amb_purge
- ;;
- uninstall)
- amb_init "$@"
- amb_uninstall
- ;;
- sh)
- amb_init
- amb_shell "$@"
- amb_printvars
- ;;
- *)
- die "Invalid command line parameter: \"$command\""
- ;;
- esac
-else
- amb_init
- amb_printvars
-fi
-
-# End of file.
diff --git a/src/git-amb.1.in b/src/git-amb.1.in
deleted file mode 100644
index 1428c19..0000000
--- a/src/git-amb.1.in
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH GIT-AMB 1 "@PACKAGE_TARNAME@ @PACKAGE_VERSION@" "2007\-11\-02" "@PACKAGE_NAME@ @PACKAGE_VERSION@"
-.SH NAME
-git-amb \- git automake build utitilty
-.SH SYNOPSIS
-.B "git\-amb"
-.RB "command"
-.RI [ params ]
-.SH DESCRIPTION
-Build automake based git checkout in branch specific build and install trees.
-That makes it easy to compare build results from different branches.
-.SH "COMMAND OVERVIEW"
-.TP
-.B "git\-amb autoreconf [params...]"
-Run autoreconf on ${top_srcdir}.
-Optional params will be passed on to autoreconf.
-.TP
-.B "git\-amb configure [params...]"
-Run configure in ${top_builddir}.
-Optional params will be passed on to configure.
-.TP
-.B "git\-amb make [params...]"
-Run make in ${top_builddir}.
-Optional params will be passed on to make.
-.TP
-.B "git\-amb sh [params...]"
-Start shell in ${top_builddir}.
-Optional params will be passed on to the shell.
-.TP
-.B "git\-amb clean [branch]"
-Run 'make clean' in ${top_builddir}.
-The optional branch is the branch to clean up.
-.TP
-.B "git\-amb distclean [branch]"
-Run 'make distclean' in ${top_builddir}.
-The optional branch is the branch to clean up.
-.TP
-.B "git\-amb purge [branch]"
-Remove both build and install tree.
-The optional branch is the branch to purge.
-.TP
-.B "git\-amb uninstall [branch]"
-Remove ${installdir}.
-The optional branch is the branch to uninstall.
-.TP
-.B "git\-amb builddir [branch]"
-Print ${builddir}.
-The optional branch is the branch to print the builddir for.
-.TP
-.B "git\-amb installdir [branch]"
-Print ${installdir}.
-The optional branch is the branch to print the installdir for.
-.SH CONFIGURATION
-Use
-.B git\-config
-to get and set the config values.
-If a config value is not set,
-.B git\-amb
-uses a built\-in default, which is not documented. Always run the
-.B git\-amb
-commands
-.I builddir
-and
-.I installdir
-to determine the respective directory.
-.SS amb.builddir
-Location of build tree, relative to top checkout (source) dir, or absolute.
-The branch name will be appended to it.
-.SS amb.installdir
-Location of installation, relative to top checkout (source) dir, or absolute.
-The branch name will be appended to it.
-.SH EXAMPLES
-.nf
- $ git config amb.builddir _builds
- $ git config amb.installdir _installs
-.fi
-.PP
-.nf
- $ git checkout master
- $ git\-amb make install
- $ git checkout foo/bar
- $ git\-amb make dist install
- $ diff \-ru $(git\-amb installdir) $(git\-amb installdir master)
- $ git\-amb sh
- <\-\-\-\-> [...] $ ls *.tar.gz
-.fi
-.SH "BUGS"
-.TP
-.B "Access to build results"
-Could be better.
-.TP
-.B "User Interface"
-Should be more consistent, smaller.
-.TP
-.B "Concurrent Usage"
-Exhibits problems, e.g. starting
-.B "git\-amb sh"
-and then running
-.B "git checkout other\-branch"
-from another terminal.
-.SH "NON-BUGS"
-.TP
-.B "autogen.sh scripts"
-It is a feature that
-.B git\-amb
-does not support
-.I "autgen.sh"
- scripts.
-Custom autogen.sh script are almost always broken in multiple aspects:
-They duplicate the functionality of autoreconf(1), they make two
-independent steps into one (running both automake &
-Co. and ./configure), they do not allow srcdir != builddir builds.
-.SH AUTHORS
-.B "git\-amb"
-was written by Hans Ulrich Niedermann.
-.SH "SEE ALSO"
-autoreconf(1), git\-branch(1), git\-checkout(1), git\-config(1).