Commit c4c90a50 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

4.1.3.1: don't forget to install dispatch.lisp as source.

Also, tweak help messages.
parent 27f6cd68
......@@ -24,6 +24,9 @@ install_source:
@echo "Installing Lisp source code for cl-launch in ${INSTALL_SOURCE}"
@mkdir -p ${INSTALL_SOURCE}/
@${CL_LAUNCH} --include ${INSTALL_SOURCE} -B install_path > /dev/null
@if [ ! $${PWD} = ${INSTALL_SOURCE} ] ; then \
@cp dispatch.lisp ${INSTALL_SOURCE}/ ; \
fi
install_system: install_source
@echo "Linking .asd file for cl-launch into ${INSTALL_SYSTEMS}/"
......
#!/bin/sh
#| cl-launch.sh -- shell wrapper for Common Lisp -*- Lisp -*-
CL_LAUNCH_VERSION='4.1.3'
CL_LAUNCH_VERSION='4.1.3.1'
license_information () {
AUTHOR_NOTE="\
# Please send your improvements to the author:
......@@ -88,10 +88,12 @@ PROGBASE="${0##*/}" # "$(basename "$0")"
CL_LAUNCH_URL="http://fare.tunes.org/files/cl-launch/cl-launch.sh"
HELP_HEADER="cl-launch.sh $CL_LAUNCH_VERSION \"(April 2015)\" \"Francois-Rene Rideau's\" \"shell wrapper for Common Lisp\""
HELP_HEADER="cl-launch.sh $CL_LAUNCH_VERSION"
print_help_header () {
ECHO "$HELP_HEADER"
ECHO "============"
i=0 ; while [ "$i" -lt "${#HELP_HEADER}" ] ; do
ECHOn "=" ; i="$[$i+1]"
done ; ECHO
}
print_help () {
cat <<EOF
......@@ -136,12 +138,12 @@ Software specification
-sp SP --system-package SP combination of -s SP and -p SP
-e FORM --eval FORM evaluate FORM while building
--require MODULE require MODULE while building
-r FUNC --restart FUNC restart from build by calling (FUNC)
-E FUNC --entry FUNC restart from build by calling (FUNC argv)
-DE N/F --dispatched-entry N/F if exec'ed as N, restart from (F argv)
-i FORM --init FORM evaluate FORM after restart
-ip FORM --print FORM evaluate and princ FORM after restart
-iw FORM --write FORM evaluate and write FORM after restart
-i FORM --init FORM evaluate FORM at restart
-ip FORM --print FORM evaluate and princ FORM at restart
-iw FORM --write FORM evaluate and write FORM at restart
-r FUNC --restart FUNC complete restart by calling (FUNC)
-E FUNC --entry FUNC complete restart by calling (FUNC argv)
-F FORM --final FORM evaluate FORM before dumping IMAGE
-I PATH --include PATH runtime PATH to cl-launch installation
+I --no-include disable cl-launch installation feature
......@@ -294,8 +296,8 @@ at which point it happens when you invoke the executable output file:
Option \`-iw --write\` is similar to \`--print\`,
using \`WRITE\` instead of \`PRINC\`.
* An optional \`FUNCTION\` provided option \`-r --restart\` or \`-E --entry\`
is invoked. If the function was provided with option \`-r --restart\`
(compatible with earlier versions of \`cl-launch\`),
is invoked after all init forms. If the function was provided with option
\`-r --restart\` (compatible with earlier versions of \`cl-launch\`),
it will be called with no argument. If it was provided with
option \`-E --entry\` (compatible with \`buildapp\`), it will be called
with one argument, being the list of arguments passed to the program,
......
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "CL\-LAUNCH" "1" "April 2015" "Francois-Rene Rideau" "Shell Scripting with Common Lisp"
.TH "CL\-LAUNCH" "1" "May 2015" "Francois-Rene Rideau" "Shell Scripting with Common Lisp"
.
.SH "Name"
cl\-launch \- shell wrapper for Common Lisp
......@@ -53,12 +53,12 @@ cl [options] \-\-output EXECUTABLE [options]
\-sp SP \-\-system\-package SP combination of \-s SP and \-p SP
\-e FORM \-\-eval FORM evaluate FORM while building
\-\-require MODULE require MODULE while building
\-r FUNC \-\-restart FUNC restart from build by calling (FUNC)
\-E FUNC \-\-entry FUNC restart from build by calling (FUNC argv)
\-DE N/F \-\-dispatched\-entry N/F if exec\'ed as N, restart from (F argv)
\-i FORM \-\-init FORM evaluate FORM after restart
\-ip FORM \-\-print FORM evaluate and princ FORM after restart
\-iw FORM \-\-write FORM evaluate and write FORM after restart
\-i FORM \-\-init FORM evaluate FORM at restart
\-ip FORM \-\-print FORM evaluate and princ FORM at restart
\-iw FORM \-\-write FORM evaluate and write FORM at restart
\-r FUNC \-\-restart FUNC complete restart by calling (FUNC)
\-E FUNC \-\-entry FUNC complete restart by calling (FUNC argv)
\-F FORM \-\-final FORM evaluate FORM before dumping IMAGE
\-I PATH \-\-include PATH runtime PATH to cl\-launch installation
+I \-\-no\-include disable cl\-launch installation feature
......@@ -166,7 +166,7 @@ Hooks from \fBASDF3\fR\'s \fBUIOP:*IMAGE\-RESTORE\-HOOK*\fR are called (in FIFO
a series of \fBFORMS\fR specified via options \fB\-i \-\-init\fR, \fB\-ip \-\-print\fR, \fB\-iw \-\-write\fR, stored as a text string, are read and evaluated in order of appearance, each in the context of the package that was current at the time it was requested\. (Concatenated together with separating whitespace, these forms constitute the \fBUIOP:*IMAGE\-PRELUDE*\fR as handled by \fBRESTORE\-IMAGE\fR)\. Arguments that start with an open parenthesis are assumed to be \fBFORMS\fR that follow an implicit \fB\-\-print\fR\. Loading from a stream means you don\'t have to worry about nasty read\-time issues; forms will be read by the fully built Lisp image; however it also means that if you care a lot about the very last drop of startup delay when invoking a dumped image, you\'ll only use option \fB\-r \-\-restart\fR or \fB\-E \-\-entry\fR and avoid using \fB\-\-init\fR and its variants\. Option \fB\-ip \-\-print\fR specifies \fBFORMS\fR such that the result of the last form will be printed as if by \fBPRINC\fR, followed by a newline\. Option \fB\-iw \-\-write\fR is similar to \fB\-\-print\fR, using \fBWRITE\fR instead of \fBPRINC\fR\.
.
.IP "\(bu" 4
An optional \fBFUNCTION\fR provided option \fB\-r \-\-restart\fR or \fB\-E \-\-entry\fR is invoked\. If the function was provided with option \fB\-r \-\-restart\fR (compatible with earlier versions of \fBcl\-launch\fR), it will be called with no argument\. If it was provided with option \fB\-E \-\-entry\fR (compatible with \fBbuildapp\fR), it will be called with one argument, being the list of arguments passed to the program, not including \fBargv[0]\fR, which is available on most implementations via the function \fBuiop:argv0\fR (available in \fBASDF\fR 3\.1\.2 and later)\. Using either option, the argument may be a function name or a lambda expression, that is read from the current package (see below option \fB\-p \-\-package\fR and \fB\-sp \-\-system\-package\fR)\. Only one restart or entry function may be specified; if multiple are provided, the last one provided overrides previous ones\. If you want several functions to be called, you may \fBDEFUN\fR one that calls them and use it as a restart, or you may use multiple init forms as below\. See also below options \fB\-DE \-\-dispatch\-entry\fR, \fB\-sm \-\-system\-main\fR, \fB\-Ds \-\-dispatch\-system\fR that behave as if \fB\-E \-\-entry\fR had been specified among other things\.
An optional \fBFUNCTION\fR provided option \fB\-r \-\-restart\fR or \fB\-E \-\-entry\fR is invoked after all init forms\. If the function was provided with option \fB\-r \-\-restart\fR (compatible with earlier versions of \fBcl\-launch\fR), it will be called with no argument\. If it was provided with option \fB\-E \-\-entry\fR (compatible with \fBbuildapp\fR), it will be called with one argument, being the list of arguments passed to the program, not including \fBargv[0]\fR, which is available on most implementations via the function \fBuiop:argv0\fR (available in \fBASDF\fR 3\.1\.2 and later)\. Using either option, the argument may be a function name or a lambda expression, that is read from the current package (see below option \fB\-p \-\-package\fR and \fB\-sp \-\-system\-package\fR)\. Only one restart or entry function may be specified; if multiple are provided, the last one provided overrides previous ones\. If you want several functions to be called, you may \fBDEFUN\fR one that calls them and use it as a restart, or you may use multiple init forms as below\. See also below options \fB\-DE \-\-dispatch\-entry\fR, \fB\-sm \-\-system\-main\fR, \fB\-Ds \-\-dispatch\-system\fR that behave as if \fB\-E \-\-entry\fR had been specified among other things\.
.
.IP "\(bu" 4
If neither restart nor entry function is provided, the program will exit with status \fB0\fR (success)\. If a function was provided, the program will exit after the function returns (if it returns), with status \fB0\fR if and only if the primary return value of result is generalized boolean true, and with status 1 if this value is \fBNIL\fR\. See documentation for \fBUIOP:RESTORE\-IMAGE\fR for details\.
......
......@@ -7,6 +7,7 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
;; Note: these exports are also the list of available commands.
(:export #:rep #:clean #:manpage
#:source #:quickrelease
#:get-date-from-git #:check-manual
#:debian-package #:publish-debian-package #:debian-package-all))
(in-package :cl-launch/release)
......@@ -115,7 +116,7 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
(defparameter *months* #("January" "February" "March" "April" "May" "June"
"July" "August" "September" "October" "November" "December"))
(defun get-date-from-manual ()
(defun get-date-from-manual () ;; Note: we don't put the date there anymore.
(with-current-directory ((pn))
(match (first (run/lines `(./cl-launch.sh --help)))
((ppcre "\"[(]([A-Z][a-z]+) ([0-9]+)[)]\"" month year)
......@@ -138,7 +139,7 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
date-from-manual date-from-git)))
(defun manpage ()
(check-manual-git-dates-match)
;;(check-manual-git-dates-match)
(with-current-directory ((pn))
(run `(ln -sf cl-launch.sh cl))
(run `(env ("PATH=.:" ,(getenv "PATH")) cl --more-help (> cl-launch.1.md)))
......@@ -148,7 +149,7 @@ exec "$(dirname $0)/cl-launch.sh" -X --system-main cl-launch/release -- "$0" "$@
cl-launch.1.md (> 2 /dev/null)))))
(defun check-manual ()
(check-manual-git-dates-match)
;;(check-manual-git-dates-match)
(manpage)
(with-current-directory ((pn))
(run `(cmp ./cl-launch.1 ./debian/cl-launch.1))))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment