Authentication-Results: mail-b.sr.ht; dkim=pass header.d=bvnf.space header.i=@bvnf.space Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by mail-b.sr.ht (Postfix) with ESMTPS id 141D811EE5E for <~adnano/astronaut-devel@lists.sr.ht>; Sun, 19 Dec 2021 03:54:56 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bvnf.space; s=key1; t=1639886092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Yjs8TFLh6VCkxi8tDsPWm2fsbYEQ/qeM0hFMXG4ZaZU=; b=FW9WTyM2wH5Vc8RUMNCQckNTCI1yguPlypYNWvfwWGobktc9EHDBbkTWwUMMLRt3bbs8xO dxYfMDRbhPlRNV0zdlYNTdTK4A+xMKcqZO6kt9M/Vlsrqqq7BhDRP+bhF5lGrDspUNGnZb mq7Xcd6fHU+LUGZj3tR+O3vO2riOIU8= From: phoebos To: ~adnano/astronaut-devel@lists.sr.ht Cc: phoebos Subject: [PATCH] Makefile: make POSIX-compliant Date: Sun, 19 Dec 2021 03:54:29 +0000 Message-Id: <20211219035429.779886-1-ben@bvnf.space> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: bvnf.space 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