From bb7cae7e92a9520ba080c0e565dafdeca7e247d7 Mon Sep 17 00:00:00 2001
From: Alex Shinn <ashinn@users.noreply.github.com>
Date: Mon, 10 Jan 2011 23:21:02 +0900
Subject: [PATCH] adding a utility to make sure I'm using valid definitions

---
 Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 3597339a..a755d3b5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # -*- makefile-gmake -*-
 
-.PHONY: all libs doc dist clean cleaner dist-clean install uninstall test
+.PHONY: all libs doc dist clean cleaner dist-clean install uninstall test checkdefs
 .PRECIOUS: %.c
 
 # install configuration
@@ -167,6 +167,13 @@ cleaner: clean
 dist-clean: cleaner
 	for f in `find lib -name \*.stub`; do rm -f $${f%.stub}.c; done
 
+checkdefs:
+	@for d in $(D); do \
+	    if ! grep -q " SEXP_USE_$${d%%=*} " include/chibi/features.h; then \
+	        echo "WARNING: unknown definition $$d"; \
+	    fi; \
+	done
+
 test-basic: chibi-scheme$(EXE)
 	@for f in tests/basic/*.scm; do \
 	    $(CHIBI) $$f >$${f%.scm}.out 2>$${f%.scm}.err; \