aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-08-23 00:51:38 +0200
committerTeddy Wing2022-08-23 00:55:07 +0200
commitadd2fe905028b9f9926f10a9e862d2fec1511106 (patch)
treec07455315d265d293877564fe6cf46b16e51a32a
parentd6c18fde2f9bf32c022e1a474cd1b8e676ae71d4 (diff)
downloadextreload-add2fe905028b9f9926f10a9e862d2fec1511106.tar.bz2
Makefile: Add self-contained bundle target
Add a target to create a self-contained bundle of the program that isn't dependent on Quicklisp. This code is based on what I did in Wajir.
-rw-r--r--.gitignore4
-rw-r--r--Makefile12
-rw-r--r--bundle.lisp15
3 files changed, 31 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index b47e879..7b6a21e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,6 @@
/dist/
*.fasl
+
+/bundle/
+/lib/extreload/
+system-index.txt
diff --git a/Makefile b/Makefile
index 98bc97e..acfee9c 100644
--- a/Makefile
+++ b/Makefile
@@ -68,3 +68,15 @@ pkg: extreload_$(VERSION)_darwin-x86_64.tar.bz2
extreload_$(VERSION)_darwin-x86_64.tar.bz2: dist
tar cjv -s /dist/extreload_$(VERSION)_darwin-x86_64/ -f $@ dist
+
+
+bundle:
+ mkdir -p lib/extreload
+ cp -a extreload.asd src lib/extreload/
+
+ $(LISP) --load bundle.lisp
+
+bundle/bundled-local-projects/0000/extreload/extreload: bundle
+ $(LISP) --load bundle/bundle.lisp \
+ --eval '(asdf:make :extreload)' \
+ --eval '(quit)'
diff --git a/bundle.lisp b/bundle.lisp
new file mode 100644
index 0000000..2069940
--- /dev/null
+++ b/bundle.lisp
@@ -0,0 +1,15 @@
+(setf ql:*local-project-directories* '("./lib"))
+
+(let ((dependencies (append
+ (asdf:system-depends-on (asdf:find-system :extreload))))
+ (local-dependencies '("sysexits"
+ "wait-group")))
+ (ql:bundle-systems
+ (set-difference
+ (sort dependencies #'string-lessp)
+ local-dependencies
+ :test #'equal)
+ :to "./bundle"
+ :include-local-projects t))
+
+(quit)