harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d1e9fcea7c5b85e57dbf0a9b77cc4bd693865b1b
parent a9a6a2195e5672e086c693c5c73436c3f27ee696
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat, 22 Jan 2022 23:41:31 -0500

config.sh: POSIX-compliant config.mk

This commit replaces `?=` with `=` in the generated config.mk file, and
removes all uses of `+=`.

Fixes: https://todo.sr.ht/~sircmpwn/hare/166
Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mconfig.sh | 58+++++++++++++++++++++++++++++-----------------------------
1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/config.sh b/config.sh @@ -152,36 +152,36 @@ run_configure() { exit 1 fi - cat <<-EOF > "$outdir"/config.mk - CC=$CC - AS=$AS - LD=$LD - AR=$AR - QBE=$QBE - SCDOC=$SCDOC - LIBS=$LIBS - PREFIX=${PREFIX:-/usr/local} - OUTDIR=${outdir} - SRCDIR=${srcdir} - BINDIR?=${BINDIR:-\$(PREFIX)/bin} - SHAREDIR?=${SHAREDIR:-\$(PREFIX)/share} - SYSCONFDIR?=${SYSCONFDIR:-\$(PREFIX)/etc} - LIBDIR?=${LIBDIR:-\$(PREFIX)/lib} - MANDIR?=${MANDIR:-\$(PREFIX)/share/man} - VARLIBDIR?=${MANDIR:-\$(PREFIX)/var/lib} - CACHE=\$(OUTDIR)/cache - CFLAGS=${CFLAGS} - CFLAGS+=-Iinclude -I\$(OUTDIR) - CFLAGS+=-DPREFIX='"\$(PREFIX)"' - CFLAGS+=-DLIBDIR='"\$(LIBDIR)"' - CFLAGS+=-DVARLIBDIR='"\$(VARLIBDIR)"' - CFLAGS+=-DSYSCONFDIR='"\$(SYSCONFDIR)"' - LDFLAGS=${LDFLAGS} - HARECACHE=./mod - - all: ${all} - EOF printf "Creating %s/config.mk... " "$outdir" + cat <<EOF > "$outdir"/config.mk +CC=$CC +AS=$AS +LD=$LD +AR=$AR +QBE=$QBE +SCDOC=$SCDOC +LIBS=$LIBS +PREFIX=${PREFIX:-/usr/local} +OUTDIR=${outdir} +SRCDIR=${srcdir} +BINDIR=${BINDIR:-\$(PREFIX)/bin} +SHAREDIR=${SHAREDIR:-\$(PREFIX)/share} +SYSCONFDIR=${SYSCONFDIR:-\$(PREFIX)/etc} +LIBDIR=${LIBDIR:-\$(PREFIX)/lib} +MANDIR=${MANDIR:-\$(PREFIX)/share/man} +VARLIBDIR=${MANDIR:-\$(PREFIX)/var/lib} +CACHE=\$(OUTDIR)/cache +CFLAGS=${CFLAGS} \\ + -Iinclude -I\$(OUTDIR) \\ + -DPREFIX='"\$(PREFIX)"' \\ + -DLIBDIR='"\$(LIBDIR)"' \\ + -DVARLIBDIR='"\$(VARLIBDIR)"' \\ + -DSYSCONFDIR='"\$(SYSCONFDIR)"' +LDFLAGS=${LDFLAGS} +HARECACHE=./mod + +all: ${all} +EOF for target in $all do