diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-01-29 13:59:38 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-01-29 17:41:26 +0100 |
commit | 4bb96f586a8857535b658189e4f236ec18295f00 (patch) | |
tree | cbcbae263a609ee487dd502e644f36caec413056 | |
parent | 3c12ff7c9c1ea7c708023d57ecd95ab023be5f65 (diff) |
openpgp-ffi: Check for missing declarations.
-rw-r--r-- | openpgp-ffi/Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/openpgp-ffi/Makefile b/openpgp-ffi/Makefile index 4ece1db2..d0d84bdd 100644 --- a/openpgp-ffi/Makefile +++ b/openpgp-ffi/Makefile @@ -34,10 +34,24 @@ all: build build: $(call sequoia_openpgp_pc,$(CARGO_TARGET_DIR)/debug,true) +.PHONY: force-build +force-build: + cd .. ; cargo build -p sequoia-openpgp-ffi + # Testing and examples. .PHONY: test check -test check: - : +test check: check-headers + +# Header files. +.PHONY: check-headers +check-headers: force-build + nm -g --defined-only \ + $(CARGO_TARGET_DIR)/debug/libsequoia_openpgp_ffi.so \ + | cut -d' ' -f3 | sort -u | grep pgp_ \ + | while read SYM ; \ + do git grep -q "$$SYM" include || echo $$SYM ; \ + done | tee $(CARGO_TARGET_DIR)/debug/.check-headers ; \ + ! test -s $(CARGO_TARGET_DIR)/debug/.check-headers .PHONY: examples examples: |