From dd6ff5d1e1d585edf251c13fe78f7d94beb5b718 Mon Sep 17 00:00:00 2001 From: Daniel Semyonov Date: Tue, 29 Jun 2021 03:40:11 +0300 Subject: [PATCH] Add a makefile Contains three targets - info, package and clean: - info creates the info manual for the package. - package creates an installable (via 'M-x package-install-file') package archive. - clean cleans any "build artefacts". The default (all) target is equivalent to the clean target followed by the package target. Add 'config.mk' for build configuration. Add 'elpher-pkg.el' (could possibly be generated in the future), required to install as a package. --- config.mk | 6 ++++++ elpher-pkg.el | 9 +++++++++ makefile | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 config.mk create mode 100644 elpher-pkg.el create mode 100644 makefile diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..443dca8 --- /dev/null +++ b/config.mk @@ -0,0 +1,6 @@ +PKG = elpher +VERSION = 2.11.0 + +INSTALLINFO = install-info +MAKEINFO = makeinfo +TAR = tar diff --git a/elpher-pkg.el b/elpher-pkg.el new file mode 100644 index 0000000..13255f3 --- /dev/null +++ b/elpher-pkg.el @@ -0,0 +1,9 @@ +(define-package "elpher" "2.11.0" "A friendly gopher and gemini client" + '((emacs "26.2")) + :keywords ("convenience") + :authors (("Tim Vaughan" . "plugd@thelambdalab.xyz")) + :maintainer ("Alex Schroeder" . "alex@alexschroeder.ch") + :url "https://alexschroeder.ch/cgit/elpher") +;; Local Variables: +;; no-byte-compile: t +;; end: diff --git a/makefile b/makefile new file mode 100644 index 0000000..ac9c1c5 --- /dev/null +++ b/makefile @@ -0,0 +1,32 @@ +include config.mk + +.PHONY: all help info package clean + +.SUFFIXES: .texi .info + +all: clean package + +help: + $(info make info - generate the info manual) + $(info make package - generate a tar file containing the package) + $(info make clean - remove generated files) + @exit + +.texi.info: + $(MAKEINFO) --no-split $< -o $@ + +dir: $(PKG).info + $(INSTALLINFO) $? $@ + +info: $(PKG).info dir + +$(PKG)-$(VERSION).tar: $(PKG).info dir *.el COPYING + mkdir $(PKG)-$(VERSION) + cp -a $? $(PKG)-$(VERSION)/ + $(TAR) -cf $@ $(PKG)-$(VERSION) + rm -rf $(PKG)-$(VERSION) + +package: $(PKG)-$(VERSION).tar + +clean: + rm -f $(PKG).info dir $(PKG)-$(VERSION).tar -- 2.20.1