2006-09-04 17:12:24 +02:00
|
|
|
pkglib_LTLIBRARIES = libexpr.la
|
2003-10-29 16:05:18 +01:00
|
|
|
|
2006-09-05 00:55:28 +02:00
|
|
|
libexpr_la_SOURCES = \
|
|
|
|
nixexpr.cc eval.cc primops.cc lexer-tab.cc parser-tab.cc \
|
|
|
|
get-drvs.cc attr-path.cc expr-to-xml.cc
|
|
|
|
|
|
|
|
pkginclude_HEADERS = \
|
|
|
|
nixexpr.hh eval.hh parser.hh lexer-tab.hh parser-tab.hh \
|
|
|
|
get-drvs.hh attr-path.hh expr-to-xml.hh
|
2006-09-05 00:41:36 +02:00
|
|
|
|
|
|
|
libexpr_la_LIBADD = ../libutil/libutil.la ../libstore/libstore.la \
|
|
|
|
../boost/format/libformat.la
|
2004-01-30 18:14:08 +01:00
|
|
|
|
2006-05-12 13:47:45 +02:00
|
|
|
BUILT_SOURCES = nixexpr-ast.cc nixexpr-ast.hh \
|
2006-09-04 23:36:15 +02:00
|
|
|
parser-tab.hh lexer-tab.hh parser-tab.cc lexer-tab.cc
|
2006-05-12 13:47:45 +02:00
|
|
|
|
2004-10-29 13:22:49 +02:00
|
|
|
EXTRA_DIST = lexer.l parser.y nixexpr-ast.def nixexpr-ast.cc
|
2003-10-29 16:05:18 +01:00
|
|
|
|
|
|
|
AM_CXXFLAGS = \
|
2006-05-12 13:47:45 +02:00
|
|
|
-I$(srcdir)/.. ${bdb_include} ${aterm_include} \
|
|
|
|
-I$(srcdir)/../libutil -I$(srcdir)/../libstore
|
2004-01-30 16:21:42 +01:00
|
|
|
AM_CFLAGS = \
|
2004-02-16 17:37:16 +01:00
|
|
|
${aterm_include}
|
2003-10-29 17:05:03 +01:00
|
|
|
|
|
|
|
|
2004-01-30 16:21:42 +01:00
|
|
|
# Parser generation.
|
2003-10-29 17:05:03 +01:00
|
|
|
|
2006-09-04 23:06:23 +02:00
|
|
|
parser-tab.cc parser-tab.hh: parser.y
|
|
|
|
$(bison) -v -o parser-tab.cc $(srcdir)/parser.y -d
|
2003-10-29 17:05:03 +01:00
|
|
|
|
2006-09-04 23:36:15 +02: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 17:05:03 +01:00
|
|
|
|
|
|
|
|
2004-10-27 00:54:26 +02:00
|
|
|
# ATerm helper function generation.
|
|
|
|
|
2004-10-29 13:22:49 +02:00
|
|
|
nixexpr-ast.cc nixexpr-ast.hh: ../aterm-helper.pl nixexpr-ast.def
|
2006-05-12 13:47:45 +02:00
|
|
|
$(perl) $(srcdir)/../aterm-helper.pl nixexpr-ast.hh nixexpr-ast.cc < $(srcdir)/nixexpr-ast.def
|
2004-10-27 00:54:26 +02:00
|
|
|
|
|
|
|
|
2004-01-30 16:21:42 +01:00
|
|
|
CLEANFILES =
|
2005-07-16 16:07:35 +02: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
|