aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul W. Rankin <pwr@bydasein.com>2021-04-26 15:52:43 +1000
committerPaul W. Rankin <pwr@bydasein.com>2021-04-26 15:52:43 +1000
commit3dc06d401fe97b3d0fb6c737652d8a82082aef37 (patch)
tree9bcf62684209f7c927d637dcee2c39317d685fed
parent9cec78c685dbca51ab9d1014eb535a541083effc (diff)
downloadbinder-3dc06d401fe97b3d0fb6c737652d8a82082aef37.zip
Makefile: portability
-rw-r--r--Makefile25
1 files changed, 13 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 36061f4..7c70bf2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,10 @@
+.POSIX:
PROGRAM = binder
-LISP_FILE = $(PROGRAM).el
+LISP_FILE = ${PROGRAM}.el
DEPS = seq package-lint
NEWS_FILE = NEWS
-VERS = $(shell grep -oE -m1 'Version:[ 0-9.]+' $(LISP_FILE) | tr -d :)
-TAG = $(shell echo $(VERS) | sed -E 's/Version:? ([0-9.]+)/v\1/')
+VERS != grep -oE -m1 'Version:[ 0-9.]+' ${LISP_FILE} | tr -d:
+TAG != echo ${VERS} | sed -E 's/Version:? ([0-9.]+)/v\1/'
INIT = '(progn \
(require (quote package)) \
(push (cons "melpa" "https://melpa.org/packages/") package-archives) \
@@ -13,20 +14,20 @@ INIT = '(progn \
(unless (assoc pkg package-archive-contents) \
(package-refresh-contents)) \
(package-install pkg))) \
- (quote ($(DEPS)))))'
+ (quote (${DEPS}))))'
all: check compile
-check: $(LISP_FILE)
- emacs -Q --eval $(INIT) --batch -f package-lint-batch-and-exit $(LISP_FILE)
+check:
+ emacs -Q --eval ${INIT} --batch -f package-lint-batch-and-exit ${LISP_FILE}
-compile: $(LISP_FILE)
- emacs -Q --eval $(INIT) -L . --batch -f batch-byte-compile $(LISP_FILE)
+compile:
+ emacs -Q --eval ${INIT} -L . --batch -f batch-byte-compile ${LISP_FILE}
tag-release: check compile
- sed -i~ '1 s/.*/* $(VERS)/' $(NEWS_FILE)
- git commit -m 'Add $(VERS) to $(NEWS_FILE)' $(NEWS_FILE)
- awk '/^* Version/ {v ++ 1} v == 1' $(NEWS_FILE) | sed 's/^* //' | git tag -sF - $(TAG)
+ sed -i~ '1 s/.*/* ${VERS}/' ${NEWS_FILE}
+ git commit -m 'Add ${VERS} to ${NEWS_FILE}' ${NEWS_FILE}
+ awk '/^* Version/ {v ++ 1} v == 1' ${NEWS_FILE} | sed 's/^* //' | git tag -sF - ${TAG}
clean:
- rm -f $(PROGRAM).elc
+ rm -f ${PROGRAM}.elc