From e0234dfddc8343a6bca80ba6e6e93d083ce51a85 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 30 Jan 2014 12:11:06 +0100 Subject: Rename Makefile -> local.mk --- Makefile | 32 ++++++++++++++++---------------- corepkgs/Makefile | 5 ----- corepkgs/local.mk | 5 +++++ perl/Makefile | 42 ------------------------------------------ perl/local.mk | 42 ++++++++++++++++++++++++++++++++++++++++++ scripts/Makefile | 39 --------------------------------------- scripts/local.mk | 39 +++++++++++++++++++++++++++++++++++++++ src/boost/format/Makefile | 7 ------- src/boost/format/local.mk | 7 +++++++ src/bsdiff-4.3/Makefile | 13 ------------- src/bsdiff-4.3/local.mk | 13 +++++++++++++ src/libexpr/Makefile | 20 -------------------- src/libexpr/local.mk | 20 ++++++++++++++++++++ src/libmain/Makefile | 11 ----------- src/libmain/local.mk | 11 +++++++++++ src/libstore/Makefile | 26 -------------------------- src/libstore/local.mk | 26 ++++++++++++++++++++++++++ src/libutil/Makefile | 15 --------------- src/libutil/local.mk | 15 +++++++++++++++ src/nix-daemon/Makefile | 9 --------- src/nix-daemon/local.mk | 9 +++++++++ src/nix-env/Makefile | 7 ------- src/nix-env/local.mk | 7 +++++++ src/nix-hash/Makefile | 7 ------- src/nix-hash/local.mk | 7 +++++++ src/nix-instantiate/Makefile | 7 ------- src/nix-instantiate/local.mk | 7 +++++++ src/nix-log2xml/Makefile | 8 -------- src/nix-log2xml/local.mk | 8 ++++++++ src/nix-store/Makefile | 9 --------- src/nix-store/local.mk | 9 +++++++++ tests/Makefile | 21 --------------------- tests/local.mk | 21 +++++++++++++++++++++ 33 files changed, 262 insertions(+), 262 deletions(-) delete mode 100644 corepkgs/Makefile create mode 100644 corepkgs/local.mk delete mode 100644 perl/Makefile create mode 100644 perl/local.mk delete mode 100644 scripts/Makefile create mode 100644 scripts/local.mk delete mode 100644 src/boost/format/Makefile create mode 100644 src/boost/format/local.mk delete mode 100644 src/bsdiff-4.3/Makefile create mode 100644 src/bsdiff-4.3/local.mk delete mode 100644 src/libexpr/Makefile create mode 100644 src/libexpr/local.mk delete mode 100644 src/libmain/Makefile create mode 100644 src/libmain/local.mk delete mode 100644 src/libstore/Makefile create mode 100644 src/libstore/local.mk delete mode 100644 src/libutil/Makefile create mode 100644 src/libutil/local.mk delete mode 100644 src/nix-daemon/Makefile create mode 100644 src/nix-daemon/local.mk delete mode 100644 src/nix-env/Makefile create mode 100644 src/nix-env/local.mk delete mode 100644 src/nix-hash/Makefile create mode 100644 src/nix-hash/local.mk delete mode 100644 src/nix-instantiate/Makefile create mode 100644 src/nix-instantiate/local.mk delete mode 100644 src/nix-log2xml/Makefile create mode 100644 src/nix-log2xml/local.mk delete mode 100644 src/nix-store/Makefile create mode 100644 src/nix-store/local.mk delete mode 100644 tests/Makefile create mode 100644 tests/local.mk diff --git a/Makefile b/Makefile index b0a3e27aa197..b7ffc1b037ce 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,20 @@ SUBS = \ - src/boost/format/Makefile \ - src/libutil/Makefile \ - src/libstore/Makefile \ - src/libmain/Makefile \ - src/libexpr/Makefile \ - src/nix-hash/Makefile \ - src/nix-store/Makefile \ - src/nix-instantiate/Makefile \ - src/nix-env/Makefile \ - src/nix-daemon/Makefile \ - src/nix-log2xml/Makefile \ - src/bsdiff-4.3/Makefile \ - perl/Makefile \ - scripts/Makefile \ - corepkgs/Makefile \ - tests/Makefile \ + src/boost/format/local.mk \ + src/libutil/local.mk \ + src/libstore/local.mk \ + src/libmain/local.mk \ + src/libexpr/local.mk \ + src/nix-hash/local.mk \ + src/nix-store/local.mk \ + src/nix-instantiate/local.mk \ + src/nix-env/local.mk \ + src/nix-daemon/local.mk \ + src/nix-log2xml/local.mk \ + src/bsdiff-4.3/local.mk \ + perl/local.mk \ + scripts/local.mk \ + corepkgs/local.mk \ + tests/local.mk \ GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr diff --git a/corepkgs/Makefile b/corepkgs/Makefile deleted file mode 100644 index a04e3e3fbc1d..000000000000 --- a/corepkgs/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -corepkgs_FILES = nar.nix buildenv.nix buildenv.pl unpack-channel.nix derivation.nix fetchurl.nix imported-drv-to-derivation.nix - -$(foreach file,config.nix $(corepkgs_FILES),$(eval $(call install-data-in,$(d)/$(file),$(datadir)/nix/corepkgs))) - -template_files += $(d)/config.nix diff --git a/corepkgs/local.mk b/corepkgs/local.mk new file mode 100644 index 000000000000..a04e3e3fbc1d --- /dev/null +++ b/corepkgs/local.mk @@ -0,0 +1,5 @@ +corepkgs_FILES = nar.nix buildenv.nix buildenv.pl unpack-channel.nix derivation.nix fetchurl.nix imported-drv-to-derivation.nix + +$(foreach file,config.nix $(corepkgs_FILES),$(eval $(call install-data-in,$(d)/$(file),$(datadir)/nix/corepkgs))) + +template_files += $(d)/config.nix diff --git a/perl/Makefile b/perl/Makefile deleted file mode 100644 index cd07631ca888..000000000000 --- a/perl/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -nix_perl_sources := \ - $(d)/lib/Nix/Store.pm \ - $(d)/lib/Nix/Manifest.pm \ - $(d)/lib/Nix/GeneratePatches.pm \ - $(d)/lib/Nix/SSH.pm \ - $(d)/lib/Nix/CopyClosure.pm \ - $(d)/lib/Nix/Config.pm.in \ - $(d)/lib/Nix/Utils.pm \ - $(d)/lib/Nix/Crypto.pm - -nix_perl_modules := $(nix_perl_sources:.in=) - -$(foreach x, $(nix_perl_modules), $(eval $(call install-data-in, $(x), $(perllibdir)/Nix))) - -ifeq ($(perlbindings), yes) - - $(d)/lib/Nix/Store.cc: $(d)/lib/Nix/Store.xs - xsubpp $^ -output $@ - - LIBS += Store - - Store_DIR := $(d)/lib/Nix - - Store_SOURCES := $(Store_DIR)/Store.cc - - Store_LIBS = libstore - - Store_CXXFLAGS = \ - -I$(shell $(perl) -e 'use Config; print $$Config{archlibexp};')/CORE \ - -D_FILE_OFFSET_BITS=64 - - Store_ALLOW_UNDEFINED = 1 - - Store_FORCE_INSTALL = 1 - - Store_INSTALL_DIR = $(perllibdir)/auto/Nix/Store - -endif - -clean_files += $(d)/lib/Nix/Config.pm $(d)/lib/Nix/Store.cc - -dist_files += $(nix_perl_sources) diff --git a/perl/local.mk b/perl/local.mk new file mode 100644 index 000000000000..cd07631ca888 --- /dev/null +++ b/perl/local.mk @@ -0,0 +1,42 @@ +nix_perl_sources := \ + $(d)/lib/Nix/Store.pm \ + $(d)/lib/Nix/Manifest.pm \ + $(d)/lib/Nix/GeneratePatches.pm \ + $(d)/lib/Nix/SSH.pm \ + $(d)/lib/Nix/CopyClosure.pm \ + $(d)/lib/Nix/Config.pm.in \ + $(d)/lib/Nix/Utils.pm \ + $(d)/lib/Nix/Crypto.pm + +nix_perl_modules := $(nix_perl_sources:.in=) + +$(foreach x, $(nix_perl_modules), $(eval $(call install-data-in, $(x), $(perllibdir)/Nix))) + +ifeq ($(perlbindings), yes) + + $(d)/lib/Nix/Store.cc: $(d)/lib/Nix/Store.xs + xsubpp $^ -output $@ + + LIBS += Store + + Store_DIR := $(d)/lib/Nix + + Store_SOURCES := $(Store_DIR)/Store.cc + + Store_LIBS = libstore + + Store_CXXFLAGS = \ + -I$(shell $(perl) -e 'use Config; print $$Config{archlibexp};')/CORE \ + -D_FILE_OFFSET_BITS=64 + + Store_ALLOW_UNDEFINED = 1 + + Store_FORCE_INSTALL = 1 + + Store_INSTALL_DIR = $(perllibdir)/auto/Nix/Store + +endif + +clean_files += $(d)/lib/Nix/Config.pm $(d)/lib/Nix/Store.cc + +dist_files += $(nix_perl_sources) diff --git a/scripts/Makefile b/scripts/Makefile deleted file mode 100644 index 2805128db8de..000000000000 --- a/scripts/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -nix_bin_scripts := \ - $(d)/nix-build \ - $(d)/nix-channel \ - $(d)/nix-collect-garbage \ - $(d)/nix-copy-closure \ - $(d)/nix-generate-patches \ - $(d)/nix-install-package \ - $(d)/nix-prefetch-url \ - $(d)/nix-pull \ - $(d)/nix-push - -bin_SCRIPTS += $(nix_bin_scripts) - -nix_substituters := \ - $(d)/copy-from-other-stores.pl \ - $(d)/download-from-binary-cache.pl \ - $(d)/download-using-manifests.pl - -nix_noinst_scripts := \ - $(d)/build-remote.pl \ - $(d)/find-runtime-roots.pl \ - $(d)/nix-http-export.cgi \ - $(d)/nix-profile.sh \ - $(d)/nix-reduce-build \ - $(nix_substituters) - -noinst_SCRIPTS += $(nix_noinst_scripts) - -profiledir = $(sysconfdir)/profile.d - -$(eval $(call install-file-as, $(d)/nix-profile.sh, $(profiledir)/nix.sh, 0644)) -$(eval $(call install-program-in, $(d)/find-runtime-roots.pl, $(libexecdir)/nix)) -$(eval $(call install-program-in, $(d)/build-remote.pl, $(libexecdir)/nix)) -$(foreach prog, $(nix_substituters), $(eval $(call install-program-in, $(prog), $(libexecdir)/nix/substituters))) -$(eval $(call install-symlink, nix-build, $(bindir)/nix-shell)) - -clean_files += $(nix_bin_scripts) $(nix_noinst_scripts) - -dist_files += $(d)/*.in diff --git a/scripts/local.mk b/scripts/local.mk new file mode 100644 index 000000000000..2805128db8de --- /dev/null +++ b/scripts/local.mk @@ -0,0 +1,39 @@ +nix_bin_scripts := \ + $(d)/nix-build \ + $(d)/nix-channel \ + $(d)/nix-collect-garbage \ + $(d)/nix-copy-closure \ + $(d)/nix-generate-patches \ + $(d)/nix-install-package \ + $(d)/nix-prefetch-url \ + $(d)/nix-pull \ + $(d)/nix-push + +bin_SCRIPTS += $(nix_bin_scripts) + +nix_substituters := \ + $(d)/copy-from-other-stores.pl \ + $(d)/download-from-binary-cache.pl \ + $(d)/download-using-manifests.pl + +nix_noinst_scripts := \ + $(d)/build-remote.pl \ + $(d)/find-runtime-roots.pl \ + $(d)/nix-http-export.cgi \ + $(d)/nix-profile.sh \ + $(d)/nix-reduce-build \ + $(nix_substituters) + +noinst_SCRIPTS += $(nix_noinst_scripts) + +profiledir = $(sysconfdir)/profile.d + +$(eval $(call install-file-as, $(d)/nix-profile.sh, $(profiledir)/nix.sh, 0644)) +$(eval $(call install-program-in, $(d)/find-runtime-roots.pl, $(libexecdir)/nix)) +$(eval $(call install-program-in, $(d)/build-remote.pl, $(libexecdir)/nix)) +$(foreach prog, $(nix_substituters), $(eval $(call install-program-in, $(prog), $(libexecdir)/nix/substituters))) +$(eval $(call install-symlink, nix-build, $(bindir)/nix-shell)) + +clean_files += $(nix_bin_scripts) $(nix_noinst_scripts) + +dist_files += $(d)/*.in diff --git a/src/boost/format/Makefile b/src/boost/format/Makefile deleted file mode 100644 index 17897fa59074..000000000000 --- a/src/boost/format/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -LIBS += libformat - -libformat_NAME = libnixformat - -libformat_DIR := $(d) - -libformat_SOURCES := $(wildcard $(d)/*.cc) diff --git a/src/boost/format/local.mk b/src/boost/format/local.mk new file mode 100644 index 000000000000..17897fa59074 --- /dev/null +++ b/src/boost/format/local.mk @@ -0,0 +1,7 @@ +LIBS += libformat + +libformat_NAME = libnixformat + +libformat_DIR := $(d) + +libformat_SOURCES := $(wildcard $(d)/*.cc) diff --git a/src/bsdiff-4.3/Makefile b/src/bsdiff-4.3/Makefile deleted file mode 100644 index aca1ac116205..000000000000 --- a/src/bsdiff-4.3/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -PROGRAMS += bsdiff bspatch - -bsdiff_DIR := $(d) -bsdiff_SOURCES := $(d)/bsdiff.c -bsdiff_LDFLAGS = -lbz2 $(bsddiff_compat_include) -bsdiff_INSTALL_DIR = $(libexecdir)/nix - -bspatch_DIR := $(d) -bspatch_SOURCES := $(d)/bspatch.c -bspatch_LDFLAGS = -lbz2 $(bsddiff_compat_include) -bspatch_INSTALL_DIR = $(libexecdir)/nix - -dist_files += $(d)/compat-include/* diff --git a/src/bsdiff-4.3/local.mk b/src/bsdiff-4.3/local.mk new file mode 100644 index 000000000000..aca1ac116205 --- /dev/null +++ b/src/bsdiff-4.3/local.mk @@ -0,0 +1,13 @@ +PROGRAMS += bsdiff bspatch + +bsdiff_DIR := $(d) +bsdiff_SOURCES := $(d)/bsdiff.c +bsdiff_LDFLAGS = -lbz2 $(bsddiff_compat_include) +bsdiff_INSTALL_DIR = $(libexecdir)/nix + +bspatch_DIR := $(d) +bspatch_SOURCES := $(d)/bspatch.c +bspatch_LDFLAGS = -lbz2 $(bsddiff_compat_include) +bspatch_INSTALL_DIR = $(libexecdir)/nix + +dist_files += $(d)/compat-include/* diff --git a/src/libexpr/Makefile b/src/libexpr/Makefile deleted file mode 100644 index de276aa65296..000000000000 --- a/src/libexpr/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -LIBS += libexpr - -libexpr_NAME = libnixexpr - -libexpr_DIR := $(d) - -libexpr_SOURCES := $(wildcard $(d)/*.cc) $(d)/lexer-tab.cc $(d)/parser-tab.cc - -libexpr_LIBS = libutil libstore libformat - -# The dependency on libgc must be propagated (i.e. meaning that -# programs/libraries that use libexpr must explicitly pass -lgc), -# because inline functions in libexpr's header files call libgc. -libexpr_LDFLAGS_PROPAGATED = $(BDW_GC_LIBS) - -$(d)/parser-tab.cc $(d)/parser-tab.hh: $(d)/parser.y - bison -v -o $(libexpr_DIR)/parser-tab.cc $< -d - -$(d)/lexer-tab.cc $(d)/lexer-tab.hh: $(d)/lexer.l - flex --outfile $(libexpr_DIR)/lexer-tab.cc --header-file=$(libexpr_DIR)/lexer-tab.hh $< diff --git a/src/libexpr/local.mk b/src/libexpr/local.mk new file mode 100644 index 000000000000..de276aa65296 --- /dev/null +++ b/src/libexpr/local.mk @@ -0,0 +1,20 @@ +LIBS += libexpr + +libexpr_NAME = libnixexpr + +libexpr_DIR := $(d) + +libexpr_SOURCES := $(wildcard $(d)/*.cc) $(d)/lexer-tab.cc $(d)/parser-tab.cc + +libexpr_LIBS = libutil libstore libformat + +# The dependency on libgc must be propagated (i.e. meaning that +# programs/libraries that use libexpr must explicitly pass -lgc), +# because inline functions in libexpr's header files call libgc. +libexpr_LDFLAGS_PROPAGATED = $(BDW_GC_LIBS) + +$(d)/parser-tab.cc $(d)/parser-tab.hh: $(d)/parser.y + bison -v -o $(libexpr_DIR)/parser-tab.cc $< -d + +$(d)/lexer-tab.cc $(d)/lexer-tab.hh: $(d)/lexer.l + flex --outfile $(libexpr_DIR)/lexer-tab.cc --header-file=$(libexpr_DIR)/lexer-tab.hh $< diff --git a/src/libmain/Makefile b/src/libmain/Makefile deleted file mode 100644 index 0efeee531478..000000000000 --- a/src/libmain/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -LIBS += libmain - -libmain_NAME = libnixmain - -libmain_DIR := $(d) - -libmain_SOURCES := $(wildcard $(d)/*.cc) - -libmain_LIBS = libstore libutil libformat - -libmain_ALLOW_UNDEFINED = 1 diff --git a/src/libmain/local.mk b/src/libmain/local.mk new file mode 100644 index 000000000000..0efeee531478 --- /dev/null +++ b/src/libmain/local.mk @@ -0,0 +1,11 @@ +LIBS += libmain + +libmain_NAME = libnixmain + +libmain_DIR := $(d) + +libmain_SOURCES := $(wildcard $(d)/*.cc) + +libmain_LIBS = libstore libutil libformat + +libmain_ALLOW_UNDEFINED = 1 diff --git a/src/libstore/Makefile b/src/libstore/Makefile deleted file mode 100644 index dcedd4c26ab8..000000000000 --- a/src/libstore/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -LIBS += libstore - -libstore_NAME = libnixstore - -libstore_DIR := $(d) - -libstore_SOURCES := $(wildcard $(d)/*.cc) - -libstore_LIBS = libutil libformat - -libstore_LDFLAGS = -lsqlite3 -lbz2 - -libstore_CXXFLAGS = \ - -DNIX_STORE_DIR=\"$(storedir)\" \ - -DNIX_DATA_DIR=\"$(datadir)\" \ - -DNIX_STATE_DIR=\"$(localstatedir)/nix\" \ - -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \ - -DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \ - -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \ - -DNIX_BIN_DIR=\"$(bindir)\" \ - -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" - -$(d)/local-store.cc: $(d)/schema.sql.hh - -%.sql.hh: %.sql - sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/' < $< > $@ || (rm $@ && exit 1) diff --git a/src/libstore/local.mk b/src/libstore/local.mk new file mode 100644 index 000000000000..dcedd4c26ab8 --- /dev/null +++ b/src/libstore/local.mk @@ -0,0 +1,26 @@ +LIBS += libstore + +libstore_NAME = libnixstore + +libstore_DIR := $(d) + +libstore_SOURCES := $(wildcard $(d)/*.cc) + +libstore_LIBS = libutil libformat + +libstore_LDFLAGS = -lsqlite3 -lbz2 + +libstore_CXXFLAGS = \ + -DNIX_STORE_DIR=\"$(storedir)\" \ + -DNIX_DATA_DIR=\"$(datadir)\" \ + -DNIX_STATE_DIR=\"$(localstatedir)/nix\" \ + -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \ + -DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \ + -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \ + -DNIX_BIN_DIR=\"$(bindir)\" \ + -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" + +$(d)/local-store.cc: $(d)/schema.sql.hh + +%.sql.hh: %.sql + sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/' < $< > $@ || (rm $@ && exit 1) diff --git a/src/libutil/Makefile b/src/libutil/Makefile deleted file mode 100644 index 83bd05f281d6..000000000000 --- a/src/libutil/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -LIBS += libutil - -libutil_NAME = libnixutil - -libutil_DIR := $(d) - -libutil_SOURCES := $(wildcard $(d)/*.cc) - -ifeq ($(HAVE_OPENSSL), 1) - libutil_LDFLAGS = $(OPENSSL_LIBS) -else - libutil_SOURCES += $(d)/md5.c $(d)/sha1.c $(d)/sha256.c -endif - -libutil_LIBS = libformat diff --git a/src/libutil/local.mk b/src/libutil/local.mk new file mode 100644 index 000000000000..83bd05f281d6 --- /dev/null +++ b/src/libutil/local.mk @@ -0,0 +1,15 @@ +LIBS += libutil + +libutil_NAME = libnixutil + +libutil_DIR := $(d) + +libutil_SOURCES := $(wildcard $(d)/*.cc) + +ifeq ($(HAVE_OPENSSL), 1) + libutil_LDFLAGS = $(OPENSSL_LIBS) +else + libutil_SOURCES += $(d)/md5.c $(d)/sha1.c $(d)/sha256.c +endif + +libutil_LIBS = libformat diff --git a/src/nix-daemon/Makefile b/src/nix-daemon/Makefile deleted file mode 100644 index d02f9f6ce22d..000000000000 --- a/src/nix-daemon/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -PROGRAMS += nix-daemon - -nix-daemon_DIR := $(d) - -nix-daemon_SOURCES := $(d)/nix-daemon.cc - -nix-daemon_LIBS = libmain libstore libutil libformat - -$(eval $(call install-symlink, nix-daemon, $(bindir)/nix-worker)) diff --git a/src/nix-daemon/local.mk b/src/nix-daemon/local.mk new file mode 100644 index 000000000000..d02f9f6ce22d --- /dev/null +++ b/src/nix-daemon/local.mk @@ -0,0 +1,9 @@ +PROGRAMS += nix-daemon + +nix-daemon_DIR := $(d) + +nix-daemon_SOURCES := $(d)/nix-daemon.cc + +nix-daemon_LIBS = libmain libstore libutil libformat + +$(eval $(call install-symlink, nix-daemon, $(bindir)/nix-worker)) diff --git a/src/nix-env/Makefile b/src/nix-env/Makefile deleted file mode 100644 index 5a38d2fb76af..000000000000 --- a/src/nix-env/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -PROGRAMS += nix-env - -nix-env_DIR := $(d) - -nix-env_SOURCES := $(wildcard $(d)/*.cc) - -nix-env_LIBS = libexpr libmain libstore libutil libformat diff --git a/src/nix-env/local.mk b/src/nix-env/local.mk new file mode 100644 index 000000000000..5a38d2fb76af --- /dev/null +++ b/src/nix-env/local.mk @@ -0,0 +1,7 @@ +PROGRAMS += nix-env + +nix-env_DIR := $(d) + +nix-env_SOURCES := $(wildcard $(d)/*.cc) + +nix-env_LIBS = libexpr libmain libstore libutil libformat diff --git a/src/nix-hash/Makefile b/src/nix-hash/Makefile deleted file mode 100644 index 062e4d13b29e..000000000000 --- a/src/nix-hash/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -PROGRAMS += nix-hash - -nix-hash_DIR := $(d) - -nix-hash_SOURCES := $(d)/nix-hash.cc - -nix-hash_LIBS = libmain libstore libutil libformat diff --git a/src/nix-hash/local.mk b/src/nix-hash/local.mk new file mode 100644 index 000000000000..062e4d13b29e --- /dev/null +++ b/src/nix-hash/local.mk @@ -0,0 +1,7 @@ +PROGRAMS += nix-hash + +nix-hash_DIR := $(d) + +nix-hash_SOURCES := $(d)/nix-hash.cc + +nix-hash_LIBS = libmain libstore libutil libformat diff --git a/src/nix-instantiate/Makefile b/src/nix-instantiate/Makefile deleted file mode 100644 index daa741eb7f08..000000000000 --- a/src/nix-instantiate/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -PROGRAMS += nix-instantiate - -nix-instantiate_DIR := $(d) - -nix-instantiate_SOURCES := $(d)/nix-instantiate.cc - -nix-instantiate_LIBS = libexpr libmain libstore libutil libformat diff --git a/src/nix-instantiate/local.mk b/src/nix-instantiate/local.mk new file mode 100644 index 000000000000..daa741eb7f08 --- /dev/null +++ b/src/nix-instantiate/local.mk @@ -0,0 +1,7 @@ +PROGRAMS += nix-instantiate + +nix-instantiate_DIR := $(d) + +nix-instantiate_SOURCES := $(d)/nix-instantiate.cc + +nix-instantiate_LIBS = libexpr libmain libstore libutil libformat diff --git a/src/nix-log2xml/Makefile b/src/nix-log2xml/Makefile deleted file mode 100644 index 8467d1973bda..000000000000 --- a/src/nix-log2xml/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -PROGRAMS += nix-log2xml - -nix-log2xml_DIR := $(d) - -nix-log2xml_SOURCES := $(d)/log2xml.cc - -$(foreach file, mark-errors.xsl log2html.xsl treebits.js, \ - $(eval $(call install-data-in, $(d)/$(file), $(datadir)/nix/log2html))) diff --git a/src/nix-log2xml/local.mk b/src/nix-log2xml/local.mk new file mode 100644 index 000000000000..8467d1973bda --- /dev/null +++ b/src/nix-log2xml/local.mk @@ -0,0 +1,8 @@ +PROGRAMS += nix-log2xml + +nix-log2xml_DIR := $(d) + +nix-log2xml_SOURCES := $(d)/log2xml.cc + +$(foreach file, mark-errors.xsl log2html.xsl treebits.js, \ + $(eval $(call install-data-in, $(d)/$(file), $(datadir)/nix/log2html))) diff --git a/src/nix-store/Makefile b/src/nix-store/Makefile deleted file mode 100644 index edd111b42015..000000000000 --- a/src/nix-store/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -PROGRAMS += nix-store - -nix-store_DIR := $(d) - -nix-store_SOURCES := $(wildcard $(d)/*.cc) - -nix-store_LIBS = libmain libstore libutil libformat - -nix-store_LDFLAGS = -lbz2 diff --git a/src/nix-store/local.mk b/src/nix-store/local.mk new file mode 100644 index 000000000000..edd111b42015 --- /dev/null +++ b/src/nix-store/local.mk @@ -0,0 +1,9 @@ +PROGRAMS += nix-store + +nix-store_DIR := $(d) + +nix-store_SOURCES := $(wildcard $(d)/*.cc) + +nix-store_LIBS = libmain libstore libutil libformat + +nix-store_LDFLAGS = -lbz2 diff --git a/tests/Makefile b/tests/Makefile deleted file mode 100644 index 21ffd047f6f2..000000000000 --- a/tests/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -check: - @echo "Warning: Nix has no 'make check'. Please install Nix and run 'make installcheck' instead." - -nix_tests = \ - init.sh hash.sh lang.sh add.sh simple.sh dependencies.sh \ - parallel.sh build-hook.sh substitutes.sh substitutes2.sh \ - fallback.sh nix-push.sh gc.sh gc-concurrent.sh verify.sh nix-pull.sh \ - referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh fixed.sh \ - gc-runtime.sh install-package.sh check-refs.sh filter-source.sh \ - remote-store.sh export.sh export-graph.sh negative-caching.sh \ - binary-patching.sh timeout.sh secure-drv-outputs.sh nix-channel.sh \ - multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \ - binary-cache.sh nix-profile.sh - -INSTALL_TESTS += $(foreach x, $(nix_tests), tests/$(x)) - -TESTS_ENVIRONMENT = NIX_REMOTE= $(bash) -e - -clean_files += $(d)/common.sh - -installcheck: $(d)/common.sh diff --git a/tests/local.mk b/tests/local.mk new file mode 100644 index 000000000000..21ffd047f6f2 --- /dev/null +++ b/tests/local.mk @@ -0,0 +1,21 @@ +check: + @echo "Warning: Nix has no 'make check'. Please install Nix and run 'make installcheck' instead." + +nix_tests = \ + init.sh hash.sh lang.sh add.sh simple.sh dependencies.sh \ + parallel.sh build-hook.sh substitutes.sh substitutes2.sh \ + fallback.sh nix-push.sh gc.sh gc-concurrent.sh verify.sh nix-pull.sh \ + referrers.sh user-envs.sh logging.sh nix-build.sh misc.sh fixed.sh \ + gc-runtime.sh install-package.sh check-refs.sh filter-source.sh \ + remote-store.sh export.sh export-graph.sh negative-caching.sh \ + binary-patching.sh timeout.sh secure-drv-outputs.sh nix-channel.sh \ + multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \ + binary-cache.sh nix-profile.sh + +INSTALL_TESTS += $(foreach x, $(nix_tests), tests/$(x)) + +TESTS_ENVIRONMENT = NIX_REMOTE= $(bash) -e + +clean_files += $(d)/common.sh + +installcheck: $(d)/common.sh -- cgit 1.4.1