commit 2a821bfb2506e73103b89d82709acb50170b6160 parent 90fc4a48a52205bff930762404a9a291a1dc877f Author: William Casarin <jb55@jb55.com> Date: Thu, 10 Aug 2023 21:15:59 -0700 make: simplify flatcc builder commands Diffstat:
M | Makefile | | | 30 | +++++++++++++----------------- |
A | bindings/c/.dir | | | 0 |
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/Makefile b/Makefile @@ -42,28 +42,24 @@ config.h: configurator bindings-c: $(C_BINDINGS) -bindings/%: - @mkdir -p $@ +bindings/%/.dir: + mkdir -p $(shell dirname $@) + touch $@ -bindings/c/profile_builder.h: schemas/profile.fbs bindings/c - flatcc --builder $< - @mv profile_builder.h $@ +bindings/c/%_builder.h: schemas/%.fbs bindings/c/.dir + flatcc --builder $< -o bindings/c -bindings/c/profile_verifier.h bindings/c/profile_reader.h: schemas/profile.fbs bindings/c - flatcc --verifier $< - @mv profile_verifier.h profile_reader.h bindings/c +bindings/c/%_verifier.h bindings/c/%_reader.h: schemas/%.fbs bindings/c/.dir + flatcc --verifier -o bindings/c $< -bindings/c/flatbuffers_common_reader.h: bindings/c - flatcc --common_reader - @mv flatbuffers_common_reader.h $@ +bindings/c/flatbuffers_common_reader.h: bindings/c/.dir + flatcc --common_reader -o bindings/c -bindings/c/flatbuffers_common_builder.h: bindings/c - flatcc --common_builder - @mv flatbuffers_common_builder.h $@ +bindings/c/flatbuffers_common_builder.h: bindings/c/.dir + flatcc --common_builder -o bindings/c -bindings/c/profile_json_parser.h: schemas/profile.fbs bindings/c - flatcc --json-parser $< - @mv profile_json_parser.h bindings/c +bindings/c/%_json_parser.h: schemas/%.fbs bindings/c/.dir + flatcc --json-parser $< -o bindings/c bindings-swift: bindings/swift/NdbProfile.swift diff --git a/bindings/c/.dir b/bindings/c/.dir