From: Daniel Semyonov Date: Tue, 29 Jun 2021 00:40:11 +0000 (+0300) Subject: Add a makefile X-Git-Tag: v3.0.0~22^2~26 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=dd6ff5d1e1d585edf251c13fe78f7d94beb5b718;p=elpher.git 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. --- 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