mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
* Support for srcdir != builddir (NIX-41).
This commit is contained in:
parent
9d72bf8835
commit
b5988004d6
16 changed files with 37 additions and 34 deletions
|
@ -5,4 +5,4 @@ libformat_la_SOURCES = format_implementation.cc free_funcs.cc \
|
|||
format_fwd.hpp group.hpp internals.hpp internals_fwd.hpp \
|
||||
macros_default.hpp
|
||||
|
||||
AM_CXXFLAGS = -Wall -I../..
|
||||
AM_CXXFLAGS = -Wall -I$(srcdir)/../..
|
||||
|
|
|
@ -3,34 +3,33 @@ lib_LTLIBRARIES = libexpr.la
|
|||
libexpr_la_SOURCES = nixexpr.cc nixexpr.hh parser.cc parser.hh \
|
||||
eval.cc eval.hh primops.cc \
|
||||
lexer-tab.c lexer-tab.h parser-tab.c parser-tab.h \
|
||||
nixexpr-ast.hh \
|
||||
get-drvs.cc get-drvs.hh
|
||||
|
||||
BUILT_SOURCES = nixexpr-ast.cc nixexpr-ast.hh \
|
||||
parser-tab.h lexer-tab.h parser-tab.c lexer-tab.c
|
||||
|
||||
EXTRA_DIST = lexer.l parser.y nixexpr-ast.def nixexpr-ast.cc
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-I.. ${bdb_include} ${aterm_include} -I../libutil -I../libstore
|
||||
-I$(srcdir)/.. ${bdb_include} ${aterm_include} \
|
||||
-I$(srcdir)/../libutil -I$(srcdir)/../libstore
|
||||
AM_CFLAGS = \
|
||||
${aterm_include}
|
||||
|
||||
|
||||
# Parser generation.
|
||||
|
||||
parser.cc: parser-tab.h lexer-tab.h
|
||||
|
||||
parser-tab.c parser-tab.h: parser.y
|
||||
$(bison) -v -o parser-tab.c parser.y -d
|
||||
$(bison) -v -o parser-tab.c $(srcdir)/parser.y -d
|
||||
|
||||
lexer-tab.c lexer-tab.h: lexer.l
|
||||
$(flex) --outfile lexer-tab.c --header-file=lexer-tab.h lexer.l
|
||||
$(flex) --outfile lexer-tab.c --header-file=lexer-tab.h $(srcdir)/lexer.l
|
||||
|
||||
|
||||
# ATerm helper function generation.
|
||||
|
||||
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
|
||||
|
||||
nixexpr.cc nixexpr.hh: nixexpr-ast.hh
|
||||
$(perl) $(srcdir)/../aterm-helper.pl nixexpr-ast.hh nixexpr-ast.cc < $(srcdir)/nixexpr-ast.def
|
||||
|
||||
|
||||
CLEANFILES =
|
||||
|
|
|
@ -9,4 +9,5 @@ AM_CXXFLAGS = \
|
|||
-DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \
|
||||
-DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
|
||||
-DNIX_VERSION=\"$(VERSION)\" \
|
||||
-I.. ${aterm_include} -I../libutil -I../libstore
|
||||
-I$(srcdir)/.. ${aterm_include} -I$(srcdir)/../libutil \
|
||||
-I$(srcdir)/../libstore
|
||||
|
|
|
@ -6,14 +6,14 @@ libstore_la_SOURCES = \
|
|||
misc.cc misc.hh \
|
||||
globals.cc globals.hh db.cc db.hh \
|
||||
references.cc references.hh pathlocks.cc pathlocks.hh \
|
||||
gc.cc gc.hh derivations-ast.hh
|
||||
gc.cc gc.hh
|
||||
|
||||
BUILT_SOURCES = derivations-ast.cc derivations-ast.hh
|
||||
|
||||
EXTRA_DIST = derivations-ast.def derivations-ast.cc
|
||||
|
||||
AM_CXXFLAGS = -Wall \
|
||||
-I.. ${bdb_include} ${aterm_include} -I../libutil
|
||||
-I$(srcdir)/.. ${bdb_include} ${aterm_include} -I$(srcdir)/../libutil
|
||||
|
||||
derivations-ast.cc derivations-ast.hh: ../aterm-helper.pl derivations-ast.def
|
||||
$(perl) ../aterm-helper.pl derivations-ast.hh derivations-ast.cc < derivations-ast.def
|
||||
|
||||
derivations.cc store.cc: derivations-ast.hh
|
||||
$(perl) $(srcdir)/../aterm-helper.pl derivations-ast.hh derivations-ast.cc < $(srcdir)/derivations-ast.def
|
||||
|
|
|
@ -9,4 +9,4 @@ libutil_la_SOURCES += \
|
|||
md5.c md5.h sha1.c sha1.h sha256.c sha256.h md32_common.h
|
||||
endif
|
||||
|
||||
AM_CXXFLAGS = -Wall -I.. ${aterm_include}
|
||||
AM_CXXFLAGS = -Wall -I$(srcdir)/.. ${aterm_include}
|
||||
|
|
|
@ -12,5 +12,6 @@ main.o: help.txt.hh
|
|||
../bin2c/bin2c helpText < $< > $@ || (rm $@ && exit 1)
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-I.. ${bdb_include} ${aterm_include} -I../libutil -I../libstore \
|
||||
-I../libexpr -I../libmain
|
||||
-I$(srcdir)/.. ${bdb_include} ${aterm_include} \
|
||||
-I$(srcdir)/../libutil -I$(srcdir)/../libstore \
|
||||
-I$(srcdir)/../libexpr -I$(srcdir)/../libmain -I../libexpr
|
||||
|
|
|
@ -10,4 +10,4 @@ nix-hash.o: help.txt.hh
|
|||
../bin2c/bin2c helpText < $< > $@ || (rm $@ && exit 1)
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-I.. -I../../externals/inst/include -I../libutil -I../libstore -I../libmain
|
||||
-I$(srcdir)/.. -I$(srcdir)/../libutil -I$(srcdir)/../libstore -I$(srcdir)/../libmain
|
||||
|
|
|
@ -11,5 +11,6 @@ main.o: help.txt.hh
|
|||
../bin2c/bin2c helpText < $< > $@ || (rm $@ && exit 1)
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-I.. ${bdb_include} ${aterm_include} -I../libutil -I../libstore \
|
||||
-I../libexpr -I../libmain
|
||||
${bdb_include} ${aterm_include} \
|
||||
-I$(srcdir)/.. -I$(srcdir)/../libutil -I$(srcdir)/../libstore \
|
||||
-I$(srcdir)/../libexpr -I$(srcdir)/../libmain -I../libexpr
|
||||
|
|
|
@ -8,7 +8,7 @@ nix_log2xml_SOURCES = log2xml.cc
|
|||
%.html: %.xml mark-errors.xsl log2html.xsl
|
||||
$(xsltproc) mark-errors.xsl $< | $(xsltproc) log2html.xsl - > $@
|
||||
|
||||
LOG2HTML = mark-errors.xsl log2html.xsl treebits.js
|
||||
LOG2HTML = $(srcdir)/mark-errors.xsl $(srcdir)/log2html.xsl $(srcdir)/treebits.js
|
||||
|
||||
EXTRA_DIST = $(LOG2HTML)
|
||||
|
||||
|
|
|
@ -10,4 +10,5 @@ main.o: help.txt.hh
|
|||
../bin2c/bin2c helpText < $< > $@ || (rm $@ && exit 1)
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-I.. ${bdb_include} $(aterm_include) -I../libutil -I../libstore -I../libmain
|
||||
-I$(srcdir)/.. ${bdb_include} $(aterm_include) -I$(srcdir)/../libutil \
|
||||
-I$(srcdir)/../libstore -I$(srcdir)/../libmain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue