From 40984453e35c452c8ba71b98351a5d692055fc15 Mon Sep 17 00:00:00 2001 From: emma Date: Sat, 29 Jun 2024 08:01:33 -0600 Subject: [PATCH] Makefile: better leverage targets for sysexits build --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 70f53b4..fb9aa5d 100644 --- a/Makefile +++ b/Makefile @@ -76,13 +76,14 @@ build/o/libstrerror.rlib: build src/libstrerror.rs $(RUSTC) $(RUSTFLAGS) --crate-type=lib -o $@ \ src/libstrerror.rs -# bandage solution until bindgen(1) gets stdin support -build/o/libsysexits.rlib: build $(SYSEXITS)sysexits.h - printf '\043define EXIT_FAILURE 1\n' | cat - $(SYSEXITS)sysexits.h \ - > build/include/sysexits.h +build/o/libsysexits.rlib: build/include/sysexits.h bindgen --default-macro-constant-type signed --use-core --formatter=none \ build/include/sysexits.h | $(RUSTC) $(RUSTFLAGS) --crate-type lib -o $@ - +# bandage solution until bindgen(1) gets stdin support +build/include/sysexits.h: build $(SYSEXITS)sysexits.h + printf '\043define EXIT_FAILURE 1\n' | cat - $(SYSEXITS)sysexits.h > $@ + .PHONY: dj dj: build/bin/dj build/bin/dj: src/dj.c build