diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-07-30 20:05:15 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-07-30 20:05:15 +0000 |
commit | a324baae03e4018c2c1aa8e4692505f8fcbe7172 (patch) | |
tree | 1c0ee3e41d2284347c87a12682f023d9c83416dc /src/parse/Makefile | |
parent | e697509c239a4dd22e4543aca5308b57b248e4f3 (diff) | |
download | libcss-a324baae03e4018c2c1aa8e4692505f8fcbe7172.tar.gz libcss-a324baae03e4018c2c1aa8e4692505f8fcbe7172.tar.bz2 |
Implement the first-stage parser.
Things missing:
1) Recovery after parse errors
2) Event emission (the locations of DEBUG_EVENTS are about right for this)
3) A second-stage parser
4) Any kind of testsuite
svn path=/trunk/libcss/; revision=4825
Diffstat (limited to 'src/parse/Makefile')
-rw-r--r-- | src/parse/Makefile | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/parse/Makefile b/src/parse/Makefile new file mode 100644 index 0000000..9e1c6dd --- /dev/null +++ b/src/parse/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) := parse.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)) |