summaryrefslogtreecommitdiff
path: root/src/treebuilder/Makefile
blob: 28be92a52debc5d89eb67d2b8c83cfece8653da0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Child makefile fragment for libhubbub
#
# Toolchain is provided by top-level makefile
#
# Variables provided by top-level makefile
#
# COMPONENT		The name of the component
# EXPORT		The location of the export directory
# TOP			The location of the source tree root
# RELEASEDIR		The place to put release objects
# DEBUGDIR		The place to put debug objects
#
# do_include		Canned command sequence to include a child makefile
#
# Variables provided by parent makefile:
#
# DIR			The name of the directory we're in, relative to $(TOP)
#
# Variables we can manipulate:
#
# ITEMS_CLEAN		The list of items to remove for "make clean"
# ITEMS_DISTCLEAN	The list of items to remove for "make distclean"
# TARGET_TESTS		The list of target names to run for "make test"
#
# SOURCES		The list of sources to build for $(COMPONENT)
#
# Plus anything from the toolchain

# Push parent directory onto the directory stack
sp             := $(sp).x
dirstack_$(sp) := $(d)
d              := $(DIR)

# Sources
SRCS_$(d) := 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

# Append to sources for component
SOURCES += $(addprefix $(d), $(SRCS_$(d)))

# Now include any children we may have
MAKE_INCLUDES := $(wildcard $(d)*/Makefile)
$(eval $(foreach INC, $(MAKE_INCLUDES), $(call do_include,$(INC))))

# Finally, pop off the directory stack
d  := $(dirstack_$(sp))
sp := $(basename $(sp))