Add a verify stanza to the Makefile to compare the option bits in markdown.h and mkdio.h

This commit is contained in:
david parsons
2010-10-22 13:43:01 -07:00
parent a3cca9805f
commit 456f4b873d
2 changed files with 12 additions and 1 deletions
+4 -1
View File
@@ -20,7 +20,7 @@ MAN3PAGES=mkd-callbacks.3 mkd-functions.3 markdown.3 mkd-line.3
all: $(PGMS) $(SAMPLE_PGMS)
install: $(PGMS)
install: $(PGMS) verify
@INSTALL_PROGRAM@ $(PGMS) $(DESTDIR)/$(BINDIR)
@INSTALL_DATA@ $(MKDLIB) $(DESTDIR)/$(LIBDIR)
@INSTALL_DATA@ mkdio.h $(DESTDIR)/$(INCDIR)
@@ -75,6 +75,9 @@ $(MKDLIB): $(OBJS)
$(AR) crv $(MKDLIB) $(OBJS)
$(RANLIB) $(MKDLIB)
verify: tools/checkbits.sh
@tools/checkbits.sh && echo "headers are ok!"
test: $(PGMS) echo cols
@for x in tests/*.t; do \
sh $$x || exit 1; \
+8
View File
@@ -0,0 +1,8 @@
#! /bin/sh
trap "rm -f in.markdown.h in.mkdio.h" EXIT
grep '#define MKD_' markdown.h | awk '$3 ~ /0x0/ {print $2,$3;}' > in.markdown.h
grep '#define MKD_' mkdio.h | awk '$3 ~ /0x0/ {print $2,$3;}' > in.mkdio.h
exec diff -c -bw in.markdown.h in.mkdio.h