# Sources
DIR_SOURCES := treebuilder.c \
		initial.c before_html.c before_head.c in_head.c \
		in_head_noscript.c after_head.c in_body.c in_table.c \
		in_caption.c in_column_group.c in_table_body.c in_row.c \
		in_cell.c in_select.c in_select_in_table.c \
		in_foreign_content.c after_body.c in_frameset.c \
		after_frameset.c after_after_body.c after_after_frameset.c \
		generic_rcdata.c element-type.c

$(DIR)autogenerated-element-type.c: $(DIR)element-type.gperf
	$(VQ)$(ECHO) "   GPERF: $<"
	$(Q)gperf --output-file=$@.tmp $<
	$(Q)$(SED) -e 's/^\(const struct element_type_map\)/static \1/' $@.tmp >$@
	$(Q)$(RM) $@.tmp

PRE_TARGETS := $(DIR)autogenerated-element-type.c

CLEAN_ITEMS := $(DIR)autogenerated-element-type.c

include $(NSBUILD)/Makefile.subdir
