* Refactoring (step 2).

This commit is contained in:
Eelco Dolstra 2003-11-19 12:03:01 +00:00
parent ac68840e79
commit fd7ac09f10
6 changed files with 17 additions and 10 deletions

View File

@ -35,6 +35,7 @@ AC_CONFIG_FILES([Makefile
src/nix-store/Makefile
src/nix-hash/Makefile
src/libexpr/Makefile
src/nix-instantiate/Makefile
scripts/Makefile
corepkgs/Makefile
corepkgs/fetchurl/Makefile

View File

@ -1,2 +1,2 @@
SUBDIRS = bin2c boost libutil libstore libmain nix-store nix-hash \
libexpr #nix-instantiate
libexpr nix-instantiate

View File

@ -1,12 +1,9 @@
bin_PROGRAMS = nix-instantiate
noinst_LIBRARIES = libexpr.a
nix_instantiate_SOURCES = nixexpr.cc parser.cc eval.cc primops.cc main.cc
nix_instantiate_LDADD = ../libmain/libmain.a ../libstore/libstore.a ../libutil/libutil.a \
../boost/format/libformat.a -L../../externals/inst/lib -ldb_cxx \
-lsglr -lATB -lconversion -lasfix2 -lmept -lATerm
libexpr_a_SOURCES = nixexpr.cc parser.cc eval.cc primops.cc
AM_CXXFLAGS = \
-I.. -I../../externals/inst/include -I../libutil -I../libstore -I../libmain
-I.. -I../../externals/inst/include -I../libutil -I../libstore
# Parse table generation.

View File

@ -12,7 +12,6 @@ extern "C" {
#include "aterm.hh"
#include "parser.hh"
#include "shared.hh"
#include "parse-table.h"
@ -100,8 +99,7 @@ Expr parseExprFromFile(Path path)
ATprotect(&lang);
lang = ATmake("Nix");
if (!SGopenLanguageFromTerm(
(char *) programId.c_str(), lang, parseTable))
if (!SGopenLanguageFromTerm("nix-parse", lang, parseTable))
throw Error(format("cannot open language"));
SG_STARTSYMBOL_ON();

View File

@ -0,0 +1,11 @@
bin_PROGRAMS = nix-instantiate
nix_instantiate_SOURCES = main.cc
nix_instantiate_LDADD = ../libmain/libmain.a ../libexpr/libexpr.a \
../libstore/libstore.a ../libutil/libutil.a \
../boost/format/libformat.a -L../../externals/inst/lib -ldb_cxx \
-lsglr -lATB -lconversion -lasfix2 -lmept -lATerm
AM_CXXFLAGS = \
-I.. -I../../externals/inst/include -I../libutil -I../libstore \
-I../libexpr -I../libmain