path: root/src/bytecode/Makefile
diff options
authorJohn Mark Bell <>2008-10-25 01:24:03 +0000
committerJohn Mark Bell <>2008-10-25 01:24:03 +0000
commit5caf9a56956f55b70d937cea7e135417bada7b25 (patch)
tree1fec329c7b8133c3ef4b76b18ae48fb161f94c71 /src/bytecode/Makefile
parentc8e73871f9006987983fd1010d97b6168c13f6a3 (diff)
A bunch of property parsers.
Split out !important parsing into a separate function. Support for dumping bytecode to a file handle in some kind of human-readable format. Strings can be represented in the bytecode as a pointer, length pair rather than embedding the string data into the bytecode -- all strings are interned by the core syntax parser. Add todo relating to early destruction of parser object (it shouldn't be needed once parsing is complete). Note documented issue surrounding interned string dictionary, however. In general, it seems wasteful to create a new dictionary containing string representations of keywords for every single parser instance. It would be better to have one central (statically allocated?) dictionary for this and then each parser instance can have a smaller dictionary containing any unknown strings contained within the stylesheet being parsed (e.g. string constants or URLs). svn path=/trunk/libcss/; revision=5627
Diffstat (limited to 'src/bytecode/Makefile')
1 files changed, 49 insertions, 0 deletions
diff --git a/src/bytecode/Makefile b/src/bytecode/Makefile
new file mode 100644
index 0000000..db4d922
--- /dev/null
+++ b/src/bytecode/Makefile
@@ -0,0 +1,49 @@
+# Child makefile fragment
+# 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)
+# Manipulate include paths
+CFLAGS := $(CFLAGS) -I$(d)
+# Sources
+SRCS_$(d) := dump.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))