aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-08-25 20:57:27 +0200
committerTeddy Wing2022-08-25 20:57:27 +0200
commite830899cf2268f38ff21038c9c7edfd0b080b385 (patch)
tree6becad1242f197f5b770af6a6994115c18d71e1b
parentbc3109dd27646004bf12430ddeb210f23ccda7f7 (diff)
downloadextreload-e830899cf2268f38ff21038c9c7edfd0b080b385.tar.bz2
Makefile: Rewrite `pkg` target to include bundle and source
Copy the `pkg` target from Wajir to make a tarball of the bundled dependencies in `bundle` and the Extreload source code. This tarball can then be distributed and the program can be built and installed from it using the Makefile. By distributing the source, an executable can be built for more architectures and systems.
-rw-r--r--Makefile22
1 files changed, 15 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 34c25cf..8f2abfa 100644
--- a/Makefile
+++ b/Makefile
@@ -71,13 +71,6 @@ $(DIST_MAN_PAGE): $(DIST)/share/man/man1 $(MAN_PAGE)
cp $(MAN_PAGE) $<
-.PHONY: pkg
-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: extreload.asd src/*.lisp
mkdir -p lib/extreload
cp -a extreload.asd src lib/extreload/
@@ -90,6 +83,21 @@ bundle/bundled-local-projects/0000/extreload/extreload: bundle
--eval '(quit)'
+.PHONY: pkg
+pkg: extreload_$(VERSION).tar.bz2
+
+extreload_$(VERSION).tar.bz2: bundle extreload.asd src/*.lisp
+ git archive \
+ --prefix=extreload_$(VERSION)/ \
+ --output=extreload_$(VERSION).tar \
+ HEAD
+ tar -r \
+ -s ,bundle,extreload_$(VERSION)/bundle, \
+ -f extreload_$(VERSION).tar \
+ bundle
+ bzip2 extreload_$(VERSION).tar
+
+
.PHONY: install
install: bundle/bundled-local-projects/0000/extreload/extreload $(MAN_PAGE)
install -m 755 bundle/bundled-local-projects/0000/extreload/extreload $(DESTDIR)$(bindir)