Makefile: better leverage targets for sysexits build

This commit is contained in:
Emma Tebibyte 2024-06-29 08:01:33 -06:00
parent cb88ed9809
commit 40984453e3
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270

View File

@ -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