2006-09-04 15:12:24 +00:00
|
|
|
pkglib_LTLIBRARIES = libexpr.la
|
2003-10-29 15:05:18 +00:00
|
|
|
|
2006-09-04 21:36:15 +00:00
|
|
|
libexpr_la_SOURCES = nixexpr.cc nixexpr.hh \
|
2004-08-04 10:59:20 +00:00
|
|
|
eval.cc eval.hh primops.cc \
|
2006-09-04 21:36:15 +00:00
|
|
|
lexer-tab.cc lexer-tab.hh parser-tab.cc parser-tab.hh \
|
2006-07-26 15:05:15 +00:00
|
|
|
get-drvs.cc get-drvs.hh \
|
2006-08-24 14:16:55 +00:00
|
|
|
attr-path.cc attr-path.hh \
|
|
|
|
expr-to-xml.cc expr-to-xml.hh
|
2004-01-30 17:14:08 +00:00
|
|
|
|
2006-05-12 11:47:45 +00:00
|
|
|
BUILT_SOURCES = nixexpr-ast.cc nixexpr-ast.hh \
|
2006-09-04 21:36:15 +00:00
|
|
|
parser-tab.hh lexer-tab.hh parser-tab.cc lexer-tab.cc
|
2006-05-12 11:47:45 +00:00
|
|
|
|
2004-10-29 11:22:49 +00:00
|
|
|
EXTRA_DIST = lexer.l parser.y nixexpr-ast.def nixexpr-ast.cc
|
2003-10-29 15:05:18 +00:00
|
|
|
|
|
|
|
AM_CXXFLAGS = \
|
2006-05-12 11:47:45 +00:00
|
|
|
-I$(srcdir)/.. ${bdb_include} ${aterm_include} \
|
|
|
|
-I$(srcdir)/../libutil -I$(srcdir)/../libstore
|
2004-01-30 15:21:42 +00:00
|
|
|
AM_CFLAGS = \
|
2004-02-16 16:37:16 +00:00
|
|
|
${aterm_include}
|
2003-10-29 16:05:03 +00:00
|
|
|
|
|
|
|
|
2004-01-30 15:21:42 +00:00
|
|
|
# Parser generation.
|
2003-10-29 16:05:03 +00:00
|
|
|
|
2006-09-04 21:06:23 +00:00
|
|
|
parser-tab.cc parser-tab.hh: parser.y
|
|
|
|
$(bison) -v -o parser-tab.cc $(srcdir)/parser.y -d
|
2003-10-29 16:05:03 +00:00
|
|
|
|
2006-09-04 21:36:15 +00:00
|
|
|
lexer-tab.cc lexer-tab.hh: lexer.l
|
|
|
|
$(flex) --outfile lexer-tab.cc --header-file=lexer-tab.hh $(srcdir)/lexer.l
|
2003-10-29 16:05:03 +00:00
|
|
|
|
|
|
|
|
2004-10-26 22:54:26 +00:00
|
|
|
# ATerm helper function generation.
|
|
|
|
|
2004-10-29 11:22:49 +00:00
|
|
|
nixexpr-ast.cc nixexpr-ast.hh: ../aterm-helper.pl nixexpr-ast.def
|
2006-05-12 11:47:45 +00:00
|
|
|
$(perl) $(srcdir)/../aterm-helper.pl nixexpr-ast.hh nixexpr-ast.cc < $(srcdir)/nixexpr-ast.def
|
2004-10-26 22:54:26 +00:00
|
|
|
|
|
|
|
|
2004-01-30 15:21:42 +00:00
|
|
|
CLEANFILES =
|
2005-07-16 14:07:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
# SDF stuff (not built by default).
|
|
|
|
nix.tbl: nix.sdf
|
|
|
|
sdf2table -m Nix -s -i nix.sdf -o nix.tbl
|
|
|
|
|
|
|
|
test.ast: test.nix nix.tbl
|
|
|
|
sglri -p nix.tbl -i test.nix -o test.ast
|