From d201f9228ce6e6379c845d1a541a133629da4b05 Mon Sep 17 00:00:00 2001 From: emma Date: Tue, 18 Jun 2024 16:32:20 -0600 Subject: [PATCH 1/3] Makefile: updates to use new POSIX 2024 standard features! --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1952a25..15b2968 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,7 @@ .POSIX: # if using BSD make(1), remove these pragmas because they break it -.PRAGMA: posix_202x # future POSIX standard support à la pdpmake(1) -.PRAGMA: command_comment # breaks without this? + DESTDIR ?= dist PREFIX ?= /usr/local @@ -32,9 +31,9 @@ CFLAGS += -I$(SYSEXITS) .PHONY: all all: dj false fop hru intcmp mm npc rpn scrut str strcmp swab true +# keep build/include until bindgen(1) has stdin support +# https://github.com/rust-lang/rust-bindgen/issues/2703 build: - # keep build/include until bindgen(1) has stdin support - # https://github.com/rust-lang/rust-bindgen/issues/2703 mkdir -p build/bin build/include build/lib build/o build/test .PHONY: clean @@ -67,9 +66,9 @@ build/o/libstrerror.rlib: build src/strerror.rs $(RUSTC) $(RUSTFLAGS) --crate-type=lib -o $@ \ src/strerror.rs +# bandage solution until bindgen(1) gets stdin support build/o/libsysexits.rlib: build $(SYSEXITS)sysexits.h - # bandage solution until bindgen(1) gets stdin support - printf '#define EXIT_FAILURE 1\n' | cat - $(SYSEXITS)sysexits.h \ + printf '\043define EXIT_FAILURE 1\n' | cat - $(SYSEXITS)sysexits.h \ > build/include/sysexits.h bindgen --default-macro-constant-type signed --use-core --formatter=none \ build/include/sysexits.h | $(RUSTC) $(RUSTFLAGS) --crate-type lib -o $@ - From f553cff09651512b609e2c394f368775fe9c674b Mon Sep 17 00:00:00 2001 From: emma Date: Tue, 18 Jun 2024 16:33:22 -0600 Subject: [PATCH 2/3] Makefile: removes unneeded comment --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 15b2968..0dee534 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,6 @@ .POSIX: -# if using BSD make(1), remove these pragmas because they break it - - DESTDIR ?= dist PREFIX ?= /usr/local From 72f57ba08be24574ecd458f351c13ecf75d8192d Mon Sep 17 00:00:00 2001 From: emma Date: Wed, 19 Jun 2024 23:29:22 -0600 Subject: [PATCH 3/3] Makefile: adds octal disclaimer --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 0dee534..7756c56 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,9 @@ # permitted in any medium without royalty provided the copyright notice and this # notice are preserved. This file is offered as-is, without any warranty. +# The octal escape \043 is utilized twice in this file as make(1p) will +# interpret a hash in a rule as an inline comment. + .POSIX: DESTDIR ?= dist