-
Notifications
You must be signed in to change notification settings - Fork 0
/
make-asdf.sh
executable file
·56 lines (52 loc) · 2.06 KB
/
make-asdf.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
# Usage: ./make-asdf.sh [keyword=argument ...] <command>
# See the Makefile for the list of acceptable keyword arguments
here="$(dirname $0)"
header_lisp="header.lisp"
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"
defsystem_lisp="upgrade.lisp cache.lisp component.lisp system.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp output-translations.lisp source-registry.lisp package-inferred-system.lisp backward-interface.lisp backward-internals.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-tools.
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
}
build_asdf_tools () {
if [ -x build/asdf-tools ] ; then
: "Reusing existing asdf-tools."
else
: "Building asdf-tools."
build_asdf
${here}/tools/asdf-tools build-asdf-tools
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|build_asdf_tools|ext|noext|driver_files|defsystem_files) "$@" ;;
*) build_asdf_tools ; exec ${here}/build/asdf-tools env "$@" ;;
esac ; exit