[git] CMU Common Lisp branch master updated. snapshot-2013-09-2-g7e2a98e
Raymond Toy
rtoy at common-lisp.net
Thu Sep 12 02:52:06 UTC 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".
The branch, master has been updated
via 7e2a98eea48abc007e74490fa099da019b440ddc (commit)
from 44abdb520938a95395c7b1ba00148d65d4db6aac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7e2a98eea48abc007e74490fa099da019b440ddc
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Wed Sep 11 19:51:29 2013 -0700
Allow disabling the use of git for the file-comment.
* src/compiler/main.lisp:
* Add *FILE-COMMENT-FROM-GIT* to control whether to use git to
derive the file-comment. Default is T. Otherwise, the actual
file-comment is used.
* Update PROCESS-FILE-COMMENT to use *FILE-COMMENT-FROM-GIT*.
* bin/build-all.sh
* bin/build.sh
* bin/build-world.sh
* Add -G option to control whether file-comment's are derived from
git.
diff --git a/bin/build-all.sh b/bin/build-all.sh
index d5823af..0bf6ed5 100755
--- a/bin/build-all.sh
+++ b/bin/build-all.sh
@@ -35,12 +35,13 @@ usage ()
echo " -P On the last build, (re)generate cmucl.pot and the"
echo " translations"
echo " -R Force recompilation of C runtime"
+ echo " -G Don't use git to fill file-comment information"
}
CREATE_OPT=""
UPDATE_POT="-P"
-while getopts "PRUB:b:v:C:o:8:?" arg
+while getopts "PRUGB:b:v:C:o:8:?" arg
do
case $arg in
b) BASE="$OPTARG" ;;
@@ -53,6 +54,7 @@ do
U) UPDATE_TRANS="-U" ;;
P) UPDATE_POT="" ;;
R) RECOMPILEC="-R" ;;
+ G) GIT_FILE_COMMENT="-G" ;;
\?) usage; exit 1 ;;
esac
done
@@ -87,15 +89,15 @@ buildx86 ()
if [ -n "$OLD8" ]; then
# Build non-unicode versions
set -x
- $BINDIR/build.sh -f x87 -b ${BASE}-8bit $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} -o "$OLD8"
- $BINDIR/build.sh -f sse2 -b ${BASE}-8bit $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} -o "$OLD8"
+ $BINDIR/build.sh -f x87 -b ${BASE}-8bit $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} ${GIT_FILE_COMMENT} -o "$OLD8"
+ $BINDIR/build.sh -f sse2 -b ${BASE}-8bit $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} ${GIT_FILE_COMMENT} -o "$OLD8"
set +x
fi
# Build the unicode versions
if [ -n "$OLDLISP" ]; then
set -x
- $BINDIR/build.sh -f x87 -b ${BASE} $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} -o "$OLDLISP"
- $BINDIR/build.sh -f sse2 -b ${BASE} $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} -o "$OLDLISP"
+ $BINDIR/build.sh -f x87 -b ${BASE} $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} ${GIT_FILE_COMMENT} -o "$OLDLISP"
+ $BINDIR/build.sh -f sse2 -b ${BASE} $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} ${GIT_FILE_COMMENT} -o "$OLDLISP"
set +x
fi
}
@@ -108,13 +110,13 @@ buildsun4 ()
# Build non-unicode versions
if [ -n "$OLD8" ]; then
set -x
- $BINDIR/build.sh -b ${BASE}-8bit $bootfiles ${VERS} -C "$CREATE_OPT" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} -o "$OLD8"
+ $BINDIR/build.sh -b ${BASE}-8bit $bootfiles ${VERS} -C "$CREATE_OPT" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} ${GIT_FILE_COMMENT} -o "$OLD8"
set +x
fi
# Build the unicode version.
if [ -n "$OLDLISP" ]; then
set -x
- $BINDIR/build.sh -b ${BASE} $bootfiles ${VERS} -C "$CREATE_OPT" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} -o "$OLDLISP"
+ $BINDIR/build.sh -b ${BASE} $bootfiles ${VERS} -C "$CREATE_OPT" ${UPDATE_TRANS} ${UPDATE_POT} ${RECOMPILEC} ${GIT_FILE_COMMENT} -o "$OLDLISP"
set +x
fi
}
diff --git a/bin/build-world.sh b/bin/build-world.sh
index f354915..8a20911 100755
--- a/bin/build-world.sh
+++ b/bin/build-world.sh
@@ -26,6 +26,12 @@ if [ -n "$MAKE_POT" ]; then
SAVEPOT='(intl::dump-pot-files :output-directory "default:src/i18n/locale/")'
fi
+if [ "$GIT_FILE_COMMENT" = "no" ]; then
+ GIT_FILE_COMMENT="(setf c::*file-comment-from-git* nil)"
+else
+ GIT_FILE_COMMENT=
+fi
+
$LISP "$@" -noinit -nositeinit <<EOF
(in-package :cl-user)
@@ -56,6 +62,8 @@ $LISP "$@" -noinit -nositeinit <<EOF
(setq debug:*debug-print-level* nil)
(setq debug:*debug-print-length* nil)
+$GIT_FILE_COMMENT
+
(load "target:tools/worldcom")
#-(or no-compiler runtime) (load "target:tools/comcom")
;; Compile at least new-genesis, so that genesis doesn't take ages
@@ -64,7 +72,6 @@ $LISP "$@" -noinit -nositeinit <<EOF
$GETFMT
$SAVEPOT
-
(setq *gc-verbose* t *interactive* t)
(load "target:tools/worldbuild")
diff --git a/bin/build.sh b/bin/build.sh
index 4aa8f24..9be48e4 100755
--- a/bin/build.sh
+++ b/bin/build.sh
@@ -45,6 +45,8 @@ BINDIR=bin
TOOLDIR=$BINDIR
OLDLISPFLAGS="-noinit -nositeinit"
OLDLISP="cmulisp"
+GIT_FILE_COMMENT="yes"
+export GIT_FILE_COMMENT
SKIPUTILS=no
@@ -66,7 +68,7 @@ fi
usage ()
{
- echo "build.sh [-123obvuBCU?]"
+ echo "build.sh [-123obvuBCUG?]"
echo " -1 Skip build 1"
echo " -2 Skip build 2"
echo " -3 Skip build 3"
@@ -96,6 +98,7 @@ usage ()
echo " The flags always include -noinit -nositeinit"
echo " -R Force recompiling the C runtime. Normally, just runs make to "
echo " recompile anything that has changed."
+ echo " -G Don't use git to fill file-comment information"
exit 1
}
@@ -152,7 +155,7 @@ BUILDWORLD="$TOOLDIR/build-world.sh"
BUILD_POT="yes"
UPDATE_TRANS=
-while getopts "123PRo:b:v:uB:C:Ui:f:w:O:?" arg
+while getopts "123PRGo:b:v:uB:C:Ui:f:w:O:?" arg
do
case $arg in
1) ENABLE2="no" ;;
@@ -172,6 +175,7 @@ do
U) UPDATE_TRANS="yes";;
O) OLDLISPFLAGS="$OLDLISPFLAGS $OPTARG" ;;
R) REBUILD_LISP="yes";;
+ G) GIT_FILE_COMMENT="no";;
\?) usage
;;
esac
diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp
index cba62e9..6abe478 100644
--- a/src/compiler/main.lisp
+++ b/src/compiler/main.lisp
@@ -1094,34 +1094,41 @@
;;;
;;; Stash file comment in the file-info structure.
;;;
+
+(defvar *file-comment-from-git* t
+ "If non-Nil, use git to derive the file-comment. This info includes
+ the sha1 hash, the time and the author of the change. Otherwise,
+ just use the supplied file-comment.")
+
(defun process-file-comment (form)
(unless (and (= (length form) 2) (stringp (second form)))
(compiler-error _N"Bad FILE-COMMENT form: ~S." form))
(let ((file (first (source-info-current-file *source-info*))))
(labels
((run-git (path)
- (let ((cwd (default-directory))
- (new (make-pathname :directory (pathname-directory path))))
- (unwind-protect
- (progn
- ;; Cd to the directory containing the file so that
- ;; git can find the git repo, if available.
- (setf (default-directory) new)
- ;; Run git to get the info. Don't signal any
- ;; errors if we can't find git and discard any
- ;; error messages from git. We only use the
- ;; result if git returns a zero exit code, anyway.
- (handler-case
- (run-program "git"
- (list "log"
- "-1"
- "--pretty=format:%h %ai %an"
- (namestring path))
- :output :stream
- :error nil)
- (error ()
- nil)))
- (setf (default-directory) cwd))))
+ (when *file-comment-from-git*
+ (let ((cwd (default-directory))
+ (new (make-pathname :directory (pathname-directory path))))
+ (unwind-protect
+ (progn
+ ;; Cd to the directory containing the file so that
+ ;; git can find the git repo, if available.
+ (setf (default-directory) new)
+ ;; Run git to get the info. Don't signal any
+ ;; errors if we can't find git and discard any
+ ;; error messages from git. We only use the
+ ;; result if git returns a zero exit code, anyway.
+ (handler-case
+ (run-program "git"
+ (list "log"
+ "-1"
+ "--pretty=format:%h %ai %an"
+ (namestring path))
+ :output :stream
+ :error nil)
+ (error ()
+ nil)))
+ (setf (default-directory) cwd)))))
(generate-comment (file-info)
(let* ((name (pathname (source-info-stream file-info)))
(proc (run-git name))
-----------------------------------------------------------------------
Summary of changes:
bin/build-all.sh | 16 ++++++++-------
bin/build-world.sh | 9 ++++++++-
bin/build.sh | 8 ++++++--
src/compiler/main.lisp | 51 +++++++++++++++++++++++++++---------------------
4 files changed, 52 insertions(+), 32 deletions(-)
hooks/post-receive
--
CMU Common Lisp
More information about the cmucl-cvs
mailing list