* Support for srcdir != builddir (NIX-41).
This commit is contained in:
parent
9d72bf8835
commit
b5988004d6
|
@ -14,9 +14,9 @@ relname:
|
|||
|
||||
install-data-local: init-state
|
||||
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix
|
||||
$(INSTALL_DATA) nix.conf.example $(DESTDIR)$(sysconfdir)/nix
|
||||
$(INSTALL_DATA) $(srcdir)/nix.conf.example $(DESTDIR)$(sysconfdir)/nix
|
||||
if ! test -e $(DESTDIR)$(sysconfdir)/nix/nix.conf; then \
|
||||
$(INSTALL_DATA) nix.conf.example $(DESTDIR)$(sysconfdir)/nix/nix.conf; \
|
||||
$(INSTALL_DATA) $(srcdir)/nix.conf.example $(DESTDIR)$(sysconfdir)/nix/nix.conf; \
|
||||
fi
|
||||
|
||||
if INIT_STATE
|
||||
|
@ -50,4 +50,4 @@ svn-revision:
|
|||
all-local: NEWS
|
||||
|
||||
NEWS: doc/manual/NEWS.txt
|
||||
cp doc/manual/NEWS.txt NEWS
|
||||
cp $(srcdir)/doc/manual/NEWS.txt NEWS
|
||||
|
|
|
@ -3,7 +3,7 @@ all-local: builder.pl
|
|||
install-exec-local:
|
||||
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs
|
||||
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/buildenv
|
||||
$(INSTALL_DATA) default.nix $(DESTDIR)$(datadir)/nix/corepkgs/buildenv
|
||||
$(INSTALL_DATA) $(srcdir)/default.nix $(DESTDIR)$(datadir)/nix/corepkgs/buildenv
|
||||
$(INSTALL_PROGRAM) builder.pl $(DESTDIR)$(datadir)/nix/corepkgs/buildenv
|
||||
|
||||
include ../../substitute.mk
|
||||
|
|
|
@ -3,7 +3,7 @@ all-local: unpack.sh
|
|||
install-exec-local:
|
||||
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs
|
||||
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/channels
|
||||
$(INSTALL_DATA) unpack.nix $(DESTDIR)$(datadir)/nix/corepkgs/channels
|
||||
$(INSTALL_DATA) $(srcdir)/unpack.nix $(DESTDIR)$(datadir)/nix/corepkgs/channels
|
||||
$(INSTALL_PROGRAM) unpack.sh $(DESTDIR)$(datadir)/nix/corepkgs/channels
|
||||
|
||||
include ../../substitute.mk
|
||||
|
|
|
@ -3,7 +3,7 @@ all-local: nar.sh
|
|||
install-exec-local:
|
||||
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs
|
||||
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/nar
|
||||
$(INSTALL_DATA) nar.nix $(DESTDIR)$(datadir)/nix/corepkgs/nar
|
||||
$(INSTALL_DATA) $(srcdir)/nar.nix $(DESTDIR)$(datadir)/nix/corepkgs/nar
|
||||
$(INSTALL_PROGRAM) nar.sh $(DESTDIR)$(datadir)/nix/corepkgs/nar
|
||||
|
||||
include ../../substitute.mk
|
||||
|
|
6
externals/Makefile.am
vendored
6
externals/Makefile.am
vendored
|
@ -10,7 +10,7 @@ $(DB).tar.gz:
|
|||
false
|
||||
|
||||
$(DB): $(DB).tar.gz
|
||||
gunzip < $(DB).tar.gz | tar xvf -
|
||||
gunzip < $(srcdir)/$(DB).tar.gz | tar xvf -
|
||||
|
||||
have-db:
|
||||
$(MAKE) $(DB)
|
||||
|
@ -44,7 +44,7 @@ $(ATERM).tar.gz:
|
|||
false
|
||||
|
||||
$(ATERM): $(ATERM).tar.gz
|
||||
gunzip < $(ATERM).tar.gz | tar xvf -
|
||||
gunzip < $(srcdir)/$(ATERM).tar.gz | tar xvf -
|
||||
|
||||
have-aterm:
|
||||
$(MAKE) $(ATERM)
|
||||
|
@ -76,7 +76,7 @@ $(BZIP2).tar.gz:
|
|||
false
|
||||
|
||||
$(BZIP2): $(BZIP2).tar.gz
|
||||
gunzip < $(BZIP2).tar.gz | tar xvf -
|
||||
gunzip < $(srcdir)/$(BZIP2).tar.gz | tar xvf -
|
||||
|
||||
have-bzip2:
|
||||
$(MAKE) $(BZIP2)
|
||||
|
|
|
@ -2,4 +2,4 @@ EXTRA_DIST = nix-mode.el
|
|||
|
||||
install-data-local:
|
||||
$(INSTALL) -d $(DESTDIR)$(datadir)/emacs/site-lisp
|
||||
$(INSTALL_DATA) nix-mode.el $(DESTDIR)$(datadir)/emacs/site-lisp
|
||||
$(INSTALL_DATA) $(srcdir)/nix-mode.el $(DESTDIR)$(datadir)/emacs/site-lisp
|
||||
|
|
|
@ -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…
Reference in a new issue