Makefile: make POSIX-compliant
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.
Some of 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 running the commands in a
The RM macro was not defined, and it is not one of the predefined MACROS
required by POSIX.
The third version of the patch uses a POSIX sh configure script which
must be run before `make`. The script outputs local details into the file
config.mk, and now when a new version of astronaut is released, the RELEASE
variable in `configure` should be updated.
config.mk is included in the Makefile at a position such that if a specific
prefix was given to the configure script, then BINDIR, SHAREDIR, and MANDIR
are set correctly. However, a user may still write `make PREFIX=/my/prefix`
as before, because macros set on the command line take the highest precedence,
or now they can also write `./configure --prefix=/my/prefix`, then `make`.
A 4th version (hopefully the last!) to fix a typo in the printf statement for
PREFIX in configure. Now the configure script passes shellcheck.