~adnano/astronaut-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH] Makefile: make POSIX-compliant

Details
Message ID
<20211219035429.779886-1-ben@bvnf.space>
DKIM signature
pass
Download raw message
Patch: +42 -14
The Makefile was marked as POSIX-compliant (first target is .POSIX), but made
use of a number of extensions, such as the GNU extensions $(shell ...) and ifeq,
and the widely-used, but not POSIX, += ?= != := etc.

These other types of macro definitions _will_ be part of the next version of
POSIX, but they are not currently. For this Makefile, ?= and := were not
required, and != is replaced by adding the output of the `find` command
manually.

The RM macro was not defined, and it is not one of the predefined MACROS
required by POSIX.

Merging this commit will require the Makefile to be updated under the following
conditions:
    - new source files are added: add them to the GOSRC macro
	- version is updated: manually change the value of the VERSION macro

---
 Makefile | 56 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 42 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index 6645c33..cd0d0ac 100644
--- a/Makefile
+++ b/Makefile
@@ -2,24 +2,52 @@
.SUFFIXES:
.SUFFIXES: .1 .1.scd

_git_version=$(shell git describe --tags --dirty 2>/dev/null)
ifeq ($(strip $(_git_version)),)
VERSION=0.1.0
else
VERSION=$(_git_version)
endif

PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
SHAREDIR?=$(PREFIX)/share/astronaut
MANDIR?=$(PREFIX)/share/man
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
SHAREDIR=$(PREFIX)/share/astronaut
MANDIR=$(PREFIX)/share/man

VPATH=doc
GO?=go
GOFLAGS?=
GOSRC!=find . -name '*.go'
GOSRC+=go.mod go.sum
GOSRC+=about/*
RM=rm
GO=go
GOFLAGS=
GOSRC= \
	ui/wrap.go \
	ui/view.go \
	ui/ui.go \
	ui/splice.go \
	ui/spinner.go \
	ui/input.go \
	text.go \
	templates.go \
	tab.go \
	styles/styles.go \
	response.go \
	parse.go \
	main.go \
	io.go \
	errors.go \
	config.go \
	command.go \
	browser.go \
	bookmarks.go \
	binds.go \
	go.mod \
	go.sum \
	about/about.tmpl \
	about/bookmarks.gmi \
	about/certificate.tmpl \
	about/certificates.tmpl \
	about/error.tmpl \
	about/knownhosts.tmpl \
	about/mismatch.tmpl \
	about/newtab.gmi \
	about/redirect.tmpl \
	about/too-many-redirects.tmpl \
	about/trust.tmpl \
	about/welcome.gmi \

DOCS := \
	astronaut.1
-- 
2.34.1
Reply to thread Export thread (mbox)