-This program requires the SBCL Common Lisp system (http://www.sbcl.org)
-to compile and run. Because of its use of a new feature in the
-sb-executable module, vcs-tree requires SBCL version 0.8.3.55 or greater.
+This program requires the SBCL Common Lisp system
+(http://www.sbcl.org) to compile. Because of its use of a new feature
+of SBCL, "(save-lisp-and-die :executable t)", vcs-tree requires SBCL
+version 0.9.4 or greater to compile
Once you have SBCL installed on your system, you can give the command
make
-which will create the executable file "vcs-tree". You can then copy
+which will create the executable file "_vcs-tree". You can then copy
that file to any directory in your path, such as /usr/local/bin/
+Additionally, the small shell wrapper "vcs-tree" can be used and copied to
+a directory of binaries along with _vcs-tree.
pkg :=vcs-tree
-sources :=$(pkg).asd main.lisp loader.lisp package.lisp kmrcl-excerpt.lisp
+sources :=$(pkg).asd $(wildcard *.lisp)
-$(pkg): $(sources)
+_$(pkg): $(sources)
$(MAKE) clean
- /usr/bin/sbcl --userinit /dev/null --eval "(require 'asdf)" --load "$(pkg).asd" --eval "(asdf:operate 'asdf:load-op '$(pkg))" --eval "(sb-ext:quit :unix-status 0)"
+ /usr/bin/sbcl --userinit /dev/null --eval "(require 'asdf)" --load vcs-tree.asd --eval "(asdf:operate 'asdf::load-op 'vcs-tree)" --eval "(vcs-tree-system:save-executable \"_vcs-tree\")" --eval "(sb-ext:quit :unix-status 0)"
clean:
- rm -f *.fasl $(pkg)
+ rm -f *.fasl _$(pkg)
+vcs-tree (0.3.0-1) unstable; urgency=low
+
+ * Change from using fasl loading to using SBCL's new
+ (save-lisp-and-die :executable t) feature so that binaries don't
+ depend upon particular versions of SBCL fasls.
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Wed, 18 Oct 2006 19:19:13 -0600
+
vcs-tree (0.2.2-4) unstable; urgency=low
* Change architecture to any
Section: devel
Priority: optional
Maintainer: Kevin M. Rosenberg <kmr@debian.org>
-Build-Depends: debhelper (>> 4.0.0), sbcl (>= 0.8.3)
-Standards-Version: 3.6.1.1
+Build-Depends: debhelper (>> 4.0.0), sbcl (>= 0.9.4)
+Standards-Version: 3.7.1.1
Package: vcs-tree
Architecture: any
-Depends: ${shlibs:Depends}, sbcl (>= 0.8.3)
+Depends: ${shlibs:Depends}
Description: Version Control System Tree Walker
vcs-tree walks through a directory tree and performs actions on CVS
or Subversion directories. vcs-tree works differently than just using
bin-dir := usr/bin
doc-dir := usr/share/doc/$(debpkg)
-
configure: configure-stamp
configure-stamp:
dh_testdir
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
- $(MAKE) ${pkg}
+ $(MAKE) _${pkg}
touch build-stamp
clean:
dh_clean -k
# Add here commands to install the package into debian/xlunit.
dh_installdirs $(bin-dir)
- dh_install ${pkg} $(bin-dir)
+ dh_install $(pkg) $(bin-dir)
+ dh_install _$(pkg) $(bin-dir)
# Build architecture-independent files here.
binary-indep: build install
# dh_installmime
# dh_installinit
# dh_installcron
- dh_installman ${pkg}.1
+ dh_installman $(pkg).1
# dh_installinfo
# dh_undocumented
dh_installchangelogs
- dh_strip
+ # don't strip sbcl binary or will remove vcs-tree code
+ dh_strip -X_$(pkg)
dh_compress
dh_fixperms
# dh_makeshlibs
"Opens a reads a file. Returns the contents as a list of strings"
(let ((lines '()))
(with-open-file (in file :direction :input)
- (let ((eof (gensym)))
- (do ((line (read-line in nil eof)
+ (let ((eof (gensym)))
+ (do ((line (read-line in nil eof)
(read-line in nil eof)))
((eq line eof))
(push line lines)))
new-dir)
:name nil :type nil :version nil :defaults path)
path))))
-
+
(defun probe-directory (filename)
(let ((path (canonicalize-directory-name filename)))
(defun shell-command-output (cmd &key directory whole)
#+allegro (excl.osi:command-output cmd :directory directory :whole whole)
#+sbcl
- (let* ((out (make-array '(0) :element-type 'base-char :fill-pointer 0
+ (let* ((out (make-array '(0) :element-type 'character :fill-pointer 0
:adjustable t))
- (err (make-array '(0) :element-type 'base-char :fill-pointer 0
+ (err (make-array '(0) :element-type 'character :fill-pointer 0
:adjustable t))
- (status
+ (status
(sb-impl::process-exit-code
(with-output-to-string (out-stream out)
(with-output-to-string (err-stream err)
- (sb-ext:run-program
+ (sb-ext:run-program
"/bin/sh"
(list "-c" cmd)
:input nil :output out-stream :error err-stream))))))
+++ /dev/null
-;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: cl-user -*-
-;;;; *************************************************************************
-;;;; FILE IDENTIFICATION
-;;;;
-;;;; Name: loader.lisp
-;;;; Purpose: loads any required modules, contains RUN function
-;;;; Programmer: Kevin M. Rosenberg
-;;;; Date Started: Sep 2003
-;;;;
-;;;; $Id$
-;;;; *************************************************************************
-
-(in-package :cl-user)
-
-;;; Nothing to load since the executable contains all of the required
-;;; fasls
-
-
-(defun run ()
- (handler-case
- (funcall #'vcs-tree::main (list* "vcs-tree" (cdr *posix-argv*)))
- (error (c)
- (format *error-output* "vcs-tree failed due to error:~% ~A~%" c)
- (sb-ext:quit :unix-status 1))))
--- /dev/null
+#!/bin/sh
+
+_vcs-tree --noinform $*
;;;; *************************************************************************
(in-package cl-user)
-(defpackage vcs-tree-system (:use #:cl #:asdf))
+(defpackage vcs-tree-system
+ (:use #:cl #:asdf)
+ (:export save-executable))
(in-package vcs-tree-system)
-(require 'sb-executable)
-
-;;; From asdf-install.asd
-(defclass exe-file (cl-source-file) ())
-(defmethod perform :after ((o compile-op) (c exe-file))
- (sb-executable:make-executable
- (make-pathname :name "vcs-tree"
- :type nil
- :defaults (component-pathname c))
- (mapcar
- #'(lambda (n)
- (make-pathname :name n :type "fasl"
- :defaults (car (output-files o c))))
- '("package" "kmrcl-excerpt" "getopt-excerpt" "main" "loader"))
- :initial-function "RUN"))
-
-(defmethod perform ((o load-op) (c exe-file)) nil)
+(defun save-executable (&optional (fname "_vcs-tree"))
+ (setq cl:*print-pretty* nil)
+ (sb-ext:save-lisp-and-die
+ fname
+ :executable t
+ :toplevel (lambda ()
+ (handler-case
+ (funcall (intern (symbol-name '#:main)
+ (find-package (symbol-name '#:vcs-tree)))
+ (list* "vcs-tree" (cdr sb-ext:*posix-argv*)))
+ (error (c)
+ (format *error-output* "vcs-tree failed due to error:~% ~A~%" c)
+ (sb-ext:quit :unix-status 1)))
+ (sb-ext:quit :unix-status 0))))
(defsystem vcs-tree
- :version "0.1"
+ :version "0.3"
:components ((:file "package")
- (:exe-file "loader" :depends-on ("main"))
(:file "kmrcl-excerpt" :depends-on ("package"))
(:file "getopt-excerpt" :depends-on ("package"))
(:file "main" :depends-on ("kmrcl-excerpt" "getopt-excerpt"))))
-
-(defmethod perform :after ((o load-op) (c (eql (find-system :vcs-tree))))
- (provide 'vcs-tree))
-
-(defmethod perform ((o test-op) (c (eql (find-system :vcs-tree))))
- t)