diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-08-30 17:46:06 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-08-30 17:46:06 +0200 |
commit | 9988a0123c03edccd95cd7b3b45620b3ac6b445c (patch) | |
tree | 089dbd6b1ff3b45c5c6e5e47f3727a7bd21d8ee8 /Makefile | |
parent | ff2b89be866b5a925b37ac80ca31898ae0ee4187 (diff) | |
download | rust-hoedown-9988a0123c03edccd95cd7b3b45620b3ac6b445c.tar.gz |
Perfect hashing for HTML block names
Because fuck binary searches, that's why.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -23,7 +23,7 @@ CFLAGS=-c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml $(MFLAGS) LDFLAGS=-g -O3 -Wall -Werror $(MFLAGS) CC=gcc -all: libsundown.so sundown smartypants +all: libsundown.so sundown smartypants html_blocks .PHONY: all clean @@ -43,6 +43,13 @@ sundown: examples/sundown.o src/markdown.o src/array.o src/autolink.o src/buffer smartypants: examples/smartypants.o src/buffer.o html/html_smartypants.o html/html.o src/autolink.o $(CC) $(LDFLAGS) $^ -o $@ +# perfect hashing +html_blocks: src/html_blocks.h + +src/html_blocks.h: html_block_names.txt + gperf -N find_block_tag -H hash_block_tag -C -c -E --ignore-case $^ > $@ + + # housekeeping clean: rm -f src/*.o html/*.o examples/*.o |