From d201f9228ce6e6379c845d1a541a133629da4b05 Mon Sep 17 00:00:00 2001 From: emma Date: Tue, 18 Jun 2024 16:32:20 -0600 Subject: [PATCH] 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 $@ -