2005-07-22 16:52:45 +02:00
|
|
|
lib_LTLIBRARIES = libexpr.la
|
2003-10-29 16:05:18 +01:00
|
|
|
|
2005-07-22 16:52:45 +02:00
|
|
|
libexpr_la_SOURCES = nixexpr.cc nixexpr.hh parser.cc parser.hh \
|
2004-08-04 12:59:20 +02:00
|
|
|
eval.cc eval.hh primops.cc \
|
2004-10-27 00:54:26 +02:00
|
|
|
lexer-tab.c lexer-tab.h parser-tab.c parser-tab.h \
|
2006-02-08 14:21:16 +01:00
|
|
|
nixexpr-ast.hh \
|
|
|
|
get-drvs.cc get-drvs.hh
|
2004-01-30 18:14:08 +01: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 = \
|
2004-02-16 17:37:16 +01:00
|
|
|
-I.. ${bdb_include} ${aterm_include} -I../libutil -I../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
|
|
|
|
2005-10-29 20:17:45 +02:00
|
|
|
parser.cc: parser-tab.h lexer-tab.h
|
2004-01-30 17:32:14 +01:00
|
|
|
|
2004-01-30 16:21:42 +01:00
|
|
|
parser-tab.c parser-tab.h: parser.y
|
2004-01-30 17:32:14 +01:00
|
|
|
$(bison) -v -o parser-tab.c parser.y -d
|
2003-10-29 17:05:03 +01:00
|
|
|
|
2004-01-30 16:21:42 +01:00
|
|
|
lexer-tab.c lexer-tab.h: lexer.l
|
2004-01-30 17:32:14 +01:00
|
|
|
$(flex) --outfile lexer-tab.c --header-file=lexer-tab.h 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
|
|
|
|
$(perl) ../aterm-helper.pl nixexpr-ast.hh nixexpr-ast.cc < nixexpr-ast.def
|
2004-10-27 00:54:26 +02:00
|
|
|
|
2005-01-27 20:00:48 +01:00
|
|
|
nixexpr.cc nixexpr.hh: nixexpr-ast.hh
|
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
|