Commit 6aa8b8d0 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Add script to work without make, batch files to work without any unix utility

parent 092fa218
@echo off
set here=%~dp0
set header_lisp=header.lisp
set driver_lisp=uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/run-program.lisp uiop/lisp-build.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp
set defsystem_lisp=upgrade.lisp component.lisp system.lisp cache.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp output-translations.lisp source-registry.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp package-inferred-system.lisp backward-internals.lisp backward-interface.lisp interface.lisp user.lisp footer.lisp
%~d0
cd %~p0
if "%1" == "" goto all
if "%1" == "all" goto all
if "%1" == "build_asdf" goto build_asdf
if "%1" == "ext" goto ext
if "%1" == "noext" goto noext
if "%1" == "driver_files" goto driver_files
if "%1" == "defsystem_files" goto defsystem_files
call %0 build_asdf
%here%\asdf-tools.bat env %*
goto :end
:all
:: Default action: bootstrap asdf.lisp
:build_asdf
:: That's the only thing that we really need before we may invoke asdf-builder.
if not exist build mkdir build
set a=build\asdf.lisp
copy /b %header_lisp% %driver_lisp% %defsystem_lisp% %a%.tmp
if not exist %a% goto clobber
fc /b /0 %a%.tmp %a% > nul
if errorlevel 1 goto clobber
del /f /q %a%.tmp
goto end
:clobber
if exist %a% del /f /q %a%
ren %a%.tmp %a%
goto end
:ext
:: Download all the development-time dependencies of ASDF:
git submodule update --init
goto end
:noext
:: Remove all the development-time dependencies of ASDF:
git submodule deinit .
goto end
:driver_files
:: These targets are used during tests to ensure the Makefile is in synch with the .asd files.
echo %driver_lisp%
goto end
:defsystem_files
:: These targets are used during tests to ensure the Makefile is in synch with the .asd files.
echo %defsystem_lisp%
goto end
:end
#!/bin/sh
here="$(dirname $0)"
header_lisp="header.lisp"
driver_lisp="uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/run-program.lisp uiop/lisp-build.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp"
defsystem_lisp="upgrade.lisp component.lisp system.lisp cache.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp output-translations.lisp source-registry.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp package-inferred-system.lisp backward-internals.lisp backward-interface.lisp interface.lisp user.lisp footer.lisp"
all () {
# Default action: bootstrap asdf.lisp
build_asdf
}
build_asdf () {
# That's the only thing that we really need before we may invoke asdf-builder.
mkdir -p build
a=build/asdf.lisp
cat ${header_lisp} ${driver_lisp} ${defsystem_lisp} > ${a}.tmp
if [ -f ${a} ] && cmp -s ${a} ${a}.tmp ; then
rm -rf ${a}.tmp
else
mv -f ${a}.tmp ${a}
fi
}
ext () {
# Download all the development-time dependencies of ASDF:
git submodule update --init
}
noext () {
# Remove all the development-time dependencies of ASDF:
git submodule deinit .
}
driver_files () {
# These targets are used during tests to ensure the Makefile is in synch with the .asd files.
echo ${driver_lisp}
}
defsystem_files () {
# These targets are used during tests to ensure the Makefile is in synch with the .asd files.
echo ${defsystem_lisp}
}
case "$1" in
"") all ;;
all|build_asdf|ext|noext|driver_files|defsystem_files) "$@" ;;
*) build_asdf ; exec ${here}/asdf-tools env "$@" ;;
esac ; exit
@echo off
if "%CCL%" == "" set CCL=ccl
%CCL% --load %~dp0\asdf-tools -- %*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment