summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am27
-rw-r--r--configure.ac6
-rw-r--r--doc/Makefile-files2
-rw-r--r--doc/ndim-git-cheatsheet.txt44
-rw-r--r--m4/ndim_detect_man2txt.m423
-rw-r--r--src/Makefile-files5
-rw-r--r--src/git-amb.1.in14
-rw-r--r--src/git-amb.txt100
8 files changed, 219 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index f4d5f96..cc994d0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,30 @@
+BUILT_SOURCES =
+EXTRA_DIST =
bin_SCRIPTS =
man_MANS =
-EXTRA_DIST =
+UPDATE_SOURCE_FILES =
+
+ACLOCAL_AMFLAGS = -I m4 --install
+include doc/Makefile-files
include src/Makefile-files
+
+all-local: update-sources
+
+update-sources: $(UPDATE_SOURCE_FILES)
+ @echo "x$(top_srcdir)" "x$(top_builddir)"; \
+ if test "x$(top_srcdir)" != "x$(top_builddir)"; then \
+ for file in $(UPDATE_SOURCE_FILES); do \
+ echo cp -f "$${file}" "$(top_srcdir)/$${file}"; \
+ cp -f "$${file}" "$(top_srcdir)/$${file}"; \
+ done; \
+ else \
+ echo "srcdir == builddir, no special updates needed."; \
+ fi
+
+if HAVE_NDIM_MAN2TXT
+.1.txt:
+ set -x; $(NDIM_MAN2TXT) "$<" > "$@.new"
+ test -s "$@.new"
+ mv -f "$@.new" "$@"
+endif
diff --git a/configure.ac b/configure.ac
index 849ec48..3dd9a1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,12 +1,16 @@
AC_PREREQ(2.61)
AC_INIT([ndims git utilities],
- [1.1],
+ [1.1.1],
[hun@n-dimensional.de],
[ndim-git-utils])
AC_CONFIG_SRCDIR([src/git-amb.1.in])
AC_CONFIG_AUX_DIR([auto-aux])
+AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall foreign 1.10 dist-bzip2])
+m4_pattern_forbid([NDIM_DETECT_MAN2TXT])dnl
+NDIM_DETECT_MAN2TXT()dnl
+
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/git-amb.1])
AC_OUTPUT
diff --git a/doc/Makefile-files b/doc/Makefile-files
new file mode 100644
index 0000000..ae28305
--- /dev/null
+++ b/doc/Makefile-files
@@ -0,0 +1,2 @@
+# -*- Makefile -*-
+EXTRA_DIST += doc/ndim-git-cheatsheet.txt
diff --git a/doc/ndim-git-cheatsheet.txt b/doc/ndim-git-cheatsheet.txt
new file mode 100644
index 0000000..e280afe
--- /dev/null
+++ b/doc/ndim-git-cheatsheet.txt
@@ -0,0 +1,44 @@
+Set up colorful output:
+ $ git config --global color.diff auto
+ $ git config --global color.status=auto
+ $ git config --global color.branch=auto
+
+How *NOT* to update from upstream (unless you want merge commits):
+ $ git pull
+
+How to update from upstream:
+ $ git fetch
+ $ git rebase origin
+
+How do local master and upstream differ?
+ $ git diff --color origin
+
+How to create patches for submission to upstream:
+ $ git format-patch origin
+
+What happened in the last few commits:
+ $ git log -p --color
+
+What happened in the last N commits:
+ $ git log -p --color -N
+
+What happened in the commit before the last:
+ $ git diff --color HEAD^^ HEAD^
+
+
+Publishing copy of own repo (for upstream to merge from):
+ @local $ git clone --bare my-dir moo
+ @local $ rsync -avz moo user@public:dir/moo.git
+ @public $ cd moo
+ @public $ GIT_DIR=. git-update-server-info
+ @public $ vi description
+ @local $ vi my-dir/.git/config
+ # Add this
+ [remote "public"]
+ url = ssh://user@public/~/moo.git
+ push = ref/heads/*:ref/heads/*
+ @local $ git push public
+
+In cases when you have removed patches from a branch (breaks people's merges):
+ @local $ git push -f public
+
diff --git a/m4/ndim_detect_man2txt.m4 b/m4/ndim_detect_man2txt.m4
new file mode 100644
index 0000000..ad08d74
--- /dev/null
+++ b/m4/ndim_detect_man2txt.m4
@@ -0,0 +1,23 @@
+# serial 1.1
+m4_pattern_forbid([NDIM_DETECT_MAN2TXT])dnl
+AC_DEFUN([NDIM_DETECT_MAN2TXT], [dnl
+AC_ARG_VAR([MAN])
+AC_PATH_PROG([MAN], [man], [false])
+AC_ARG_VAR([COL])
+AC_PATH_PROG([COL], [col], [false])
+AM_CONDITIONAL([HAVE_NDIM_MAN2TXT],
+ [test "x$MAN" != "xfalse" &&
+ test "x$COL" != "xfalse" &&
+ test "x$(echo "ABXY" | $COL -b)" = "xBY"])
+AC_MSG_CHECKING([man and col -b work correctly])
+if test "x$HAVE_NDIM_MAN2TXT_FALSE" = "x#"; then
+ AC_MSG_RESULT([yes])
+ AC_SUBST([NDIM_MAN2TXT], ['m2t(){ $(MAN) "$$(dirname "$$][1")/$$(basename "$$][1")"|$(COL) -b; }; m2t'])dnl
+else
+ AC_MSG_RESULT([no $(echo "ABXY" | $COL -b)])
+fi
+])dnl
+dnl
+dnl Local Variables:
+dnl mode: autoconf
+dnl End:
diff --git a/src/Makefile-files b/src/Makefile-files
index 886d248..4281ec9 100644
--- a/src/Makefile-files
+++ b/src/Makefile-files
@@ -4,3 +4,8 @@ EXTRA_DIST += src/git-amb
man_MANS += src/git-amb.1
EXTRA_DIST += src/git-amb.1.in
+
+EXTRA_DIST += src/git-amb.txt
+if HAVE_NDIM_MAN2TXT
+UPDATE_SOURCE_FILES += src/git-amb.txt
+endif
diff --git a/src/git-amb.1.in b/src/git-amb.1.in
index 0461368..81065b5 100644
--- a/src/git-amb.1.in
+++ b/src/git-amb.1.in
@@ -75,6 +75,20 @@ The branch name will be appended to it.
$ git-amb sh
<----> [...] $ ls *.tar.gz
.fi
+.SH "TODO"
+.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 AUTHORS
.B "git\-amb"
was written by Hans Ulrich Niedermann.
diff --git a/src/git-amb.txt b/src/git-amb.txt
new file mode 100644
index 0000000..cbd01dc
--- /dev/null
+++ b/src/git-amb.txt
@@ -0,0 +1,100 @@
+GIT-AMB(1) ndims git utilities 1.1.1 GIT-AMB(1)
+
+
+
+NAME
+ git-amb - git automake build utitilty
+
+SYNOPSIS
+ git-amb command [params]
+
+DESCRIPTION
+ Build automake based git checkout in branch specific build and install
+ trees. That makes it easy to compare build results from different
+ branches.
+
+COMMAND OVERVIEW
+ git-amb autoreconf [params...]
+ Run autoreconf on ${top_srcdir}. Optional params will be passed
+ on to autoreconf.
+
+ git-amb configure [params...]
+ Run configure in ${top_builddir}. Optional params will be
+ passed on to configure.
+
+ git-amb make [params...]
+ Run make in ${top_builddir}. Optional params will be passed on
+ to make.
+
+ git-amb sh [params...]
+ Start shell in ${top_builddir}. Optional params will be passed
+ on to the shell.
+
+ git-amb clean [branch]
+ Run ’make clean’ in ${top_builddir}. The optional branch is the
+ branch to clean up.
+
+ git-amb distclean [branch]
+ Run ’make distclean’ in ${top_builddir}. The optional branch is
+ the branch to clean up.
+
+ git-amb purge [branch]
+ Remove both build and install tree. The optional branch is the
+ branch to purge.
+
+ git-amb uninstall [branch]
+ Remove ${installdir}. The optional branch is the branch to
+ uninstall.
+
+ git-amb builddir [branch]
+ Print ${builddir}. The optional branch is the branch to print
+ the builddir for.
+
+ git-amb installdir [branch]
+ Print ${installdir}. The optional branch is the branch to print
+ the installdir for.
+
+CONFIGURATION
+ Get the value with git config amb.foo or set it with git config amb.foo
+ value
+
+ amb.builddir
+ Location of build tree, relative to top checkout (source) dir, or abso-
+ lute. The branch name will be appended to it.
+
+ amb.installdir
+ Location of installation, relative to top checkout (source) dir, or
+ absolute. The branch name will be appended to it.
+
+EXAMPLES
+ $ git config amb.builddir _builds
+ $ git config amb.installdir _installs
+
+ $ 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
+
+TODO
+ Access to build results
+ Could be better.
+
+ User Interface
+ Should be more consistent, smaller.
+
+ Concurrent Usage
+ Exhibits problems, e.g. starting git-amb sh and then running git
+ checkout other-branch from another terminal.
+
+AUTHORS
+ git-amb was written by Hans Ulrich Niedermann.
+
+SEE ALSO
+ git-branch(1), git-checkout(1), git-config(1).
+
+
+
+2007-11-02 ndim-git-utils 1.1.1 GIT-AMB(1)