pax_global_header00006660000000000000000000000064122273642220014514gustar00rootroot0000000000000052 comment=9c9187bb1259e8d124ed1b1b87e8353bff415694 cl-launch-3.22.1/000077500000000000000000000000001222736422200134475ustar00rootroot00000000000000cl-launch-3.22.1/.gitignore000066400000000000000000000005611222736422200154410ustar00rootroot00000000000000# Generated during a (debian) build build.xcvb cl-launch cl-launch.asd launcher.lisp wrapper.sh # Generated when compiling with e.g. SLIME *.*f*sl *.fas *.lib *.o # Generated by dpkg-buildpackage debian/cl-launch.debhelper.log debian/cl-launch.postinst.debhelper debian/cl-launch.prerm.debhelper debian/cl-launch.substvars debian/cl-launch/ debian/files .pc/ debian/ cl-launch-3.22.1/00INSTALL000066400000000000000000000037751222736422200146540ustar00rootroot00000000000000INSTALLING cl-launch ==================== If you're going to build things that depend on cl-launch using ASDF or XCVB, you need to install cl-launch. However, even without installation, cl-launch will work happily as a standalone script that drives the building of simple executables or ones that use ASDF. Simple installation ------------------- If you want to install cl-launch at its default location in ``/usr/local``, just you:: sudo make install If instead you want it in ``/usr``, do:: sudo make install PREFIX=/usr A list of variables you may want to modify or override is at the beginning of the ``Makefile``. Advanced installation --------------------- You can decide separately where the binary will be using ``INSTALL_BIN`` (to override the default of ``$PREFIX/bin``) and where the Lisp source code will go using ``INSTALL_SOURCE`` (to override the default of ``$PREFIX/share/common-lisp/source/cl-launch``) with a symlink to the asd file going in ``INSTALL_SYSTEMS`` (to override the default of ``$PREFIX/share/common-lisp/systems``). Update and reinstallation ------------------------- Personally, I have a ``./reinstall`` script that does:: make install_system PREFIX=$HOME/.local and if not for a judicious symlink from ``$HOME/bin/cl-launch`` to my checkout, it would also do:: make install_binary PREFIX=$HOME Configuration ------------- Of course you should adjust your ``PATH``, your ``asdf:*central-registry*`` and your ``XCVB_PATH`` coherently with where you install cl-launch. Faking the installation ----------------------- If you just want to see what cl-launch will create without installing it to the final destination, you can install to a fake destination:: mkdir -p build/bin build/systems build/source make install INSTALL_BIN=${PWD}/build/bin INSTALL_SOURCE=${PWD}/build/source INSTALL_SYSTEMS=${PWD}/build/systems Using it -------- Get short help with cl-launch --help Get long help with cl-launch --more-help | ${PAGER:-less} See example in XCVB and Exscribe source code. cl-launch-3.22.1/90INTERNALS000066400000000000000000000017751222736422200151140ustar00rootroot00000000000000NOTE TO HACKERS WHO'D LIKE TO HACK cl-launch INTERNALS I conceive cl-launch as the ultimate exercise in "useful quining". It's a shell script, it's a Lisp program header and library, it outputs shell scripts and Lisp programs that may include parts of cl-launch. It also includes its own test system. cl-launch is very hard to hack. A change you'd think is innocuous will actually break some complex combination of options on some Lisp implementation and shell variant. Even for the simplest of changes, I recommend running a full test before you release, which may involve: LISPS="clisp sbcl ccl ecl gclcvs cmucl gcl" # include whatever you have mkdir -p ${TMP:-/tmp}/cl-launch-test && cd ${TMP:-/tmp}/cl-launch-test && ${CL-LAUNCH} -l "${LISPS}" -B tests && ${CL-LAUNCH} -l clisp -B shell_tests If you add a new option, you probably should be adding a test for in somewhere in the shell function do_tests, which will double the testing time, currently over an hour for me. Happy hacking! cl-launch-3.22.1/95TODO000066400000000000000000000017701222736422200143220ustar00rootroot00000000000000TODO for cl-launch as of 2.31 * When resuming from an image then dumping another, the INCLUDE_PATH becomes a very bad variable to look for the image. Include a test case and fix it. More generally, test with directory differences between image and other stuff. * Maybe: add "dump from previous image" support for ECL? One limitation that cl-launch has on ECL (vs on e.g. SBCL) is the inability to "dump an image from a previous image". This could be achieved by hacking asdf:make-build (from ecl/contrib/asdf/asdf-ecl.lisp) to intercept in a (defmethod perform :before ((op monolithic-bundle-op) (c system)) ...) the arguments to the last call to c::builder, and to re-inject those arguments in same call them the next time around, assuming (which is somewhat fragile) that objects won't have been moved or deleted by then. I do not currently intend to support this feature in cl-launch, but will hopefully support it in XCVB that can do the bookkeeping on its side. cl-launch-3.22.1/Makefile000066400000000000000000000107101222736422200151060ustar00rootroot00000000000000# See 00INSTALL for instructions. # Tweak this configuration to your preferences: PREFIX ?= /usr/local INSTALL_BIN ?= ${PREFIX}/bin INSTALL_SOURCE ?= ${PREFIX}/share/common-lisp/source/cl-launch INSTALL_SYSTEMS ?= ${PREFIX}/share/common-lisp/systems LISPS ?= sbcl clisp ccl ecl cmucl gclcvs lispworks allegro gcl abcl scl # No user-serviceable part below CL_LAUNCH := ./cl-launch.sh all: source source: @echo "Building Lisp source code for cl-launch in current directory" @${CL_LAUNCH} --include ${PWD} -B install_path > /dev/null install: install_binary install_source install_system install_binary: install_binary_standalone 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 install_system: install_source @echo "Linking .asd file for cl-launch into ${INSTALL_SYSTEMS}/" @mkdir -p ${INSTALL_SYSTEMS}/ @if [ `dirname ${INSTALL_SYSTEMS}`/source/cl-launch = ${INSTALL_SOURCE} ] ; then \ ln -sf ../source/cl-launch/cl-launch.asd ${INSTALL_SYSTEMS}/ ; \ else \ ln -sf ${INSTALL_SOURCE}/cl-launch.asd ${INSTALL_SYSTEMS}/ ; \ fi install_binary_standalone: @echo "Installing a standalone binary of cl-launch in ${INSTALL_BIN}/" @sh ./cl-launch.sh --no-include --no-rc \ --lisp '$(LISPS)' \ --output ${INSTALL_BIN}/cl-launch -B install_bin > /dev/null install-with-include: install_binary_with_include install_source install_system install_binary_with_include: @echo "Installing a binary of cl-launch in ${INSTALL_BIN}/" @echo "that will (by default) link its output to the code in ${INSTALL_SOURCE}" @sh ./cl-launch.sh --include ${INSTALL_SOURCE} --rc \ --lisp '$(LISPS)' \ --output ${INSTALL_BIN}/cl-launch -B install_bin > /dev/null clean: -rm -f *.*fasl *.*fsl *.fas *.lib *.x86f *.amd64f *.o -rm -f build.xcvb cl-launch cl-launch.asd launcher.lisp wrapper.sh -rm -f clt.image clt-out.sh.orig clt-preimage.lisp clt-sys.lisp clt.log clt.preimage clt-preimage.sh clt-asd.asd clt-out.sh clt-preimage.fasl clt-src.lisp tests.log -cd debian ; rm -f cl-launch.debhelper.log cl-launch.postinst.debhelper cl-launch.prerm.debhelper cl-launch.substvars files mrproper: clean -rm -rf debian/cl-launch .pc/ build-stamp debian/patches/ debian/debhelper.log # debian crap debian-package: mrproper git clean -xfd RELEASE="$$(git tag -l '3.[0-9][0-9]' | tail -n 1)" ; \ git-buildpackage --git-debian-branch=master --git-upstream-branch=master --git-upstream-tag=$$RELEASE --git-tag --git-retag --git-ignore-branch lintian -c --fail-on-warnings ../cl-launch_*.changes git clean -xfd # This fits my own system. YMMV. Try make install for a more traditional install reinstall: make install_system PREFIX=$${HOME}/.local # This might fit your system, installing from same directory reinstall_here: make install_source install_binary_standalone INSTALL_SOURCE=$$PWD INSTALL_BIN=$$PWD test: ./cl-launch.sh -l "${LISPS}" -B tests WRONGFUL_TAGS := RELEASE upstream # Delete wrongful tags from local repository fix-local-git-tags: for i in ${WRONGFUL_TAGS} ; do git tag -d $$i ; done # Delete wrongful tags from remote repository fix-remote-git-tags: for i in ${WRONGFUL_TAGS} ; do git push $${REMOTE:-origin} :refs/tags/$$i ; done push: git status git push --tags origin master git fetch git status debian-package-all: debian-package ./cl-launch.sh --include . -B install_path ./cl-launch.sh --no-include -o cl-launch -B install_bin VER=$$(git describe --tags --match '?.???') ; \ cd .. && \ tar zcf ~/files/cl-launch/cl-launch-$${VER}.tar.gz --exclude .git cl-launch && \ cp cl-launch/cl-launch.sh ~/files/cl-launch/cl-launch.sh && \ mv cl-launch_$${VER}* ~/files/cl-launch/ && \ cd ~/files/cl-launch && \ ln -sf cl-launch-$${VER}.tar.gz cl-launch.tar.gz && \ gpg -b -a cl-launch-$${VER}.tar.gz && \ ln -sf cl-launch-$${VER}.tar.gz cl-launch.tar.gz && \ ln -sf cl-launch-$${VER}.tar.gz.asc cl-launch.tar.gz.asc && \ dput mentors cl-launch_$${VER}-1_amd64.changes rsync -av --delete ~/files/cl-launch/ common-lisp.net:/project/xcvb/public_html/cl-launch/ quickrelease: reinstall_here VER=`./cl-launch.sh --version | ( read a b ; echo $$b )` ; \ cd .. && \ tar zcf cl-launch-$${VER}.tar.gz --exclude .git cl-launch && \ rsync -av cl-launch/cl-launch.sh cl-launch-$${VER}.tar.gz common-lisp.net:/project/xcvb/public_html/cl-launch/ && \ ssh common-lisp.net ln -sf cl-launch-$${VER}.tar.gz /project/xcvb/public_html/cl-launch/cl-launch.tar.gz cl-launch-3.22.1/cl-launch.sh000077500000000000000000002671451222736422200156730ustar00rootroot00000000000000#!/bin/sh #| cl-launch.sh -- shell wrapper generator for Common Lisp software -*- Lisp -*- CL_LAUNCH_VERSION='3.22.1' license_information () { AUTHOR_NOTE="\ # Please send your improvements to the author: # fare at tunes dot org < http://www.cliki.net/Fare%20Rideau >. " SHORT_LICENSE="\ # CL-Launch is available under the terms of the bugroff license. # http://www.geocities.com/SoHo/Cafe/5947/bugroff.html # You may at your leisure use the LLGPL instead < http://www.cliki.net/LLGPL > " WEB_SITE="# For the latest version of CL-Launch, see its web page at: # http://www.cliki.net/cl-launch " LICENSE_COMMENT="\ # This software can be used in conjunction with any other software: # the result may consist in pieces of the two software glued together in # a same file, but even then these pieces remain well distinguished, and are # each available under its own copyright and licensing terms, as applicable. # The parts that come from the other software are subject to the terms of use # and distribution relative to said software, which may well be # more restrictive than the terms of this software (according to lawyers # and the armed henchmen they got the taxpayers to pay to enforce their laws). # The bits of code generated by cl-launch, however, remain available # under the terms of their own license, and you may service them as you wish: # manually, using cl-launch --update or whichever means you prefer. # That said, if you believe in any of that intellectual property scam, # you may be subject to the terms of my End-Seller License: # http://www.livejournal.com/users/fare/21806.html " DISCLAIMER="\ # This file was automatically generated and contains parts of CL-Launch " } license_information ### Settings for the current installation -- adjust to your convenience ### Or see documentation for using commands -B install and -B install_bin. DEFAULT_LISPS="sbcl ccl clisp cmucl ecl abcl xcl scl allegro lispworks gclcvs gcl" DEFAULT_INCLUDE_PATH= DEFAULT_USE_CL_LAUNCHRC= DEFAULT_USE_CLBUILD= ### Initialize cl-launch variables unset \ SOFTWARE_FILE SOFTWARE_SYSTEM \ SOFTWARE_FINAL_FORMS SOFTWARE_INIT_FORMS \ SOURCE_REGISTRY INCLUDE_PATH LISPS WRAPPER_CODE \ OUTPUT_FILE UPDATE \ LINE LINE1 LINE2 NO_QUIT CONTENT_FILE \ TRIED_CONFIGURATION HAS_CONFIGURATION \ EXEC_LISP DO_LISP DUMP LOAD_IMAGE RESTART IMAGE IMAGE_OPT \ EXTRA_CONFIG_VARIABLES \ EXECUTABLE_IMAGE STANDALONE_EXECUTABLE CL_LAUNCH_STANDALONE \ TEST_SHELLS TORIG IMPL LISPS="$DEFAULT_LISPS" INCLUDE_PATH="$DEFAULT_INCLUDE_PATH" USE_CL_LAUNCHRC="$DEFAULT_USE_CL_LAUNCHRC" USE_CLBUILD="$DEFAULT_USE_CLBUILD" UNREAD_DEPTH=0 OUTPUT_FILE="!" ### Other constants MAGIC_MD5SUM="65bcc57c2179aad145614ec328ce5ba8" # Greenspun's Tenth Rule... CONTENT_DISCLAIMER="\ ;;; THE SOFTWARE AFTER THIS MARKER AND TO THE END OF THE FILE IS NOT PART OF ;;; CL-LAUNCH BUT A PIECE OF SOFTWARE DISTINCT FROM CL-LAUNCH. IT IS OWNED BY ;;; BY ITS OWNERS AND IS SUBJECT ITS OWN INDEPENDENT TERMS OF AVAILABILITY." CONTENT_BEGIN_MARKER="\ ;;; ${MAGIC_MD5SUM} SOFTWARE WRAPPED BY CL-LAUNCH BEGINS HERE:" ### Help ## setup a few environment variables for the program BASIC_ENV_CODE='PROG="$0"' eval "$BASIC_ENV_CODE" 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 -- shell wrapper generator for Common Lisp software" print_help_header () { ECHO "$HELP_HEADER" } print_help () { cat < si.lisp lispworks-6-1-0-x86-linux -siteinit - -init - -build si.lisp Similarly, a mlisp image for allegro can be created as follows: alisp -e '(progn (build-lisp-image "sys:mlisp.dxl" :case-mode :case-sensitive-lower :include-ide nil :restart-app-function nil) (when (probe-file "sys:mlisp") (delete-file "sys:mlisp")) (sys:copy-file "sys:alisp" "sys:mlisp"))' Additionally, cl-launch supports the use of clbuild as a wrapper to invoke the Lisp implementation, with the --clbuild option. LISP IMPLEMENTATION INVOCATION When a cl-launch generated script is invoked, the cl-launch shell wrapper will try to execute the Lisp code with the first Common Lisp implementation it finds in a given list, which can be specified through option --lisp. The runtime behaviour of the cl-launch shell wrapper is very configurable through a series of environment variables. These variables can be controlled by the user by exporting them in his environment, or they can be restricted at the time of script generation by using cl-launch option --wrap. If variable LISP is defined, the shell wrapper will first try the implementation named by variable LISP. If that fails, it will try the list of implementations provided at script generation time. The list of implementations generated will be the argument to option --lisp if specified. Otherwise, cl-launch will supply its default value. This default value for the current instance of cl-launch is: $DEFAULT_LISPS This LISP selection only happens at system preparation time. If you dump an image then the script will always use the Lisp implementation for which an image was dumped. If you don't then the user may override the implementation. Note that these are nicknames built into the cl-launch shell wrapper, and not necessarily names of actual binary. You may control the mapping of implementation nickname to actual binary pathname to call with an environment variable. For a given implementation nickname, the environment variable will be the capitalization of the given nickname. Hence, variable \$SBCL controls where to look for a sbcl implementation, and variable \$CMUCL controls where to look for a cmucl implementation. If a binary is found with a matching pathname (using the standard unix \$PATH as required), then said implementation will be used, using proper command line options, that may be overriden with an environment variable similar to the previous but with _OPTIONS appended to its name. Hence, \$CMUCL_OPTIONS for cmucl, \$CLISP_OPTIONS for clisp, etc. Sensible defaults are provided for each implementation, so as to execute the software in non-interactive mode, with debugger disabled, without reading user-specific configuration files, etc. If you want to insist on using a given implementation with given options, you may use option --lisp and --wrap, as follows: --lisp 'sbcl clisp' wrap ' LISP= # do not allow the user to specify his implementation SBCL=/usr/bin/sbcl # not any experimental thing by the user SBCL_OPTIONS="--noinform --sysinit /dev/null --userinit /dev/null \\ --disable-debugger" # predictable Lisp state CLISP=/usr/bin/clisp # fall back on machines that lack SBCL CLISP_OPTIONS=" -norc --quiet --quiet" CL_SOURCE_REGISTRY=/usr/local/share/common-lisp/source//: # configure ASDF ASDF_OUTPUT_TRANSLATIONS=/my/cl/src:/my/fasl/cache: # assuming precompiled fasls there ' If you dump an image, you need not unset the LISP variable, but you might still want to override any user-specified SBCL and SBCL_OPTIONS (or corresponding variables for your selected implementation) from what the user may specify. Note that you can use option --wrap "\$(cat your_script)" to embed into your program a full fledged script from a file. Your script may do arbitrary computations before the shell wrapper is run. It may make some consistency checks and abort before to run Lisp. Or it may analyze invocation arguments and make according adjustments to Lisp implementation options. This can be useful for setting options that cannot be set from the Lisp code, such the path to a runtime image, interactive or non-interactive execution, size of heaps, locale settings for source file encoding, etc. Reading the source code of cl-launch can be completely crazy. You may have great fun understanding why things are how they are and adding features without breaking anything! However, adding support for a new CL implementation should be straightforward enough: just search the sources for "clisp" or "sbcl" and mimic what I did for them. Be sure to send me what will get your favorite Lisp flavor of the month rolling. LIMITED CLBUILD SUPPORT cl-launch 2.12 and later support using clbuild as a wrapper to configure your Lisp implementation, with option --clbuild (which can be disabled with option --no-clbuild if it was enabled by default in your cl-launch installation). Note that when you use clbuild, you can no longer override implementation options with say SBCL_OPTIONS, as clbuild takes care of the options for you. Any implementation banner will not be removed unless you instruct clbuild to do so. Also, you cannot use clbuild with a non-executable image different from clbuild's, which precludes image dumping with cmucl or allegro (allegro could probably be updated, but I don't have a recent licence to test and develop). clbuild support is not fully tested at this point. Please report any bug. SIMPLE CL-LAUNCH SCRIPTS In simple cases, you may create a Common Lisp shell script with CL-Launch without a script generation step, just because you'll spend a lot of time editing the script and distributing it, and little time waiting for script startup time anyway. This notably is a good idea if you're not spawning many instances of the same version of a script on a given computer. If that's what you want, you may use cl-launch as a script interpret the following way (stripping leading spaces): #!/path/to/cl-launch -X ...options... -- For instance, you may write the following script (stripping leading spaces): #!/usr/bin/cl-launch -X --init '(format t "foo~%")' -- (format t "hello, world~%") (write cl-launch:*arguments*) (terpri) The limitation is that the first argument MUST be '-X' (upper case matters, and so does the following space actually), the last one MUST be '--' and all your other arguments (if any) must fit on the first line, although said line can be as long as you want: the kernel has a limit of 127 characters or so for this first line, but cl-launch will read the first line directly from the Lisp script, anyway. Note that if you don't need Lisp code to be loaded from your script, with everything happening in the --file --system and --init software specification, then you may instead use a simple #!/bin/sh shell script from which you exec /path/to/cl-launch -x ... -- "\$@". Also, in case you can't rely on cl-launch being at a fixed path, or if your shell and/or kernel combination doesn't support using cl-launch as a script interpreter, then you may instead start your script with the following lines (stripping leading spaces): #!/bin/sh ":" ; exec cl-launch -X -- "\$0" "\$@" || exit 42 (format t "It works!~%") In practice, I've found that machines with custom-compiled Linux kernels 2.6.15 and later supported #!/usr/bin/cl-launch fine with a wide variety of shells (I tried all of posh 0.4.7, bash 2.05, bash 3.1, zsh 4.3.2, dash 0.5.3 and busybox 1.01 ash), whereas other machines with a standard Linux kernel 2.6.11 from debian would not support it with any shell. Maybe an issue with kernel binfmt_misc configuration? DUMPING IMAGES You can dump an image (for static compilation and fast startup) with option --dump IMAGE where IMAGE specifies the path where the image will be dumped. If you use option --include PATH then the image will be loaded back from that specified directory instead of the directory where you dumped it. This is useful if you're preparing a script to be installed at another place maybe on another computer. This option is currently supported on all CL implementations available with cl-launch. As a limitation, LispWorks will print a banner on standard output, unless you use the standalone executable option below. As another limitation, ECL will not be able to dump an image when running from a previously dumped image (with --image). This is because with the link model of ECL, you'll need to be able to locate which object files were used in linking the original image, keep track of these files, and prepend the list of them to to the object files linked into the dump. Doing this is unhappily out of the scope of cl-launch; however, we hope to support that someday with a real build system such as XCVB. STANDALONE EXECUTABLES You can create standalone executables with the option --dump '!' (or by giving a --dump argument identical to the --output argument). This option is currently only supported with SBCL, ECL, CLISP, CMUCL, CCL and LispWorks Professional. Moreover CLISP has the issues below. CLISP standalone executables will react magically if invoked with options such as --clisp-help or --clisp-x '(sys::main-loop)'. That's a pretty far-fetched thing to hit by mistake, and the CLISP maintainers consider it a feature (I don't). Don't use such executables as setuid, and don't let untrusted users control arguments given to such executables that are run with extra privileges. CL-LAUNCH RUNTIME API cl-launch provides the following Lisp functions: Variable cl-launch:*arguments* contains the command-line arguments used to invoke the software. Function cl-launch:getenv allows to query (but not modify) the environment variables, as in (getenv "HOME"), returning nil when the variable is unbound. Function cl-launch:load-system takes as an argument the name of an asdf system and the keyword argument verbose, and loads specified system with specified verbosity. Function cl-launch:compile-and-load-file takes as an argument a source pathname designator, and keyword arguments force-recompile (default NIL) and verbose (default NIL). It will arrange to compile the specified source file if it is explicitly requested, or if the file doesn't exist, or if the fasl is not up-to-date. It will compile and load with the specified verbosity. It will take use asdf:compile-file-pathname* to determine the fasl pathname. Function cl-launch:quit will cause the current Lisp application to exit. It takes two optional arguments code with default value 0, and finish-output with default value t. The first is to be used as the process exit code, the second specifies whether to call finish-output on *standard-output* and *error-output*. Note that you should use (finish-output) and otherwise flush buffers as applicable before you quit, not just to be standard-compliant, but also to support ccl and any other Lisp implementation that do buffering. Additionally, environment variables CL_LAUNCH_PID and CL_LAUNCH_FILE will be set to the process ID and the script invocation filename respectively. VERBOSE OUTPUT MODE If the shell variable CL_LAUNCH_VERBOSE is exported and non-nil, then cl-launch and the scripts it generates will produce an abundance of output, display such things as the Lisp invocation command, compiling and loading files with :verbose t and :print t, etc. This is only useful for debugging cl-launch and/or your build process. Option --verbose sets this variable, whereas option --quiet resets it. USING CL-LAUNCH FUNCTIONALITY IN YOUR LISP DEVELOPMENT ENVIRONMENT When you develop programs that you will use with cl-launch, you may as well use cl-launch during development, and benefit from its functionality. To this end, you may explicitly include the cl-launch Lisp header from your Lisp source code or from the Lisp initialization file for your favorite implementation (~/.sbclrc, ~/.cmucl-init, ~/.clisprc, etc.): #-cl-launch (load "/usr/share/common-lisp/source/cl-launch/launcher.lisp") If cl-launch is not installed at a fixed system location, you may create a copy in your own directory with such a command as cl-launch -B print_lisp_launcher > ~/src/cl-launch/launcher.lisp Alternatively, you may include cl-launch itself instead of an extracted header, if only you tell your Lisp reader consider #! as introducing a line comment: (set-dispatch-macro-character #\\# #\\! #'(lambda (stream char arg) (declare (ignore char arg)) (values (read-line stream)))) #-cl-launch (load "/path/to/cl-launch.sh") Finally, if you use cl-launch from debian, or it was otherwise installed with cl-launch -B install or if you create the asd in addition to the header and declare it to asdf cl-launch -B print_cl_launch_asd > ~/src/cl-launch/cl-launch.asd then if your installed cl-launch.asd is properly symlinked from a directory in your asdf:*central-registry*, you may just have your software depend on the system :cl-launch (asdf:load-system :cl-launch) which in some implementations (sbcl) can be simplified into (require :cl-launch) You may also declare in the asdf:defsystem for your software that it :depends-on (:cl-launch ...) MAKEFILE EXAMPLES: ### Automatically download of the current version of cl-launch if not present cl-launch.sh: wget -O cl-launch.sh ${CL_LAUNCH_URL} chmod a+x cl-launch.sh ### Making a shell script executable from a simple Lisp file named foo.lisp foo.sh: cl-launch.sh foo.lisp ./cl-launch.sh --output foo.sh --file foo.lisp ### A more complex example using all options. run-foo.sh: cl-launch.sh preamble.lisp ./cl-launch.sh --output run-foo.sh --file preamble.lisp --system foo \\ --init "(foo:main cl-launch:*arguments*)" \\ --source-registry \${PREFIX}/cl-foo/systems: \\ --lisp "ccl sbcl" --wrap 'SBCL=/usr/local/bin/sbcl-no-unicode' \\ --no-include ### An example with horrible nested makefile, shell and Lisp quoting hello: opera=wORlD ; ./cl-launch.sh --execute --init \\ "(format t \\"~25R~A~A~%\\" 6873049 #\\\\space '\$\$opera)" CAVEAT LISPOR cl-launch begins evaluation of your Lisp software in the CL-USER package. By the time your initialization forms are evaluated, the package may or may not have changed, depending on the fine-grained semantics of load. Be sure to use in-package if these things matter. There are lots of ways of making mistakes by improperly quoting things when you write shell commands. cl-launch does the right thing, but you still must be careful with the nested quoting mechanisms of make, shell, and Lisp. Here is a simple example use of cl-launch to quickly compare the result of a same computation on a variety of systems: for l in sbcl cmucl clisp gcl ccl ; do ./cl-launch.sh --lisp \$l --execute --init \\ '(format t "'\$l' ~A~%" most-positive-fixnum)' ; done Internally, cl-launch includes many self-test functions. You may for instance try (from a directory where it may create junk) ./cl-launch.sh -l 'sbcl cmucl clisp gclcvs' -B tests Share and Enjoy! EOF } show_help () { print_help_header echo print_help echo print_help_footer exit "${1:-0}" } show_more_help () { print_help_header echo print_help echo print_more_help echo print_help_footer exit "${1:-0}" } error_help () { show_help "${1:-2}" >& 2 } show_version () { echo "cl-launch ${CL_LAUNCH_VERSION} Supported implementations: sbcl, cmucl (lisp), clisp, ecl, ccl (openmcl), abcl, xcl, gcl (gclcvs), allegro (alisp), lispworks, scl Local defaults for generated scripts: will search in this order these supported implementations: ${DEFAULT_LISPS}" if [ -z "$DEFAULT_INCLUDE_PATH" ] ; then echo "\ will generate self-contained scripts using option --no-include by default" else echo "\ will generate scripts by default with runtime dependencies using option --include ${DEFAULT_INCLUDE_PATH}" fi if [ -n "$DEFAULT_USE_CL_LAUNCHRC" ] ; then echo "\ will use /etc/cl-launchrc and ~/.cl-launchrc by default" else echo "\ will not use /etc/cl-launchrc and ~/.cl-launchrc by default" fi if [ -z "$DEFAULT_USE_CLBUILD" ] ; then echo "\ will generate scripts that do not use clbuild by default" else echo "\ will generate scripts that use clbuild" fi echo exit } ### Generic debugging library excerpted from ~fare/etc/zsh/aliases.debug print_basic_functions () { cat <<'EOF' ECHOn () { printf '%s' "$*" ;} simple_term_p () { case "$1" in *[!a-zA-Z0-9-+_,.:=%/]*) return 1 ;; *) return 0 ;; esac } kwote0 () { ECHOn "$1" | sed -e "s/\([\\\\\"\$\`]\)/\\\\\\1/g" ;} kwote () { if simple_term_p "$1" ; then ECHOn "$1" ; else kwote0 "$1" ; fi ;} load_form_0 () { echo "(load $1 :verbose nil :print nil)" ;} load_form () { load_form_0 "\"$(kwote "$1")\"" ;} ECHO () { printf '%s\n' "$*" ;} DBG () { ECHO "$*" >& 2 ;} abort () { ERR="$1" ; shift ; DBG "$*" ; exit "$ERR" ;} ABORT () { abort 42 "$*" ;} EOF } eval "$(print_basic_functions)" kwote1 () { if simple_term_p "$1" ; then ECHOn "$1" else ECHOn "\"$(kwote0 "$1")\"" ; fi ;} SHOW () { ( set +x k="" ; for i ; do ECHOn "$k" ; kwote1 "$i" ; k=" " ; done ; echo ) } XDO () { SHOW "$@" >&2 ; "$@" ;} DO () { SHOW "$@" ; "$@" ;} EVAL () { ECHO "$*" ; eval "$*" ;} fullpath () { # If we were sure readlink is here, we could: for i ; do readlink -f "$i" ; done for i ; do case "$i" in /*) ECHO "$i" ;; *) ECHO "$PWD/$i" ;; esac ; done } print_var () { for var ; do eval "ECHO \"$var=\$(kwote1 \"\${$var}\")\"" ; done ;} create_file () { MOD="$1" OUT="$2" ; shift 2; TMPFILE="$OUT.tmp$$~" if "${@:-cat}" > "$TMPFILE" && chmod "$MOD" "$TMPFILE" && mv -f "$TMPFILE" "$OUT" ; then return 0 ; else rm -f "$TMPFILE" ; return 1 ; fi } ### Process options OPTION () { process_options "$@" ;} process_options () { case "$#:$1" in "1:-"*) : ;; "1:"*) add_init_form "(princ(progn $1))(terpri)" shift ;; esac while [ $# -gt 0 ] ; do x="$1" ; shift case "$x" in -h|"-?"|--help) show_help ;; -H|--more-help) show_more_help ;; -V|--version) show_version ;; -v|--verbose) export CL_LAUNCH_VERBOSE=t ;; -q|--quiet) unset CL_LAUNCH_VERBOSE ;; -f|--file) SOFTWARE_FILE="$1" ; shift ;; -s|--system) SOFTWARE_SYSTEM="$1" ; shift ;; -F|--final) add_final_form "$1" ; shift ;; -i|--init) add_init_form "$1" ; shift ;; -ip|--print) add_init_form "(princ(progn $1))(terpri)" ; shift ;; -iw|--write) add_init_form "(write(progn $1))(terpri)" ; shift ;; -p|-pc|+p) ABORT "option $x is not supported anymore." \ "Use option -S instead." ;; --path|--path-current|--no-path) ABORT "option $x is not supported anymore." \ "Use option --source-registry instead." ;; -S|--source-registry) SOURCE_REGISTRY="$1" ; shift ;; -l|--lisp) LISPS="$1" ; shift ;; -w|--wrap) WRAPPER_CODE="$1" ; shift ;; -I|--include) INCLUDE_PATH="$1" ; shift ;; +I|--no-include) INCLUDE_PATH="" ;; -R|--rc) USE_CL_LAUNCHRC=t ;; +R|--no-rc) USE_CL_LAUNCHRC= ;; -b|--clbuild) USE_CLBUILD=t ;; +b|--no-clbuild) USE_CLBUILD= ;; -o|--output) OUTPUT_FILE="$1" ; shift ;; -x|--execute) OUTPUT_FILE="!" ;; --) if [ "x${OUTPUT_FILE}" = "x!" ] ; then do_it "$@" else ABORT "Extra arguments given but not in --execute mode" fi ;; -X) OPTION -x #OPTION -iw "cl-launch::*arguments*" OPTION -i "(cl-launch::compile-and-load-file (pop cl-launch::*arguments*))" #OPTION -i "$(load_form_0 "(pop cl-launch::*arguments*)")" ;; -X' '*) # DBG "Working around sh script script limitation..." # The below gets the script arguments from the kernel-given argument: # OPTS="$x" ; eval "OPTION $OPTS \"\$@\"" # The kernel lumps everything after the interpreter name in the #! line # into one (optional) argument. The line is limited to 127 characters, # as defined in linux/{fs/binfmt_script.c,include/linux/binfmts.h}. # If we want to allow for a longer in-script command line argument, # and we do if we want to accomodate for inline Lisp code using -i # then we'd need to go fetch the full line and parse it. Here it is: OPTS="$(get_hashbang_arguments "$1")" eval "OPTION $OPTS \"\$@\"" ABORT "The cl-launch script $1 failed to use -X ... --" ;; -u|--update) UPDATE="$1" ; shift ;; -m|--image) LOAD_IMAGE="$1" ; shift ;; -d|--dump) DUMP="$1" ; shift ;; -r|--restart) RESTART="$1" ; shift ;; -B|--backdoor) "$@" ; exit ;; -*=*) DBG "Invalid command line argument '$x'" ; mini_help_abort ;; *=*) # explicit variable definition eval "$(kwote "$x")" ;; *) DBG "Unrecognized command line argument '$x'" ; mini_help_abort ;; esac done } add_init_form () { SOFTWARE_INIT_FORMS="$SOFTWARE_INIT_FORMS${SOFTWARE_INIT_FORMS+ }$1" } add_final_form () { SOFTWARE_FINAL_FORMS="$SOFTWARE_FINAL_FORMS${SOFTWARE_FINAL_FORMS+ }$1" } get_hashbang_arguments () { cut -c3- < "$1" | { read INTERP ARGUMENTS ; ECHO "$ARGUMENTS" ;} } mini_help_abort () { DBG "$HELP_HEADER For help, invoke script with help argument: $PROG -h" ; ABORT } ### Do the job guess_defaults () { if [ -n "$UPDATE" ] ; then SOFTWARE_FILE= : "${OUTPUT_FILE:=$UPDATE}" fi LISP_CONTENT="$SOFTWARE_FILE" } # Configuration system_preferred_lisps () { if [ "x${SOFTWARE_SYSTEM}" = "x$1" ] ; then shift LISPS="$*" DBG "User configuration for system ${SOFTWARE_SYSTEM} overrides LISPS with $(kwote1 "$LISPS")" fi } try_resource_file () { if [ -f "$1" ] ; then . "$1" fi } try_resource_files () { if [ -n "$USE_CL_LAUNCHRC" ] ; then try_resource_file /etc/cl-launchrc try_resource_file "$HOME/.cl-launchrc" fi } print_configuration () { print_var \ SOFTWARE_FILE SOFTWARE_SYSTEM SOFTWARE_INIT_FORMS SOFTWARE_FINAL_FORMS \ SOURCE_REGISTRY INCLUDE_PATH LISPS WRAPPER_CODE \ DUMP RESTART IMAGE_BASE IMAGE_DIR IMAGE \ $EXTRA_CONFIG_VARIABLES } include_configuration () { if [ -n "$UPDATE" ] ; then extract_configuration ECHO "$CONFIGURATION" eval "$CONFIGURATION" else extract_configuration print_configuration fi } ensure_configuration () { extract_configuration if [ -n "$UPDATE" ] ; then eval "$CONFIGURATION" adjust_configuration fi } adjust_configuration () { : INCLUDE_PATH="$INCLUDE_PATH" SOFTWARE_FILE="$SOFTWARE_FILE" if [ -n "$INCLUDE_PATH" ] ; then AUTHOR_NOTE= SHORT_LICENSE= LICENSE_COMMENT= fi case "$SOFTWARE_FILE" in ""|/dev/null) LISP_CONTENT= ;; /*) if [ -n "$INCLUDE_PATH" ] ; then LISP_CONTENT= else LISP_CONTENT="$SOFTWARE_FILE" SOFTWARE_FILE="." fi ;; .) LISP_CONTENT= SOFTWARE_FILE="." ;; -) LISP_CONTENT= SOFTWARE_FILE="-" ;; *) LISP_CONTENT="$SOFTWARE_FILE" SOFTWARE_FILE="." ;; esac : LISP_CONTENT="$LISP_CONTENT" SOFTWARE_FILE="$SOFTWARE_FILE" } include_license () { if [ -n "$DISCLAIMER" ] ; then l= for i in "$DISCLAIMER" "$AUTHOR_NOTE" "$SHORT_LICENSE" "$LICENSE_COMMENT" do l="$l$i${i:+# }" ; done ECHOn "$l" fi hide_license } hide_license () { DISCLAIMER= AUTHOR_NOTE= SHORT_LICENSE= LICENSE_COMMENT= CONTENT_DISCLAIMER= } include_lisp_header () { if [ -z "$INCLUDE_PATH" ] ; then print_lisp_header else echo "#-cl-launch" load_form "$INCLUDE_PATH/launcher.lisp" fi } LAUNCH_FUN=cl-launch::run print_lisp_launch () { ECHOn "($LAUNCH_FUN" if [ -n "${SOURCE_REGISTRY}" ] ; then ECHOn " :source-registry \"$(kwote "$SOURCE_REGISTRY")\"" fi case "${SOFTWARE_FILE}" in /dev/null|"") : ;; -) ECHOn " :load t" ;; .) ECHOn " :load :self" ;; *) ECHOn " :load \"$(kwote "$SOFTWARE_FILE")\"" esac if [ -n "${SOFTWARE_SYSTEM}" ] ; then ECHOn " :system :${SOFTWARE_SYSTEM}" fi if [ -n "${SOFTWARE_FINAL_FORMS}" ] ; then ECHOn " :final \"$(kwote "${SOFTWARE_FINAL_FORMS}")\"" fi if [ -n "${SOFTWARE_INIT_FORMS}" ] ; then ECHOn " :init \"$(kwote "${SOFTWARE_INIT_FORMS}")\"" fi if [ -n "${NO_QUIT}" ] ; then ECHOn " :quit nil" fi if [ -n "${DUMP}" ] ; then ECHOn " :dump \"$(kwote "${DUMP}")\"" fi if [ -n "${RESTART}" ] ; then ECHOn " :restart \"$(kwote "${RESTART}")\"" fi ECHOn ")" } print_lisp_initialization () { echo "#-cl-launched" print_lisp_launch } print_lisp_content () { ECHO "$CONTENT_DISCLAIMER" ECHO "$CONTENT_BEGIN_MARKER" extract_lisp_content } include_lisp_content () { if [ "$SOFTWARE_FILE" = . ] ; then print_lisp_content ; fi } include_shell_wrapper () { ECHO "$BASIC_ENV_CODE" if [ -z "$INCLUDE_PATH" ] ; then print_shell_wrapper else ECHO ". $(kwote1 "$INCLUDE_PATH/wrapper.sh")" fi } include_script_configuration_and_headers () { ECHOn "\ #!/bin/sh #| CL-LAUNCH ${CL_LAUNCH_VERSION} CONFIGURATION " ; include_configuration ; ECHOn "\ # END OF CL-LAUNCH CONFIGURATION # This file was generated by CL-Launch ${CL_LAUNCH_VERSION} " ; include_license } make_loader () { include_script_configuration_and_headers include_shell_wrapper ECHOn ' launch_self "$@" ABORT # |# ' ; include_lisp_stuff } include_lisp_stuff () { include_lisp_header ; ECHOn ' ;;;; CL-LAUNCH LISP INITIALIZATION CODE ' ; print_lisp_initialization ; ECHOn ' ;;;; END OF CL-LAUNCH LISP INITIALIZATION CODE ' ; include_lisp_content } READ () { if [ $UNREAD_DEPTH = 0 ] ; then read -r LINE elif [ $UNREAD_DEPTH = 1 ] ; then UNREAD_DEPTH=0 LINE="$LINE1" elif [ $UNREAD_DEPTH = 2 ] ; then UNREAD_DEPTH=1 LINE="$LINE1" LINE1="$LINE2" else ABORT "error: UNREAD_DEPTH=$UNREAD_DEPTH" fi } UNREAD () { if [ $UNREAD_DEPTH = 0 ] ; then UNREAD_DEPTH=1 LINE1="$1" elif [ $UNREAD_DEPTH = 1 ] ; then UNREAD_DEPTH=2 LINE2="$LINE1" LINE1="$1" else ABORT "error: UNREAD_DEPTH=$UNREAD_DEPTH" fi } extract_configuration () { TRIED_CONFIGURATION=t CONFIGURATION= READ || return : "READ => $LINE" L1="#!/bin/sh" case "$LINE" in "$L1") : "read the SHEBANG" ;; *) : "Not a shell script" ; UNREAD "$LINE" ; return 2 ;; esac if ! READ ; then UNREAD "$L1" ; return 2 ; fi : "READ => $LINE" case "$LINE" in "#| CL-LAUNCH"*" CONFIGURATION") : "read the CL comment start" ;; *) : "Not a CL-Launch script" ; UNREAD "$LINE" ; UNREAD "$L1" ; return 2 ;; esac while READ && #: "READ => $LINE" && case "$LINE" in "# END OF CL-LAUNCH CONFIGURATION") ! : ;; *) : ;; esac do CONFIGURATION="$CONFIGURATION${CONFIGURATION:+ }$LINE" ; done HAS_CONFIGURATION=t } extract_lisp_content () { if [ -z "$TRIED_CONFIGURATION" ] ; then extract_configuration fi if [ -n "$HAS_CONFIGURATION" ] ; then skip_to_marker fi cat_with_unread } cat_with_unread () { while [ $UNREAD_DEPTH != 0 ] ; do READ : "READ => $LINE" ECHO "$LINE" done cat } skip_to_marker () { while READ && #: "READ => $LINE" && case "$LINE" in "$CONTENT_BEGIN_MARKER") ! : ;; *) : ;; esac do : ; done } create_output () { create_file 755 "$OUTPUT_FILE" "$@" } with_input_from () { IN="$1" ; shift case "$IN" in ""|/dev/null) : from null ; "$@" < /dev/null ;; -) : from stdin ; "$@" ;; *) : from file "$IN" ; "$@" < "$IN" ;; esac } with_input () { with_input_from "${UPDATE:-$LISP_CONTENT}" "$@" } with_output () { case "${OUTPUT_FILE}" in "") ABORT "output file not specified" ;; /dev/null) : ;; -) "$@" ;; *) create_output "$@" ;; esac } make_output_file () { if [ -n "$DUMP" ] ; then dump_image_and_continue else do_make_output_file fi } do_make_output_file () { with_output with_input make_loader } execute_code () { run_code "$@" } do_run_code () { eval "$(print_shell_wrapper_body)" if [ -n "$LISP_CONTENT" ] ; then export CL_LAUNCH_FILE="$LISP_CONTENT" else unset CL_LAUNCH_FILE fi LAUNCH_FUN='funcall(intern(string :run):cl-launch)' LAUNCH_FORMS="$(load_form "$PROG";print_lisp_launch)" try_all_lisps "$@" } run_code () { ### Note: when dumping an image, run_code gets locally redefined ### by do_dump_image_and_continue, and restored by do_dump_image do_run_code "$@" } dump_image_and_continue () { case "$UPDATE" in -) SOFTWARE_CODE="$(cat)" ECHO "$SOFTWARE_CODE" | do_dump_image_and_continue "$@" ;; *) do_dump_image_and_continue "$@" ;; esac } do_dump_image_and_continue () { ORIG_WRAPPER_CODE="$WRAPPER_CODE" run_code () { WRAPPER_CODE="$WRAPPER_CODE DO_LISP=do_dump_image" do_run_code "$@" } if [ "x$DUMP" = "x!" ] ; then if [ "x$OUTPUT_FILE" = "x!" ] ; then abort 14 "Image dump required but neither dump file nor output file specified" else DUMP="$OUTPUT_FILE" fi fi IMAGE= execute_code "$@" } do_dump_image () { : do_dump_image "$@" run_code () { do_run_code "$@" } if [ -n "$INCLUDE_PATH" ] ; then export CL_LAUNCH_HEADER="$INCLUDE_PATH/launcher.lisp" else export CL_LAUNCH_HEADER="$PROG" fi if [ "x$IMAGE_ARG" = "xNOT_SUPPORTED_YET" ] ; then abort 13 "Image dumping not supported with implementation $IMPL. Try specifying a supported implementation with option --lisp (or \$LISP)" fi if [ -n "$STANDALONE_EXECUTABLE" ] ; then if [ "x$DUMP" = "x$OUTPUT_FILE" ] ; then # disabled optimization: also for || [ "x$OUTPUT_FILE" = "x!" ] # as it doesn't play nice with older versions of SBCL, ECL, etc., # that do not support standalone executables. export CL_LAUNCH_STANDALONE=t fi else if [ "x$DUMP" = "x$OUTPUT_FILE" ] ; then abort 15 "This implementation does not support dumping a standalone executable image" fi fi license_information # Use LOAD_IMAGE if it exists compute_image_path "$LOAD_IMAGE" ( do_exec_lisp ) || abort 22 "Failed to dump an image" case "$UPDATE" in -) ECHO "$SOFTWARE_CODE" | use_dumped_image "$@" ;; *) use_dumped_image "$@" ;; esac } use_dumped_image () { : use_dumped_image $OUTPUT_FILE compute_image_path "$DUMP" case "${CL_LAUNCH_STANDALONE}:${OUTPUT_FILE}" in :!) invoke_image "$@" ;; :*) make_image_invoker ;; t:!) if [ -n "$CL_LAUNCH_VERBOSE" ] ; then set -x ; fi ; ${IMAGE} "$@" ;; t:*) ;; esac } make_image_invoker () { WRAPPER_CODE="$ORIG_WRAPPER_CODE" with_output with_input make_image_invocation_script } compute_image_path () { if [ -n "$1" ] ; then IMAGE_BASE="$(basename "$1")" IMAGE_DIR="${INCLUDE_PATH:-$(dirname "$1")}" IMAGE=${IMAGE_DIR}/${IMAGE_BASE} else IMAGE_BASE= IMAGE_DIR= IMAGE= fi } prepare_invocation_configuration () { LISP=$IMPL EXTRA_CONFIG_VARIABLES="LISP $OPTIONS_ARG" if eval "[ -n \"\$$BIN_ARG\" ]" ; then EXTRA_CONFIG_VARIABLES="$EXTRA_CONFIG_VARIABLES $BIN_ARG" fi } make_image_invocation_script () { prepare_invocation_configuration include_script_configuration_and_headers make_image_invocation include_lisp_content } make_image_invocation () { include_shell_wrapper if [ "x$IMAGE_ARG" = xEXECUTABLE_IMAGE ] ; then echo "$BIN_ARG=$IMAGE" fi cat<&2 t_args "--include ..." t_next "$@" --include "$PWD" } t_inc1 () { TFILE=clt-src.lisp ; t_inc "$@" } t_inc2 () { TINC2=t TFILE="$PWD/clt-src.lisp" ; t_inc "$@" } t_noinc () { t_args "--no-include" t_next "$@" --no-include } t_update () { t_args "--update ..." TORIG=$CLOUT.orig ; cp -f $CLOUT $TORIG t_next "$@" --update $CLOUT } t_noupdate () { TORIG= t_next "$@" } t_end_out () { t_args "--output ... ; out.sh ..." TOUT=$CLOUT t_make "$@" --output $CLOUT t_check $CLOUT } t_end_exec () { t_args "--execute -- ..." t_check t_make "$@" --execute -- } t_make () { XDO t_$TEST_SHELL -x $PROG "$@" } t_check () { echo "cl-launch $ARGS" PATH=${PWD}:$PATH "$@" "won" | tee clt.log >&2 : RESULTS: "$(cat clt.log)" if [ -n "$TORIG" ] && [ -n "$TOUT" ] && ! cmp --quiet $TOUT $TORIG ; then echo "the updated file differs from the original one, although execution might not show the difference. Double check that with: diff -uN $TORIG $TOUT | less - $TORIG " t_check_failed elif [ 0 = "$(grep -c OK < clt.log)" ] || [ 0 != "$(grep -c 'ERROR\(:\| DETECTED\)' < clt.log)" ] ; then t_check_failed else t_check_success fi } t_check_success () { echo "success with test $NUM :-)" return 0 } t_check_failed () { echo "FAILURE with test $NUM :-(" [ -n "$NUM" ] && echo "You may restart from this test with: $PROG -l $(kwote1 "$LISPS") -B tests $NUM or $PROG -l $(kwote1 "$LISPS") -B tests $(printf %02d $(( ( $num / 4 ) * 4 )) )" [ -n "$TCURR" ] && echo "You may re-run just this test with: $PROG -B redo_test $TEST_SHELL $LISP $TCURR" [ -n "$NO_STOP" ] || ABORT "FIX THAT BUG!" } t_out () { t_env ; TEXEC= ; t_begin "$@" } t_exec () { t_env ; TEXEC=t ; t_begin "$@" } clisp_tests () { LISPS=clisp ; tests "$@" ;} all_tests () { NO_STOP=t ; tests "$@" ;} tests () { do_tests "$@" 2> tests.log } detect_program () { which "$1" 2>&1 > /dev/null } detect_shells () { # add something wrt ksh, pdksh ? TEST_SHELLS= for i in sh posh dash zsh pdksh bash busybox ; do if detect_program $i ; then TEST_SHELLS="$TEST_SHELLS $i" fi done } t_sh () { sh "$@" ;} t_bash () { bash "$@" ;} t_posh () { posh "$@" ;} t_pdksh () { pdksh "$@" ;} t_dash () { dash "$@" ;} t_zsh () { zsh -fy "$@" ;} t_busybox () { busybox sh "$@" ;} shell_tests () { detect_shells tests "$@" } do_tests () { if [ -n "$TEST_SHELLS" ] ; then echo "Using test shells $TEST_SHELLS" fi t_env num=0 MIN=${1:-0} MAX=${2:-999999} export LISP # Use this with # cl-launch.sh -B test # beware, it will clobber then remove a lot of file clt-* # and exercise your Lisp fasl cache for LISP in $LISPS ; do case $LISP in gcl) ;; # doesn't support asdf. *) export ASDF_DIR="$(case "$LISP" in xcl) LISP=sbcl ;; esac ; $PROG --lisp "$LISP" --quiet --system asdf --init '(cl-launch::finish-outputs)(format t "~%~A-~A: ~A~%" "SOURCE" "REGISTRY" (asdf:system-source-directory :asdf))' | grep ^SOURCE-REGISTRY: | tail -1 | cut -d' ' -f2- )" ;; esac for TEST_SHELL in ${TEST_SHELLS:-${TEST_SHELL:-sh}} ; do echo "Using lisp implementation $LISP with test shell $TEST_SHELL" for TM in "" "image " ; do for TD in "" "dump " "dump_ " ; do case "$TM:$TD:$LISP" in # we don't know how to dump from a dump with ECL image*:dump*:ecl) ;; # we don't know how to dump at all with ABCL, XCL *:dump*:abcl|image*:*:abcl|*:dump*:xcl|image*:*:xcl) ;; # Actually, even dumping is largely broken on ECL as of 3.010 + ASDF 2.015 *:dump*:ecl|image*:*:ecl) ;; *) for IF in "noinc" "noinc file" "inc" "inc1 file" "inc2 file" ; do TDIF="$TM$TD$IF" for TS in "" " system" ; do TDIFS="$TDIF$TS" case "$TD:$TS:$LISP" in *:" system:gcl") ;; # no ASDF for GCL 2.6 dump_*:cmucl*|dump_*:gcl*|dump_*:allegro|dump_*:ccl|dump_*:clisp|dump_*:scl) : invalid or unsupported combo ;; # actually only available for ecl and sbcl *) for TI in "noinit" "init" ; do TDIFSI="$TDIFS $TI" case "$TDIFSI" in *"inc noinit") : skipping invalid combination ;; *) for TU in "noupdate" "update" ; do TUDIFSI="$TU $TDIFSI" for TO in "exec" "out" ; do case "$TU:$TO:$TD" in update:*:dump_*) : invalid combo ;; *:exec:dump_*) : invalid combo ;; *) TEUDIFSI="$TO $TUDIFSI" do_test $TEUDIFSI ;; esac ; done ; done ;; esac ; done ;; esac ; done ; done ; esac ; done ; done ; done ; done } redo_test () { export TEST_SHELL="$1" LISPS="$2" LISP="$2" ; shift 2 do_test "$@" } do_test () { if [ $MIN -le $num ] && [ $num -le $MAX ] ; then TCURR="$*" if [ -n "$num" ] ; then NUM=$(printf "%02d" $num) case "$*" in *out*noupdate*) # If we don't clean between runs of test/update, then # we have bizarre transient failures at test 12 or 40 when we e.g. # DEBUG_RACE_CONDITION=t cl-launch -l clisp -B tests 8 12 # There is some race condition somewhere in the cacheing layer, # and even though (trace ...) shows that cl-launch does try to # recompile then file, when it loads, it still find the old version in the cache. [ -n "$DEBUG_RACE_CONDITION" ] || test_clean ;; esac fi eval "$(for i ; do ECHOn " t_$i" ; done)" fi num=$(($num+1)) } test () { tests $@ && test_clean } test_clean () { rm -rfv clt* ~/.cache/common-lisp/*/$(pwd)/clt* >&2 } fakeccl () { DO export LISP=ccl CCL=sbcl CCL_OPTIONS="--noinform --sysinit /dev/null --userinit /dev/null --eval (make-package':ccl) --eval (setf(symbol-function'ccl::quit)(symbol-function'sb-ext:quit)) --eval (setf(symbol-function'ccl::getenv)(symbol-function'sb-ext:posix-getenv))" OPTION "$@" } update () { wget -O cl-launch.sh "${CL_LAUNCH_URL}" chmod a+x cl-launch.sh } install () { if [ -z "$INCLUDE_PATH" ] || [ -z "$OUTPUT_FILE" ] ; then ABORT "example usage: $PROG -I /usr/share/common-lisp/source/cl-launch \\ -l '$DEFAULT_LISPS' \\ -o /usr/bin/cl-launch -B install" fi install_path install_bin } print_cl_launch_asd () { cat< $LOADFILE < /dev/null`" ; then return 0 else return 1 fi } trylisp () { IMPL="$1" ; shift implementation_${IMPL} "$@" } do_exec_lisp () { if [ -n "$IMAGE" ] ; then if [ "x$IMAGE_ARG" = xEXECUTABLE_IMAGE ] ; then LISP_BIN= IMAGE_OPT= else IMAGE_OPT="$IMAGE_ARG" fi fi $EXEC_LISP "$@" } no_implementation_found () { ABORT "$PROG: Cannot find a supported lisp implementation. Tried the following: $*" } ensure_implementation () { trylisp "$1" || no_implementation_found "$1" } try_all_lisps () { for l in $LISP $LISPS ; do if trylisp $l ; then $DO_LISP "$@" return 0 fi done no_implementation_found "$LISP $LISPS" } exec_lisp () { # SBCL wants only one form per --eval so we need put everything in one progn. # However we also want any in-package form to be evaluated before any of the # remaining forms is read, so we get it to be evaluated at read-time as the # first thing in the main progn. # GNU clisp allows multiple forms per -x but prints the result of every form # evaluated and so we also need put everything in a single progn, and that progn # must quit before it may return to the clisp frame that would print its value. # CMUCL allows multiple forms per -eval and won't print values, so is ok anyway. # I don't know about other Lisps, but they will all work this way. LAUNCH_FORM="${PROGN}${MAYBE_PACKAGE_FORM}${HASH_BANG_FORM}${LAUNCH_FORMS}${NGORP}" ### This is partial support for CLBUILD. if [ -n "$USE_CLBUILD" ] ; then if [ -z "$IMAGE_OPT" ] ; then OPTIONS= else ABORT "Cannot use clbuild with a non-executable image different from clbuild's" fi fi if [ -n "$CL_LAUNCH_VERBOSE" ] ; then set -x ; fi exec $LISP_BIN $IMAGE_OPT $IMAGE $OPTIONS $EVAL "$LAUNCH_FORM" $ENDARGS "$@" } launch_self () { LAUNCH_FORMS="$(load_form "$PROG")" try_all_lisps "$@" } invoke_image () { if [ "x$IMAGE_ARG" = xEXECUTABLE_IMAGE ] ; then LISP_BIN= IMAGE_OPT= else IMAGE_OPT="$IMAGE_ARG" fi PACKAGE_FORM= HASH_BANG_FORM= LAUNCH_FORMS="(asdf/image:restore-image)" "$EXEC_LISP" "$@" } export CL_LAUNCH_PID=$$ export CL_LAUNCH_FILE="$PROG" ## execute configuration-provided code eval "$WRAPPER_CODE" ### END OF CL-LAUNCH SHELL WRAPPER EOF } : ' Useful tidbit for dichotomy-debugging Lisp code: (defvar *x* 0) (defun xx () (format t "*x* ~D~%" (incf *x*) (finish-output))) (xx) (xx) ' cl_fragment () { if [ -n "$CL_HEADER" ] ; then ECHO "#-cl-launch" fi cat } do_print_lisp_implementation () { ECHO "$IMPL" } print_lisp_implementation () { eval "$(print_shell_wrapper_body)" DO_LISP=do_print_lisp_implementation try_all_lisps } do_print_lisp_binary_path () { ECHO "$LISP_BIN" } print_lisp_binary_path () { eval "$(print_shell_wrapper_body)" DO_LISP=do_print_lisp_binary_path try_all_lisps } print_lisp_header () { CL_HEADER=t print_lisp_code echo ";;;;; Return to the default package." echo "(in-package :cl-user)" print_lisp_code_bottom } print_lisp_launcher () { CL_HEADER= print_lisp_code echo ; echo "(cl-launch::compute-arguments)" print_lisp_code_bottom } print_lisp_setup () { OPTION -q print_lisp_launcher OPTION -x -s asdf -i "(let ((*package* (find-package :cl-launch))) (format t \"(cl-launch::initialize-asdf ~S)~%\" \"$(kwote $SOURCE_REGISTRY)\"))" -- } print_lisp_code () { echo "#+xcvb (module (:build-depends-on () :depends-on (\"/asdf\")))" echo "#| ;;; cl-launch ${CL_LAUNCH_VERSION} lisp header" include_license # HACK: this whole file is itself readable as Lisp code, and its meaning # is then that of the cl-launch lisp header code enclosed herein. # |# Last bit of Karma cat<<'NIL' |# ;;;; Silence our lisp implementation for quiet batch use... #| We'd like to evaluate as little as possible of the code without compilation. This poses a typical bootstrapping problem: the more sophistication we want to distinguish what to put where in what dynamic environment, the more code we have to evaluate before we may actually load compiled files. And, then, it is a waste of time to try to compile said code into a file. Moving things to the shell can only help so much, and reduces flexibility. Our best bet is to tell sbcl or cmucl to not try to optimize too hard. |# NIL ":" 't #-cl-launch ;'; cl_fragment<<'NIL' (eval-when (:compile-toplevel :load-toplevel :execute) (setf *print-readably* nil ; allegro 5.0 notably will bork without this *print-level* nil *load-verbose* nil *compile-verbose* nil *compile-print* nil *load-print* nil) (defvar cl-user::*asdf-directory-pathname* (merge-pathnames #p"cl/asdf/" (user-homedir-pathname)) "directory where ASDF is installed, if not provided by your implementation.") (unless (member :asdf *features*) (ignore-errors (funcall 'require "asdf"))) (unless (member :asdf *features*) (ignore-errors (load (merge-pathnames "build/asdf.lisp" cl-user::*asdf-directory-pathname*)))) (unless (member :asdf *features*) (error "Could not load ASDF.")) (in-package :asdf)) NIL ":" 't #-cl-launch ;'; cl_fragment<<'NIL' ;; Make sure we use the latest ASDF available. (eval-when (:compile-toplevel :load-toplevel :execute) (ignore-errors (pushnew cl-user::*asdf-directory-pathname* *central-registry*) (defparameter asdf::*asdf-verbose* nil) ;; for old versions of ASDF 2 (setf *load-verbose* nil asdf:*verbose-out* nil) (handler-bind ((warning #'muffle-warning)) (operate 'load-op :asdf :verbose nil))) (unless (member :asdf3 *features*) (unless (asdf::version-satisfies (asdf::asdf-version) "2.15") (error "CL-Launch requires ASDF 2.015 or later")) ; fallback feature (asdf:load-system :asdf-driver)) ;;;; Ensure package hygiene #+gcl2.6 (unless (find-package :cl-launch) (make-package :cl-launch :use '(:lisp))) #-gcl2.6 (defpackage :cl-launch (:use :common-lisp :asdf/driver :asdf) (:export #:compile-and-load-file)) (in-package :cl-launch)) NIL ":" 't #-cl-launch ;'; cl_fragment<<'NIL' ;;;; CL-Launch Initialization code (progn (defvar *cl-launch-file* nil) ;; name of this very file (defvar *verbose* nil) (progn (defun call-with-new-file (n f) (with-open-file (o n :direction :output :if-exists :error :if-does-not-exist :create) (funcall f o))) (defun dump-stream-to-file (i n) (call-with-new-file n (lambda (o) (copy-stream-to-stream i o)))) (defun dump-sexp-to-file (x n) (call-with-new-file n (lambda (o) (write x :stream o :pretty t :readably t)))) (defvar *temporary-filenames* nil) (defvar *temporary-file-prefix* (format nil "~Acl-launch-~A-" asdf/driver:*temporary-directory* (getenvp "CL_LAUNCH_PID"))) (defun make-temporary-filename (x) (concatenate 'string *temporary-file-prefix* x)) (defun register-temporary-filename (n) (push n *temporary-filenames*) n) (defun temporary-filename (x) (register-temporary-filename (make-temporary-filename x))) (defun temporary-file-from-foo (dumper arg x) (let ((n (temporary-filename x))) (funcall dumper arg n) n)) (defun temporary-file-from-stream (i x) (temporary-file-from-foo #'dump-stream-to-file i x)) (defun temporary-file-from-string (i x) (temporary-file-from-foo #'princ i x)) (defun temporary-file-from-sexp (i x) (temporary-file-from-foo #'dump-sexp-to-file i x)) (defun temporary-file-from-file (f x) (with-open-file (i f :direction :input :if-does-not-exist :error) (temporary-file-from-stream i x))) (defun ensure-lisp-file-name (x &optional (name "load.lisp")) (let ((p (pathname x))) (if (equal (pathname-type p) "lisp") p (temporary-file-from-file p name)))) (defun ensure-lisp-file (x &optional (name "load.lisp")) (cond ((eq x t) (temporary-file-from-stream *standard-input* "load.lisp")) ((streamp x) (temporary-file-from-stream x "load.lisp")) ((eq x :self) (ensure-lisp-file-name *cl-launch-file* name)) (t (ensure-lisp-file-name x name)))) (defun cleanup-temporary-files () (loop :for n = (pop *temporary-filenames*) :while n :do (ignore-errors (delete-file n))))) (defun file-newer-p (new-file old-file) "Returns true if NEW-FILE is strictly newer than OLD-FILE." (> (file-write-date new-file) (file-write-date old-file))) (defun compile-and-load-file (source &key force-recompile (verbose *verbose*) (load t) output-file) "compiles and load specified SOURCE file, if either required by keyword argument FORCE-RECOMPILE, or not yet existing, or not up-to-date. Keyword argument VERBOSE specifies whether to be verbose. Returns two values: the fasl path, and T if the file was (re)compiled" ;; When in doubt, don't trust - recompile. Indeed, there are ;; edge cases cases when on the first time of compiling a simple ;; auto-generated file (e.g. from the automated test suite), the ;; fasl ends up being written to disk within the same second as the ;; source was produced, which cannot be distinguished from the ;; reverse case where the source code was produced in the same split ;; second as the previous version was done compiling. Could be ;; tricky if a big system needs be recompiled as a dependency on an ;; automatically generated file, but for cl-launch those ;; dependencies are not detected anyway (BAD). If/when they are, and ;; lacking better timestamps than the filesystem provides, you ;; should sleep after you generate your source code. #+(and gcl (not gcl2.6)) (setf source (ensure-lisp-file-name source (concatenate 'string (pathname-name source) ".lisp"))) (let* ((truesource (truename source)) (fasl (or output-file (compile-file-pathname* truesource))) (compiled-p (when (or force-recompile (not (probe-file fasl)) (not (file-newer-p fasl source))) (ensure-directories-exist fasl) (multiple-value-bind (path warnings failures) (compile-file* truesource :output-file fasl) (declare (ignorable warnings failures)) (unless (equal (truename fasl) (truename path)) (error "CL-Launch: file compiled to ~A, expected ~A" path fasl)) (when failures (error "CL-Launch: failures while compiling ~A" source))) t))) (when load (load* fasl :verbose verbose)) (values fasl compiled-p))) (defun load-file (source &key output-file) (declare (ignorable output-file)) #-(or gcl2.6 (and ecl (not dlopen))) (compile-and-load-file source :verbose *verbose* :output-file output-file) #+gcl2.6 (let* ((pn (parse-namestring source))) ; when compiling, gcl 2.6 will always (if (pathname-type pn) ; add a type .lsp if type is missing, to avoid compilation (compile-and-load-file source :verbose *verbose* :output-file output-file) (load source :verbose *verbose*))) #+(and ecl (not dlopen)) (load source :verbose *verbose*)) (defun compute-arguments () (setf *cl-launch-file* (getenvp "CL_LAUNCH_FILE") *verbose* (when (getenvp "CL_LAUNCH_VERBOSE") t))) ;; We provide cl-launch, no need to go looking for it further! (unless (fboundp 'asdf::register-preloaded-system) (eval '(progn (defvar asdf::*preloaded-systems* (make-hash-table :test 'equal)) (defun asdf::sysdef-preloaded-system-search (requested) (let ((name (coerce-name requested))) (multiple-value-bind (keys foundp) (gethash name asdf::*preloaded-systems*) (when foundp (apply 'make-instance 'system :name name :source-file (getf keys :source-file) keys))))) (defun asdf::register-preloaded-system (system-name &rest keys) (setf (gethash (coerce-name system-name) asdf::*preloaded-systems*) keys)) (asdf::appendf asdf:*system-definition-search-functions* '(asdf::sysdef-preloaded-system-search))))) (asdf::register-preloaded-system "cl-launch") (defun do-build-and-load (load system restart final init quit) (etypecase load (null nil) ((eql t) (load* nil)) (stream (load* load)) ((eql :self) (load-file *cl-launch-file*)) ((or pathname string) (load-file load))) (when system (load-systems system)) (when final (load-from-string final)) (setf *image-prelude* init *image-entry-point* (when restart (ensure-function restart)) *lisp-interaction* (not quit))) (defun build-and-load (load system restart final init quit) (unwind-protect (do-build-and-load load system restart final init quit) #+(and gcl (not gcl2.6)) (cleanup-temporary-files))) (defun build-and-run (load system restart final init quit) (build-and-load load system restart final init quit) (restore-image)) #-ecl (defun build-and-dump (dump load system restart final init quit) (build-and-load load system restart final init quit) (dump-image dump :executable (getenvp "CL_LAUNCH_STANDALONE")) (quit 0)) ;;; Attempt at compiling directly with ECL's make-build and temporary wrapper asd's #+ecl (defvar *in-compile* nil) #+ecl (defun build-and-dump (dump load system restart final init quit) (unwind-protect (let* ((*compile-verbose* *verbose*) (*in-compile* t) (c::*suppress-compiler-warnings* (not *verbose*)) (c::*suppress-compiler-notes* (not *verbose*)) (*features* (remove :cl-launch *features*)) (header (or *compile-file-pathname* *load-pathname* (getenvp "CL_LAUNCH_HEADER"))) (header-file (ensure-lisp-file header "header.lisp")) (load-file (when load (ensure-lisp-file load "load.lisp"))) (standalone (getenvp "CL_LAUNCH_STANDALONE")) (init-code `(progn (unless *in-compile* (setf *package* (find-package :cl-user) *load-verbose* nil *dumped* ,(if standalone :standalone :wrapped) *arguments* nil ;;,(symbol* :asdf :*source-registry*) nil ;;,(symbol* :asdf :*output-translations*) nil ,@(when restart `(*restart* (read-function ,restart))) *init-forms* ,init) ,@(unless quit `(*quit* nil))) ,(if standalone '(asdf/image:restore-image) '(si::top-level)))) (final-file (temporary-file-from-string final "final.lisp")) (init-file (temporary-file-from-sexp init-code "init.lisp")) (prefix-sys (pathname-name (temporary-filename "prefix"))) (program-sys (pathname-name (temporary-filename "program"))) (prefix-sysdef `(,(symbol* :asdf :defsystem) ,prefix-sys :depends-on () :serial t :components ((:file "header" :pathname ,(truename header-file)) ,@(when load-file `((:file "load" :pathname ,(truename load-file))))))) (program-sysdef `(,(symbol* :asdf :defsystem) ,program-sys :serial t :depends-on (,prefix-sys ,@(when system `(,system)) ,prefix-sys) ;; have the prefix first, whichever order asdf traverses :components ((:file "final" :pathname ,(truename final-file)) (:file "init" :pathname ,(truename init-file))))) (prefix-asd (temporary-file-from-sexp prefix-sysdef "prefix.asd")) (program-asd (temporary-file-from-sexp program-sysdef "program.asd"))) (load prefix-asd) (load program-asd) (call :asdf :make-build program-sys :type :program) (si:system (format nil "cp -p ~S ~S" (namestring (first (call :asdf :output-files (make-instance (symbol* :asdf :program-op)) (call :asdf :find-system program-sys)))) dump))) (cleanup-temporary-files)) (quit)) ;;(handler-bind (#+ecl (si::simple-package-error (lambda (x) (declare (ignore x)) (invoke-restart 'continue)))) (format *trace-output* "Enabling some debugging~%") #+ecl (trace c::builder c::build-fasl c:build-static-library c:build-program ensure-lisp-file-name ensure-lisp-file cleanup-temporary-files delete-package) #+ecl (setf c::*compiler-break-enable* t) (trace load-file load-systems build-and-dump build-and-run run compile-and-load-file load compile-file) (setf *verbose* t *load-verbose* t *compile-verbose* t)) (defun run (&key source-registry load system dump restart final init (quit 0)) (pushnew :cl-launched *features*) (compute-arguments) (when source-registry (initialize-source-registry source-registry)) (if dump (build-and-dump dump load system restart final init quit) (build-and-run load system restart final init quit))) (pushnew :cl-launch *features*)) NIL #| } print_lisp_code_bottom () { # |# ":" ; cat<<'NIL' ;;; END OF CL-LAUNCH LISP HEADER NIL #| } ### There we are. Now do the job [ $# -gt 0 ] || mini_help_abort all "$@" ; exit # |# ; What follows is Lisp code available when loading this file cl-launch-3.22.1/debian/000077500000000000000000000000001222736422200146715ustar00rootroot00000000000000cl-launch-3.22.1/debian/changelog000066400000000000000000000733321222736422200165530ustar00rootroot00000000000000cl-launch (3.22.1-1) unstable; urgency=low * Tweak to hush ASDF upgrade. Minor edit of documentation. -- Francois-Rene Rideau Mon, 16 May 2013 01:22:49 -0400 cl-launch (3.22-1) unstable; urgency=low * Release of cl-launch to match ASDF 3.0.0 -- Francois-Rene Rideau Mon, 16 May 2013 01:22:49 -0400 cl-launch (3.019-1) unstable; urgency=low * Use TMPDIR, not TMP. * Ensure directories from getenv or not read as file pathnames. * Preliminary support for MKCL -- Francois-Rene Rideau Mon, 15 Oct 2012 19:49:12 -0400 cl-launch (3.018-1) unstable; urgency=low * Work with the newest SBCL's sb-ext:exit replacing sb-ext:quit. * Document that GCL is dead, and how to produce a LispWorks image. -- Francois-Rene Rideau Mon, 14 May 2012 14:05:33 -0400 cl-launch (3.017-1) unstable; urgency=low * let cl-launch work with XCVB even when asdf.asd isn't installed. -- Francois-Rene Rideau Sat, 03 Mar 2012 21:19:14 -0500 cl-launch (3.016-1) unstable; urgency=low * More fixes for ABCL, CLISP, ECL, GCL. -- Francois-Rene Rideau Sat, 03 Mar 2012 21:18:55 -0500 cl-launch (3.015-1) unstable; urgency=low * CLISP: don't (setf *source-file-types* nil custom:*compiled-file-types nil) anymore, because it prevents (require "linux") from working. * ASDF: it's best to always (asdf:load-system :asdf) as soon as we have ASDF2 so refactor load-asdf accordingly. -- Francois-Rene Rideau Tue, 18 Oct 2011 19:29:03 -0400 cl-launch (3.014-1) unstable; urgency=low * XCL now has --noinform, use it! -- Francois-Rene Rideau Thu, 29 Sep 2011 21:57:08 -0400 cl-launch (3.013-2) unstable; urgency=low * Bring it to the latest debian standards -- Francois-Rene Rideau Thu, 29 Sep 2011 21:57:08 -0400 cl-launch (3.013-1) unstable; urgency=low * Gratuitous upgrade to achieve a patchless debian package. -- Francois-Rene Rideau Thu, 29 Sep 2011 20:29:59 -0400 cl-launch (3.012-1) unstable; urgency=low * Simple optimization assuming recentish CMUCL. -- Francois-Rene Rideau Mon, 26 Sep 2011 17:53:04 -0400 cl-launch (3.011-1) unstable; urgency=low * CCL now has standalone applications! * Use (require "asdf") instead of (require :asdf) because of CLISP. -- Francois-Rene Rideau Tue, 07 Jun 2011 18:09:00 -0400 cl-launch (3.010-1) unstable; urgency=low * --final argument (in 3.009) allows to run a form *before* the image is dumped. To do the right thing on ECL, you probably want to use #. to do at read-time things that must be done while building. * Have cl-launch.asd depend on ASDF 2.015. Actually, ASDF must be upgraded to 2.015 *before* anything that system that depends on ASDF and relies on any ASDF extensions is loaded. -- Francois-Rene Rideau Tue, 31 May 2011 15:02:23 -0400 cl-launch (3.008-1) unstable; urgency=low * Always upgrade ASDF before use. Avoids horrible bugs due to ASDF being upgraded while being used. -- Francois-Rene Rideau Wed, 13 Apr 2011 01:08:53 -0400 cl-launch (3.007-1) unstable; urgency=low * Support XCL (requires ASDF 2.014.2) * Fix $abcl -> $ABCL in ABCL support. -- Francois-Rene Rideau Thu, 31 Mar 2011 10:53:35 -0400 cl-launch (3.006-1) unstable; urgency=low * Remove some debugging output left by mistake. -- Francois-Rene Rideau Sun, 20 Mar 2011 13:54:26 -0400 cl-launch (3.005-1) unstable; urgency=low * Fix print_lisp_setup, broken by recent ASDF2-related changes. -- Francois-Rene Rideau Thu, 04 Nov 2010 14:52:10 -0400 cl-launch (3.004-1) unstable; urgency=low * Fix support for ABCL at 0.22.0 * Be ready for ASDF 2.010 as it requires absolute pathnames in source registry. * Avoid some warnings in allegro -- Francois-Rene Rideau Thu, 21 Oct 2010 13:49:59 -0700 cl-launch (3.003-1) unstable; urgency=low * Don't try to load ASDF when not needed. When needed, follow XDG. * Also try to fix ECL. -- Francois-Rene Rideau Thu, 23 Sep 2010 14:10:39 -0400 cl-launch (3.002-1) unstable; urgency=low * Fix CLISP support broken by bad editing in 3.001. -- Francois-Rene Rideau Fri, 17 Sep 2010 17:43:24 -0400 cl-launch (3.001-1) unstable; urgency=low * Add limited ABCL and SCL support. -- Francois-Rene Rideau Tue, 17 Aug 2010 14:40:59 -0400 cl-launch (3.000-1) unstable; urgency=low * Release cl-launch 3 to work with ASDF 2. -- Francois-Rene Rideau Wed, 09 Jun 2010 16:30:15 -0400 cl-launch (2.907-1) unstable; urgency=low * eliminate a warning when compiling with ECL. * simplify the hash bang form. -- Francois-Rene Rideau Wed, 05 May 2010 11:22:24 -0400 cl-launch (2.906-2) unstable; urgency=low * Update debian package information * Switch to dpkg-source 3.0 (quilt) format -- Francois-Rene Rideau Thu, 29 Apr 2010 12:30:34 -0400 cl-launch (2.906-1) unstable; urgency=low * improve support for LispWorks and Allegro. -- Francois-Rene Rideau Thu, 29 Apr 2010 10:03:26 -0400 cl-launch (2.905-1) unstable; urgency=low * don't import find-system, use asdf:find-system. * shuffle code around to make ecl and gcl happy: ecl won't load asdf.lisp, only a compiled version, so oblige. gcl 2.6 happy w/o asdf. -- Francois-Rene Rideau Wed, 28 Apr 2010 20:24:46 -0400 cl-launch (2.904-1) unstable; urgency=low * correctly hush cl_fragment in all cases -- YEAH! * require ASDF 1.702. -- Francois-Rene Rideau Thu, 15 Apr 2010 22:33:35 -0400 cl-launch (2.903-1) unstable; urgency=low * play better with recent XCVB by depending on ASDF 2. * better verbose treatment when loading from stream. * depend on ASDF 1.677. -- Francois-Rene Rideau Wed, 14 Apr 2010 02:13:27 -0400 cl-launch (2.902-1) unstable; urgency=low * ASDF 2 tweak: have cl-launch.asd depend on asdf.asd to avoid asdf upgrade nightmare. -- Francois-Rene Rideau Sat, 03 Apr 2010 00:24:55 -0400 cl-launch (2.901-1) unstable; urgency=low * ASDF 2 support: add --source-registry, deprecate --path and co. * Fix ASDF loading again (dolist has an implicit block nil). * Update tests. -- Francois-Rene Rideau Fri, 19 Mar 2010 00:59:49 -0400 cl-launch (2.900-1) unstable; urgency=low * New CL-Launch, to be used with ASDF 2, and dropping support for ASDF 1. This preliminary version is called 2.900. TODO: add proper support for source-registry, clean things up, etc. When ASDF 2 is released, we should release cl-launch 3.000 with it. Maybe also take heed of Xach's http://www.xach.com/lisp/buildapp/ -- Francois-Rene Rideau Thu, 18 Mar 2010 22:47:42 -0400 cl-launch (2.36-1) unstable; urgency=low * Note that c-l-c's support for ECL is fixed in 7.0. * Recommend c-l-c 7.0 in the debian control. * disable output redirection with asdf2 (has its own system, AOT). * Reformat loops -- Francois-Rene Rideau Tue, 04 Feb 2010 01:19:39 -0500 cl-launch (2.35-1) unstable; urgency=low * Avoid some potential warnings with *asdf-path*: don't refer to a special in the non-toplevel form where I'm defining it. -- Francois-Rene Rideau Tue, 17 Nov 2009 13:54:39 -0500 cl-launch (2.34-1) unstable; urgency=low * in exclude-from-cache, ignore empty strings as well as NILs -- Francois-Rene Rideau Mon, 09 Nov 2009 22:34:28 -0500 cl-launch (2.33-1) unstable; urgency=low * Fixed ECL support. Passes full 234 tests with the latest 9.11.1 from CVS: cl-launch -l ecl -B tests -- Francois-Rene Rideau Mon, 09 Nov 2009 09:46:41 -0500 cl-launch (2.32-1) unstable; urgency=low * better debugging for :load * TODO: fix ecl which has regressed since 0.x -- Francois-Rene Rideau Sun, 08 Nov 2009 14:53:13 -0500 cl-launch (2.31-1) unstable; urgency=low * modify resume so that it's easier to start from an image that has cl-launch loaded but not configured. * passed tests with cl-launch -l clisp -B shell_tests cl-launch -l 'sbcl ccl ecl' -B tests -- Francois-Rene Rideau Fri, 06 Nov 2009 11:21:34 -0500 cl-launch (2.30-1) unstable; urgency=low * use XCVB .403 enhanced :build-depends-on support for Lisp modules. -- Francois-Rene Rideau Tue, 20 Oct 2009 20:24:16 -0400 cl-launch (2.29-1) unstable; urgency=low * don't try to exclude root if it is disabled. -- Francois-Rene Rideau Tue, 20 Oct 2009 20:24:10 -0400 cl-launch (2.28-1) unstable; urgency=low * unbreak arguments for clisp -- Francois-Rene Rideau Fri, 02 Oct 2009 12:57:21 -0400 cl-launch (2.27-1) unstable; urgency=low * Fix issues regarding cl-launch.asd and its installer. -- Francois-Rene Rideau Fri, 02 Oct 2009 10:18:50 -0400 cl-launch (2.26-1) unstable; urgency=low * Rename cache root from ~/.cache/lisp-fasl/ to ~/.cache/common-lisp/ since (a) it holds more than FASLs, and (b) that makes it easier for other people to understand where it comes from. * Tweak implementation directory name to distinguish flavors of ACL (from SLIME). * Exclude the cache itself from recursive redirection. -- Francois-Rene Rideau Mon, 28 Sep 2009 19:14:12 -0400 cl-launch (2.25-1) unstable; urgency=low * Improve command line argument support for allegro and clisp. * the source code repository now includes a Makefile for end-users and a INTERNALS documentation file for hackers. -- Francois-Rene Rideau Fri, 11 Sep 2009 18:47:12 -0400 cl-launch (2.24-1) unstable; urgency=low * Do not load cl-launch eagerly anymore in the cl-launch.asd. Most users of ASDF do not want cl-launch's FASL redirection in their build. Those who do want it can enable it explicitly. The only person I know who did want it am now using XCVB for large systems. * Allow users to have the *lisp-fasl-cache* persistently :disabled. Document it. -- Francois-Rene Rideau Wed, 09 Sep 2009 10:51:02 -0400 cl-launch (2.23-1) unstable; urgency=low * Update Debian package to latest standards + change in sponsor. * Fix bug whereby in include mode compute-arguments was called from the wrong package, cl-user:: instead of cl-launch:: the second time over. * Fix bitrotten support for CCL command-line arguments * Fix ECL dumping. Avoid unsupported dumping from a dump. * asdf::resolve-symlinks was removed in 1.362. Resurrect it here, we use it! * Successfully ran: cl-launch -l 'sbcl clisp ccl ecl gclcvs gcl' -B tests # 1838 tests cl-launch -l clisp -B shell_tests -- Francois-Rene Rideau Tue, 08 Sep 2009 15:29:50 -0400 cl-launch (2.22-1) unstable; urgency=low * Enhance support for Allegro 8 (thanks to John Fromlin) -- Francois-Rene Rideau Sun, 30 Aug 2009 13:47:14 -0400 cl-launch (2.21-1) unstable; urgency=low * add command -B print_lisp_setup to simplify XCVB setup. -- Francois-Rene Rideau Mon, 20 Jul 2009 08:28:56 -0400 cl-launch (2.20-1) unstable; urgency=low * Silence cl-launch when reloading from an image that has it: don't re-evaluate header forms (might cause surprises if the image had a previous instance of cl-launch yet you depend on newer features. GIGO) * ASDF seems to complain when a system's :pathname is NIL. Use /dev/null instead. -- Francois-Rene Rideau Tue, 14 Jul 2009 11:46:04 -0400 cl-launch (2.19-1) unstable; urgency=low * Fix cl-launch when used with XCVB: depend on ASDF, and proper EVAL-WHEN for exporting symbols. -- Francois-Rene Rideau Thu, 09 Jul 2009 11:40:11 -0400 cl-launch (2.18-1) unstable; urgency=low * Rename BUILD.lisp to build.xcvb -- Francois-Rene Rideau Wed, 08 Jul 2009 13:04:40 -0400 cl-launch (2.17-1) unstable; urgency=low * Add functions -B print_lisp_implementation and -B print_lisp_binary_path for the sake of the XCVB Makefile. * tweak comments wrt CLISP version needed for standalone executables (2.48) -- Francois-Rene Rideau Thu, 25 Jun 2009 10:18:01 -0400 cl-launch (2.16-1) unstable; urgency=low * enable standalone executables for clisp. * small documentation updates. -- Francois-Rene Rideau Sat, 13 Jun 2009 02:46:51 -0400 cl-launch (2.15-1) unstable; urgency=low * Add support for option --image, including self-test. * Successfully ran self-test on clisp and sbcl and a variety of shells. -- Joyce Chen Fri, 12 Jun 2009 16:23:27 -0400 cl-launch (2.14-1) unstable; urgency=low * Add preliminary XCVB support. * Fix bitrotten support for #!.../cl-launch -X ... -- * DBG now goes to *trace-output* not *error-output* anymore * make sure --path elements appear in asdf:*central-registry* in their order of appearance -- Francois-Rene Rideau Fri, 29 May 2009 01:05:19 -0400 cl-launch (2.13-1) unstable; urgency=low * Debug clbuild support. * make sbcl the default default lisp, followed by clisp. -- Francois-Rene Rideau Tue, 23 Dec 2008 16:15:19 -0500 cl-launch (2.12-1) unstable; urgency=low * add basic clbuild support. Not included in test suite (yet). * better support :package argument to dump-image. -- Francois-Rene Rideau Mon, 22 Dec 2008 21:23:42 -0500 cl-launch (2.11-1) unstable; urgency=low * Added support for standalone executables on CLISP 2.48. * Debugged image dumping with ECL support some more. The second strategy (creating temporary .asd's) works better. However, ASDF seems confused if you don't rm -rf your object cache in ~/.cache/lisp-fasl/ecl*. * Better document the standalone executable support. -- Francois-Rene Rideau Sun, 09 Nov 2008 23:40:36 -0500 cl-launch (2.10-1) unstable; urgency=low * added a new magic environment variable CL_LAUNCH_DEBUG that enables debugging. * more attempts at debugging ECL support. -- Francois-Rene Rideau Sat, 01 Nov 2008 11:42:23 -0400 cl-launch (2.09-1) unstable; urgency=low * Fixes for GCL. * More failed attempts at getting ECL to reliably dump images. -- Francois-Rene Rideau Thu, 30 Oct 2008 13:22:04 -0400 cl-launch (2.08-1) unstable; urgency=low * Support new SBCL feature (since 1.0.21.24, thanks to Xach and Nikodemus) whereby we can now dump standalone executables. * Rename DIRECT_EXECUTABLE to STANDALONE_EXECUTABLE. * Refactor command-line argument detection for standalone executables. * Actually implement support for LispWorks - for Professional edition only. * Fix bug reported by Koga Kazuo, whereby on Mac OS X (and presumably other systems), /bin/sh doesn't support option -n to echo. Using the POSIX-mandated printf instead (via function ECHOn). * Rename OpenMCL to CCL (ClozureCL), drop support for older (pre)releases. * Remove builder patch for ecl 0.9i -- Francois-Rene Rideau Wed, 29 Oct 2008 09:09:04 -0400 cl-launch (2.07-1) unstable; urgency=low * commented out (sb-pcl::precompile-random-code-segments) in save-image as it may cause some systems to grind to a halt. Users can still do it themselves if they want it, it is purely a performance issue. -- Francois-Rene Rideau Thu, 17 May 2007 18:22:23 -0400 cl-launch (2.06-2) unstable; urgency=low * Improve packaging: suggest rather than depend on c-l-c (for the sake of non-Debian users). * (non-Debian change) make an asdf-installable package for cl-launch. -- Francois-Rene Rideau Tue, 24 Apr 2007 18:54:48 -0400 cl-launch (2.06-1) unstable; urgency=low * extend the API function QUIT with a new optional argument FINISH-OUTPUT (default T). When this argument is T, QUIT will FINISH-OUTPUT on *STANDARD-OUTPUT* and *ERROR-OUTPUT*. This replaces the (removed) internal function %QUIT. -- Francois-Rene Rideau Tue, 10 Apr 2007 17:39:33 -0400 cl-launch (2.05-1) unstable; urgency=low * Fix GCL 2.6 and 2.7, that were broken by the fix in cl-launch 2.04: the former doesn't have ENSURE-DIRECTORY-EXISTS occurrences of which were featured out, and the latter has issues with *LOAD-PATHNAME* incorrectly containing type lisp when it should have no type, which means that :pathname had to be specified in defsystem :cl-launch least it fail when the file has no extension. Also that system::*tmp-dir* ends with a / * Some minor documentation updates * SBCL: enable tail-call optimization; precompile CLOSy things before dump. * made cl-launch to be fully functional if it is the first system dependency in your asdf:defsystem (you still need a system-provided asdf for this to work fully). * OpenMCL: better distinguish FASL versions * completely tested with gcl gclcvs sbcl cmucl clisp ecl openmcl allegro -- Francois-Rene Rideau Tue, 20 Mar 2007 17:25:11 -0400 cl-launch (2.04-1) unstable; urgency=low * make cl-launch more robust wrt missing directories (can't truename or resolve-symlinks then) * mark the ecl patch as not needed for latest CVS (but still for 0.9i) * rename *fasl-cache* to *lisp-fasl-cache* -- Francois-Rene Rideau Fri, 12 Jan 2007 00:25:08 -0500 cl-launch (2.03-1) unstable; urgency=low * fix two bugs found by mkennedy at gentoo: use of truename on the cache path before it may exist call to a deleted shell function in the help. -- Francois-Rene Rideau Tue, 21 Nov 2006 00:08:43 -0500 cl-launch (2.02-1) unstable; urgency=low * completely tested with clisp ecl gcl gclcvs sbcl cmucl openmcl allegro some with and some without clc * wholly untested lispworks support * clarification of the situation of clisp and sbcl wrt DIRECT_EXECUTABLE (i.e. not yet). * self-test framework: account for shell variety, better criterion for cleanup * fix issues wrt pathnames, in resolve-symlinks & lisp-cache env var & gcl2.6 * superficial fixes -- Francois-Rene Rideau Mon, 16 Oct 2006 05:54:47 -0400 cl-launch (2.0-1) unstable; urgency=low * This release 2.0 passes full regression tests on all of clisp ecl gcl gclcvs and should work but hasn't been extensively tested with sbcl cmucl openmcl allegro * New "direct executable" feature supported on clisp and ecl: do away with the intermediate of a wrapper script and directly produce an executable. * We now fully support ECL. Success with dumping image from a system at last! Moreover, we dump a standalone :program, not a :fasl anymore; plus we take precautions to extract correct init-function-name from a library path. Search cl-launch code for "ECL PATCH" for modifications to ecl 0.9i sources. * After testing with not just bash and zsh, but also dash and posh, restore compatibility with posh that doesn't know -a and -o in [ ... ] * update documentation wrt GCL and ECL support, side-effects, etc. -- Francois-Rene Rideau Sat, 14 Oct 2006 13:55:42 -0400 cl-launch (1.93-1) unstable; urgency=low * This "full GCL support" release passes full regression tests on all of clisp sbcl cmucl ecl gclcvs gcl allegro openmcl * GCL: fix issue with compiling scripts without pathname type, and add support for image dump -- many thanks to Camm Maguire. * ECL: fix pathname type issue with build-fasl; desperate (and unsuccessful) attempt to modify builder so as to create a .fas from a system. * General issue with dumping: recompute the dynamic environment at each execution, not just when initially dumping. (I detected this because GCL had a similar bug with its *tmp-dir*, which we now work around.) * Disable the common-lisp-controller cache for GCL, since clc 6 is broken. * Fix bitrot in support for running without clc. * Fixed hairy bugs I could hardly fathom due to the interaction between the many many modes and evaluation times of cl-launch. -- Francois-Rene Rideau Fri, 13 Oct 2006 23:24:26 -0400 cl-launch (1.92-1) unstable; urgency=low * This "quick fix" release passes full regression tests on all of clisp sbcl cmucl ecl gclcvs gcl allegro openmcl * brown bag error for using find-system without nil-errors, that would break all non-clc installed implementations that have no cl-launch system. * until openmcl is fixed wrt -I handling, fall back to using exec_lisp_noarg -- Francois-Rene Rideau Wed, 11 Oct 2006 23:38:52 +0200 cl-launch (1.91-1) unstable; urgency=low * This "corner rounding" release passes full regression tests on all of clisp sbcl cmucl ecl gclcvs gcl allegro openmcl * make gcl load scripts it can't compile because their pathname lacks a type * make clisp properly compile scripts without a pathname type. * work around is a bug in clisp 2.40 option parsing (fixed in 2.41), by introducing a pseudo-filename after -- and skipping it in ext:*args* * use defsystem inside cl-launch, so that there will be no attempt to later miscompile an installed header into something empty due to #-cl-launch, which would confuse other software that depends on cl-launch but is being loaded without cl-launch (e.g. from SLIME). * fix --include /... for all shells by reshuffling BASIC_ENV_CODE * fix and/or work around some race condition in cacheing causing transient errors in the regression test suite, due to compilation happening within the same split second as automatic generation of next source code, which confuses clisp. I'm unable to fathom whether the race is due to a bug in cl-launch, clisp or the linux kernel, and so I won't blame others. * make sure ABORT is defined in the wrapper * regression test report on blefuscu (Pentium-M @1200MHz): cl-launch -l clisp -B tests 0 143 31.20s user 10.86s system 84% cpu 49.755 total cl-launch -l cmucl -B tests 0 143 39.76s user 15.40s system 85% cpu 1:04.81 total cl-launch -l sbcl -B tests 0 143 167.11s user 26.64s system 82% cpu 3:56.11 total cl-launch -l ecl -B tests 0 103 372.40s user 11.56s system 90% cpu 7:04.33 total cl-launch -l gcl -B tests 0 35 5.88s user 1.93s system 51% cpu 15.156 total cl-launch -l gclcvs -B tests 0 71 27.90s user 9.06s system 79% cpu 46.587 total cl-launch -l allegro -B tests 0 143 44.48s user 7.91s system 84% cpu 1:02.10 total on rastapopoulos (PPC 603ev @240MHz): cl-launch -l openmcl -B tests 0 143 888.90s user 234.23s system 82% cpu 22:48.42 total -- Francois-Rene Rideau Tue, 10 Oct 2006 02:06:24 -0400 cl-launch (1.90-1) unstable; urgency=low * This "bit unrot" release passes the full regression test on clisp sbcl cmucl ecl gclcvs gcl allegro * Refactor the way dumping and updates interact, fix some bugs. * avoid #+foo #+foo bar baz idiom to make acl5 happy again. * Fix buglets in the self-test exclusion patterns for gcl and ecl * make gcl-pre2.7 happier by avoiding keyword arguments in COMPILE-FILE * do not default INCLUDE_PATH to IMAGE_DIR when dumping. * update/fix documentation wrt what implementations are supported and how. -- Francois-Rene Rideau Sun, 8 Oct 2006 10:46:57 -0400 cl-launch (1.89-1) unstable; urgency=low * Enhance OpenMCL support: can now dump files and use direct command-line arguments. -- Francois-Rene Rideau Fri, 6 Oct 2006 18:04:09 -0400 cl-launch (1.88-1) unstable; urgency=low * separate the debian thing in a .diff.gz. * The correct command to detect packaging bugs is lintian cl-launch_*.dsc -- Francois-Rene Rideau Thu, 7 Sep 2006 20:00:34 +0200 cl-launch (1.87-1) unstable; urgency=low * due to popular request, add a resource file feature, a --rc/--no-rc option pair to enable/disable this feature, and the ability to configure cl-launch into having it enabled or disabled by default. Closes: #384697. -- Francois-Rene Rideau Wed, 30 Aug 2006 02:51:16 +0200 cl-launch (1.86-1) unstable; urgency=low * include image dumping in automated test suite, catching several bugs. * fix a nasty bug stupidly introduced in 1.83 whereby command-line arguments were not recomputed anymore when restarting from a dumped image (doh). * got --dump to work well with --update * try to get ECL to compile systems further, but hit some c::builder issues. See my messages of this month (august 2006) on the ECL mailing list. * tried to debug support for gcl 2.6.7-17: got --file working again (w/o fasl cache), but --system is hopeless. * gclcvs 2.7.0-54 doesn't even install properly anymore; on a system where it is installed of old its EVAL-WHEN seems badly broken. -- Francois-Rene Rideau Sun, 13 Aug 2006 08:28:03 -0400 cl-launch (1.85-1) unstable; urgency=low * unbreak some recent simplifications that don't work in all failure cases * consequently restore the partial support for GCL * work around current brokenness of ECL in debian * install cl-launch in /usr/share/common-lisp/source/cl-launch with an asd visible by c-l-c so as to allow (require 'cl-launch). -- Francois-Rene Rideau Thu, 10 Aug 2006 19:06:40 -0400 cl-launch (1.84-1) unstable; urgency=low * fix compile-file-pathname* (and thus option -f) in presence of c-l-c * add apply-output-pathname-translations to the API * refactor the image-dumping infrastructure to allow support for ECL; kluges to get around ECL 0.9i bug in c::builder pathname type handling. Many thanks to people on the ecls-list for help. NB: as of debian package ecl-0.9i-2, you must export ECL=/usr/lib/ecl/ecl-original for cl-launch to work with ECL, due to bug in debian packaging of ECL. -- Francois-Rene Rideau Wed, 9 Aug 2006 21:02:42 -0400 cl-launch (1.83-1) unstable; urgency=low * Considering that I am not a proper Debian Developer, add my sponsor as Uploaders: Peter Van Eynde , Rene van Bevern Many thanks to Luca Capello . * Properly declare previous bug fixed. Closes: #379531. * Debian documentation tweaks. * ECL file-compilation support debugged by Juan Jose Garcia-Ripoll. -- Francois-Rene Rideau Tue, 2 Aug 2006 15:53:23 -0400 cl-launch (1.82-1) unstable; urgency=low * explicitly call sh ./cl-launch.sh in the build rules so as to (fix bug #379531 reported by Andreas Jochens (though I suspect he did something wrong and this "fix" wasn't needed). -- Francois-Rene Rideau Tue, 24 Jul 2006 05:00:00 -0400 cl-launch (1.81-1) unstable; urgency=low * fix typo that prevented saving an override of SBCL_OPTIONS. Thanks to Matthew Danish for the bug report. * document the fact that GCL support is currently broken. * preliminary support for ECL. -- Francois-Rene Rideau Tue, 20 Jul 2006 20:00:00 -0400 cl-launch (1.80-1) unstable; urgency=low * work on the latest openmcl, that doesn't have #+ccl anymore, and may have an empty :asdf package. Runtime failure trying to dump image on x86_64. * have *print-readably* nil makes allegro 5 happier with asdf. -- Francois-Rene Rideau Tue, 20 Jun 2006 16:46:00 -0500 cl-launch (1.79-1) unstable; urgency=low * work well with common-lisp-controller when compiling without asdf. -- Francois-Rene Rideau Sat, 17 Jun 2006 22:01:00 -0400 cl-launch (1.78-1) unstable; urgency=low * fix allegro support -- Francois-Rene Rideau Wed, 7 Jun 2006 20:47:00 -0400 cl-launch (1.77-2) unstable; urgency=low * fix some lintian warnings -- Francois-Rene Rideau Thu, 18 May 2006 17:09:00 -0400 cl-launch (1.77-1) unstable; urgency=low * play well with debian and common-lisp-controller for inclusion in debian unstable * make lisp options more static when dumping an image. -- Francois-Rene Rideau Wed, 17 May 2006 12:37:45 -0400 cl-launch (1.76) unstable; urgency=low * fix some issues with dumping, quitting, restarting * improve the documentation some more. -- Francois-Rene Rideau Mon, 1 May 2006 02:23:14 -0400 cl-launch (1.75) unstable; urgency=low * use truename to compile and load files specified with relative path (this opens a can of worm of its own). Issue raised by Vladimir Sekissov . * fix some more bugs in the documentation * some code refactoring, slight bug fixes -- Francois-Rene Rideau Tue, 25 Apr 2006 21:15:24 -0400 cl-launch (1.74) unstable; urgency=low * fix some bugs in the documentation -- Francois-Rene Rideau Tue, 25 Apr 2006 04:15:24 +0200 cl-launch (1.73) unstable; urgency=low * add a symlink alias 'cl' to cl-launch * options --print and --write to evaluate and print expression * default behaviour being --execute * implicit --print if only one argument * options --dump and --restart that dump lisp images for fast startup (more output file optimization could be done here, plus support for :executable t in sbcl and/or clisp; :restart not fully supported) * cmucl now uses the noarg invocation method for safer behaviour. * some slight bug fixes in code and documentation. -- Francois-Rene Rideau Tue, 25 Apr 2006 03:54:20 +0200 cl-launch (1.72) unstable; urgency=low * "Initial" package. Earlier packages never having been accepted by Debian, I didn't actually maintain a changelog about them. -- Francois-Rene Rideau Tue, 28 Mar 2006 11:18:49 -0500 cl-launch-3.22.1/debian/cl-launch.1000066400000000000000000000016461222736422200166300ustar00rootroot00000000000000.\" Hey, Emacs! This is an -*- nroff -*- source file. .TH CL-LAUNCH 1 "May 14th, 2012" .SH NAME CL-Launch \- Common Lisp program launcher and shell script generator .SH DESCRIPTION .B CL-Launch provides a uniform way to invoke Common Lisp code from the shell or to generate ecoxecutable shell scripts from Common Lisp source code, independently from the underlying Common Lisp implementation. .PP Currently supported implementations are: SBCL, Clozure CL, GNU CLISP, CMUCL, ECL, ABCL, XCL, SCL, Allegro, LispWorks Pro, GCL. .PP You can specify complex Lisp systems using ASDF 2. cl-launch will leverage ASDF 2's per-user, per-implementation fasl cache. It can dump precompiled images and resume from them, for fast software startup. It also integrates well with XCVB. .PP cl-launch contains its own complete documentation. You can view it all using the following command: .PP .RS .nf \fBcl-launch \-\-more-help | less\fP .fi .RE .PP cl-launch-3.22.1/debian/compat000066400000000000000000000000021222736422200160670ustar00rootroot000000000000007 cl-launch-3.22.1/debian/control000066400000000000000000000041241222736422200162750ustar00rootroot00000000000000Source: cl-launch Section: lisp Priority: optional Homepage: http://www.cliki.net/cl-launch Maintainer: Francois-Rene Rideau Uploaders: Christoph Egger , Kan-Ru Chen , Milan Zamazal , Peter Van Eynde Build-Depends: debhelper (>= 7.2.8) Standards-Version: 3.9.3 Vcs-Git: git://common-lisp.net/projects/xcvb/cl-launch.git Package: cl-launch Architecture: all Depends: ${misc:Depends} Suggests: cl-asdf (>= 2:3.0.0) Recommends: common-lisp-controller (>= 7.3), sbcl (>= 1:1.0.40) Breaks: cl-asdf (<< 2:2.015), common-lisp-controller (<= 7.2) Description: uniform frontend to running Common Lisp code from the shell CL-Launch will allow you to invoke Common Lisp source code from the shell command line or from a shell script. It will also allow you to turn your Common Lisp source programs into standalone executables or executable shell scripts (optionally using a dumped image), depending on the features available in your underlying implementation. . CL-Launch will automatically detect a supported Common Lisp implementation and use adequate invocation options. It can also be configured to fit exactly the programmer's desires. Fully supported implementations are: Allegro, CLISP, ClozureCL, CMUCL, ECL, SBCL, SCL. Of these, SBCL, ECL and CLISP support creating standalone executables. Partially supported implementations are: LispWorks Professional, ABCL, GCL 2.6, GCL 2.7, XCL. . CL-Launch also offers Common Lisp programs a simple uniform interface to invocation parameters (command-line arguments and environment variables). It relies on ASDF 3 for system construction. See the ASDF 3 manual for more information on how to configure source and object code location. CL-Launch may dump memory images for fast startup (at the expense of disk space). It can also be used as a quick way to evaluate and print simple Lisp forms or scripts from the command-line without invoking a full-fledged REPL, and to easily compare results between implementations. . Homepage: http://www.cliki.net/cl-launch cl-launch-3.22.1/debian/copyright000066400000000000000000000110751222736422200166300ustar00rootroot00000000000000Debian Copyright Section ======================== Upstream Source URL: http://www.cliki.net/cl-launch Upstream Author: Francois-Rene Rideau Debian Maintainer: Francois-Rene Rideau Upstream Copyright Statement ============================ CL-Launch is written and Copyright (c) 2005-2012 by Francois-Rene Rideau. CL-Launch is available under the terms of the bugroff license. http://www.geocities.com/SoHo/Cafe/5947/bugroff.html You may at your leisure use the LLGPL instead < http://www.cliki.net/LLGPL > The LLGPL, or Lisp Lesser GNU Public, consists of a preamble (see below) and the Lesser GNU Public License 2.1 (LGPL-2.1). Where these conflict, the preamble takes precedence. CL-Launch is referenced in the preamble as the "LIBRARY." The LGPL-2.1 is stored on a Debian system in the file /usr/share/common-licenses/LGPL-2.1. CL-Launch 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. Preamble to the Gnu Lesser General Public License ------------------------------------------------- Copyright (c) 2000 Franz Incorporated, Berkeley, CA 94704 The concept of the GNU Lesser General Public License version 2.1 ("LGPL") has been adopted to govern the use and distribution of above-mentioned application. However, the LGPL uses terminology that is more appropriate for a program written in C than one written in Lisp. Nevertheless, the LGPL can still be applied to a Lisp program if certain clarifications are made. This document details those clarifications. Accordingly, the license for the open-source Lisp applications consists of this document plus the LGPL. Wherever there is a conflict between this document and the LGPL, this document takes precedence over the LGPL. A "Library" in Lisp is a collection of Lisp functions, data and foreign modules. The form of the Library can be Lisp source code (for processing by an interpreter) or object code (usually the result of compilation of source code or built with some other mechanisms). Foreign modules are object code in a form that can be linked into a Lisp executable. When we speak of functions we do so in the most general way to include, in addition, methods and unnamed functions. Lisp "data" is also a general term that includes the data structures resulting from defining Lisp classes. A Lisp application may include the same set of Lisp objects as does a Library, but this does not mean that the application is necessarily a "work based on the Library" it contains. The Library consists of everything in the distribution file set before any modifications are made to the files. If any of the functions or classes in the Library are redefined in other files, then those redefinitions ARE considered a work based on the Library. If additional methods are added to generic functions in the Library, those additional methods are NOT considered a work based on the Library. If Library classes are subclassed, these subclasses are NOT considered a work based on the Library. If the Library is modified to explicitly call other functions that are neither part of Lisp itself nor an available add-on module to Lisp, then the functions called by the modified Library ARE considered a work based on the Library. The goal is to ensure that the Library will compile and run without getting undefined function errors. It is permitted to add proprietary source code to the Library, but it must be done in a way such that the Library will still run without that proprietary code present. Section 5 of the LGPL distinguishes between the case of a library being dynamically linked at runtime and one being statically linked at build time. Section 5 of the LGPL states that the former results in an executable that is a "work that uses the Library." Section 5 of the LGPL states that the latter results in one that is a "derivative of the Library", which is therefore covered by the LGPL. Since Lisp only offers one choice, which is to link the Library into an executable at build time, we declare that, for the purpose applying the LGPL to the Library, an executable that results from linking a "work that uses the Library" with the Library is considered a "work that uses the Library" and is therefore NOT covered by the LGPL. Because of this declaration, section 6 of LGPL is not applicable to the Library. However, in connection with each distribution of this executable, you must also deliver, in accordance with the terms and conditions of the LGPL, the source code of Library (or your derivative thereof) that is incorporated into this executable. cl-launch-3.22.1/debian/links000066400000000000000000000001321222736422200157300ustar00rootroot00000000000000usr/bin/cl-launch usr/bin/cl usr/share/man/man1/cl-launch.1.gz usr/share/man/man1/cl.1.gz cl-launch-3.22.1/debian/rules000077500000000000000000000030101222736422200157430ustar00rootroot00000000000000#!/usr/bin/make -f pkg := cl-launch debpkg := cl-launch DESTDIR := debian/$(debpkg) clc-source := usr/share/common-lisp/source clc-systems := usr/share/common-lisp/systems include_dir := $(clc-source)/$(pkg) doc-dir := usr/share/doc/$(debpkg) configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: configure-stamp dh_testdir sh ./cl-launch.sh \ --include /${include_dir} \ --lisp "cmucl sbcl clisp ecl openmcl gclcvs allegro lisp gcl" \ --rc \ -B generate_install_files touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp rm -f cl-launch cl-launch.asd launcher.lisp wrapper.sh build.xcvb rm -f debian/cl-launch.postinst.* debian/cl-launch.prerm.* dh_clean install: build dh_testdir dh_testroot dh_clean dh_installdirs -p ${debpkg} $(include_dir) $(doc-dir) dh_install -i cl-launch usr/bin dh_install -i launcher.lisp wrapper.sh cl-launch.asd build.xcvb ${include_dir} dh_installman -i debian/*.1 # Build architecture-independent files here. binary-indep: build install dh_testdir -i dh_testroot -i dh_installdocs -i dh_installchangelogs -i dh_link -i #dh_lisp -i dh_compress -i dh_fixperms -i dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i # Build architecture-dependent files here. binary-arch: build binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure cl-launch-3.22.1/debian/source/000077500000000000000000000000001222736422200161715ustar00rootroot00000000000000cl-launch-3.22.1/debian/source/format000066400000000000000000000000141222736422200173770ustar00rootroot000000000000003.0 (quilt)