From e830899cf2268f38ff21038c9c7edfd0b080b385 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 25 Aug 2022 20:57:27 +0200 Subject: 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. --- Makefile | 22 +++++++++++++++------- 1 file 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) -- cgit v1.2.3