make-asdf.bat 2.44 KB
Newer Older
1
@echo off
2
:: Usage: ./make-asdf.bat [keyword=argument ...] <command>
3
:: See the Makefile for the list of acceptable keyword arguments
4 5 6

set here=%~dp0
set header_lisp=header.lisp
7
set driver_lisp=uiop\package.lisp + uiop\common-lisp.lisp + uiop\utility.lisp + uiop\version.lisp + uiop\os.lisp + uiop\pathname.lisp + uiop\filesystem.lisp + uiop\stream.lisp + uiop\image.lisp + uiop\lisp-build.lisp + uiop\launch-program.lisp + uiop\run-program.lisp + uiop\configuration.lisp + uiop\backward-driver.lisp + uiop\driver.lisp
8
set defsystem_lisp=upgrade.lisp + session.lisp + component.lisp + operation.lisp + system.lisp + system-registry.lisp + action.lisp + lisp-action.lisp + find-component.lisp + forcing.lisp + plan.lisp + operate.lisp + find-system.lisp + parse-defsystem.lisp + bundle.lisp + concatenate-source.lisp + package-inferred-system.lisp + output-translations.lisp + source-registry.lisp + backward-internals.lisp + backward-interface.lisp + interface.lisp + user.lisp + footer.lisp
9 10

%~d0
11
cd "%~p0"
12

13 14 15
if "%~1"=="" goto all
if "%~1"=="all" goto all
if "%~1"=="build_asdf" goto build_asdf
16
if "%~1"=="build_asdf_tools" goto build_asdf_tools
17 18 19 20
if "%~1"=="ext" goto ext
if "%~1"=="noext" goto noext
if "%~1"=="driver_files" goto driver_files
if "%~1"=="defsystem_files" goto defsystem_files
21

22 23
call "%0" build_asdf_tools
"%here%\build\asdf-tools.exe" env %*
24
goto end
25 26 27 28 29


:all
:: Default action: bootstrap asdf.lisp

30
:build_asdf
31
:: That's the only thing that we really need before we may invoke the asdf-tools
32 33
 if not exist build mkdir build
 set a=build\asdf.lisp
34
 copy /y /b %header_lisp% + %driver_lisp% + %defsystem_lisp% %a%.tmp > nul
35 36 37 38 39 40
 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

41 42
:build_asdf_tools
:: Building a binary for asdf-tools
43 44 45
 if exist build\asdf-tools.exe goto end
 call "%0" build_asdf
 "%here%\tools\asdf-tools.bat" build-asdf-tools
46 47
 goto end

48 49
:clobber
 if exist %a% del /f /q %a%
50
 rename %a%.tmp asdf.lisp
51 52 53 54 55 56 57 58 59 60 61 62
 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

63
:driver_files
64 65 66 67
:: These targets are used during tests to ensure the Makefile is in synch with the .asd files.
 echo %driver_lisp%
 goto end

68
:defsystem_files
69 70 71 72 73
:: These targets are used during tests to ensure the Makefile is in synch with the .asd files.
 echo %defsystem_lisp%
 goto end

:end