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