From 4315acb8c0a40703b17f837ab82e9a691b5c14ab Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 25 Nov 2013 08:55:19 +0000 Subject: Add a generic rule for installing files --- corepkgs/Makefile.new | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 corepkgs/Makefile.new (limited to 'corepkgs') diff --git a/corepkgs/Makefile.new b/corepkgs/Makefile.new new file mode 100644 index 000000000000..d208478259d2 --- /dev/null +++ b/corepkgs/Makefile.new @@ -0,0 +1,3 @@ +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-file-in,$(datadir)/nix/corepkgs,$(d)/$(file)))) -- cgit 1.4.1 From ed0a8dd71ad58d16c24d714ab2b9419285d1ffc0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 25 Nov 2013 10:16:07 +0000 Subject: Add a function for instantiating Autoconf *.in files --- corepkgs/Makefile.new | 2 ++ mk/lib.mk | 8 ++++---- mk/templates.mk | 8 ++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 mk/templates.mk (limited to 'corepkgs') diff --git a/corepkgs/Makefile.new b/corepkgs/Makefile.new index d208478259d2..5b500a679ae7 100644 --- a/corepkgs/Makefile.new +++ b/corepkgs/Makefile.new @@ -1,3 +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-file-in,$(datadir)/nix/corepkgs,$(d)/$(file)))) + +template_files += $(d)/config.nix diff --git a/mk/lib.mk b/mk/lib.mk index 212336cad224..b4a2fb265c3e 100644 --- a/mk/lib.mk +++ b/mk/lib.mk @@ -2,9 +2,7 @@ default: all # Include Autoconf variables. -Makefile.config: Makefile.config.in - ./config.status --file $@ - +template_files += Makefile.config include Makefile.config @@ -33,6 +31,7 @@ include mk/install.mk include mk/libraries.mk include mk/programs.mk include mk/patterns.mk +include mk/templates.mk # Include all sub-Makefiles. @@ -44,9 +43,10 @@ endef $(foreach mf, $(SUBS), $(eval $(call include-sub-makefile, $(mf)))) -# Instantiate libraries and programs. +# Instantiate stuff. $(foreach lib, $(LIBS), $(eval $(call build-library,$(lib)))) $(foreach prog, $(PROGRAMS), $(eval $(call build-program,$(prog)))) +$(foreach template, $(template_files), $(eval $(call instantiate-template,$(template)))) all: $(programs_list) diff --git a/mk/templates.mk b/mk/templates.mk new file mode 100644 index 000000000000..3575b6d95614 --- /dev/null +++ b/mk/templates.mk @@ -0,0 +1,8 @@ +# Create the file $(1) from $(1).in by running config.status (which +# substitutes all ‘@var@’ variables set by the configure script). +define instantiate-template = + + $(1): $(1).in + ./config.status --file $(1) + +endef -- cgit 1.4.1 From 962551a071da87589a97a2f40d72b87d6e6ba9e2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 25 Nov 2013 15:05:56 +0000 Subject: Add a Makefile for the scripts directory --- Makefile.new | 1 + corepkgs/Makefile.new | 2 +- mk/install.mk | 44 ++++++++++++++++++++++++++++++++++++++------ mk/lib.mk | 9 +++++++++ mk/programs.mk | 2 +- mk/templates.mk | 6 +++--- scripts/Makefile.new | 39 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 92 insertions(+), 11 deletions(-) create mode 100644 scripts/Makefile.new (limited to 'corepkgs') diff --git a/Makefile.new b/Makefile.new index b3ff2fc1b4ef..d63fa3ace35b 100644 --- a/Makefile.new +++ b/Makefile.new @@ -11,6 +11,7 @@ SUBS = \ src/nix-daemon/Makefile.new \ src/nix-log2xml/Makefile.new \ src/bsdiff-4.3/Makefile.new \ + scripts/Makefile.new \ corepkgs/Makefile.new GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr diff --git a/corepkgs/Makefile.new b/corepkgs/Makefile.new index 5b500a679ae7..a04e3e3fbc1d 100644 --- a/corepkgs/Makefile.new +++ b/corepkgs/Makefile.new @@ -1,5 +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-file-in,$(datadir)/nix/corepkgs,$(d)/$(file)))) +$(foreach file,config.nix $(corepkgs_FILES),$(eval $(call install-data-in,$(d)/$(file),$(datadir)/nix/corepkgs))) template_files += $(d)/config.nix diff --git a/mk/install.mk b/mk/install.mk index 64fc6a696a2e..d6e75d2bfb13 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -9,15 +9,47 @@ define create-dir = endef -# Add a rule for installing file $(2) in directory $(1). The -# directory will be created automatically. +# Add a rule for installing file $(1) as file $(2) with mode $(3). +# The directory containing $(2) will be created automatically. +define install-file-as = + + install: $(2) + + $$(eval $$(call create-dir,$$(dir $(2)))) + + $(2): $(1) | $$(dir $(2)) + $(QUIET) install -m $(3) $(1) $(2) + +endef + + +# Add a rule for installing file $(1) in directory $(2) with mode +# $(3). The directory will be created automatically. define install-file-in = + $$(eval $$(call install-file-as,$(1),$(2)/$$(notdir $(1)),$(3))) +endef + + +define install-program-in = + $$(eval $$(call install-file-in,$(1),$(2),0755)) +endef + + +define install-data-in = + $$(eval $$(call install-file-in,$(1),$(2),0644)) +endef - install:: $(1)/$(notdir $(2)) - $$(eval $$(call create-dir,$(1))) +# Install a symlink from $(2) to $(1). Note that $(1) need not exist. +define install-symlink = - $(1)/$(notdir $(2)): $(2) | $(1) - $(QUIET) install -t $(1) $(2) + install: $(2) + + $$(eval $$(call create-dir,$$(dir $(2)))) + + $(2): | $$(dir $(2)) + ln -sfn $(1) $(2) endef + + diff --git a/mk/lib.mk b/mk/lib.mk index b4a2fb265c3e..a1634bc002f9 100644 --- a/mk/lib.mk +++ b/mk/lib.mk @@ -6,8 +6,14 @@ template_files += Makefile.config include Makefile.config +# Get rid of default suffixes. FIXME: is this a good idea? +.SUFFIXES: + + # Initialise some variables. QUIET = @ +bin_SCRIPTS := +noinst_SCRIPTS := # Pass -fPIC if we're building dynamic libraries. @@ -46,6 +52,9 @@ $(foreach mf, $(SUBS), $(eval $(call include-sub-makefile, $(mf)))) # Instantiate stuff. $(foreach lib, $(LIBS), $(eval $(call build-library,$(lib)))) $(foreach prog, $(PROGRAMS), $(eval $(call build-program,$(prog)))) +$(foreach script, $(bin_SCRIPTS), $(eval $(call install-program-in,$(script),$(bindir)))) +$(foreach script, $(bin_SCRIPTS), $(eval programs_list += $(script))) +$(foreach script, $(noinst_SCRIPTS), $(eval programs_list += $(script))) $(foreach template, $(template_files), $(eval $(call instantiate-template,$(template)))) diff --git a/mk/programs.mk b/mk/programs.mk index 48f95c60c981..648a6053b4c2 100644 --- a/mk/programs.mk +++ b/mk/programs.mk @@ -30,7 +30,7 @@ define build-program = $$(eval $$(call create-dir,$$($(1)_INSTALL_DIR))) - install:: $$($(1)_INSTALL_PATH) + install: $$($(1)_INSTALL_PATH) ifeq ($(BUILD_SHARED_LIBS), 1) diff --git a/mk/templates.mk b/mk/templates.mk index 09bae50e8af0..fa91e25095d7 100644 --- a/mk/templates.mk +++ b/mk/templates.mk @@ -2,9 +2,9 @@ # substitutes all ‘@var@’ variables set by the configure script). define instantiate-template = - $(1): $(1).in - ./config.status --file $(1) - clean_files += $(1) endef + +%: %.in + $(QUIET) ./config.status --quiet --file $@ diff --git a/scripts/Makefile.new b/scripts/Makefile.new new file mode 100644 index 000000000000..2805128db8de --- /dev/null +++ b/scripts/Makefile.new @@ -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 -- cgit 1.4.1 From 7ce0e05ad875657a0fec10e192454b837146e190 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 25 Nov 2013 15:25:13 +0000 Subject: Rename Makefile.new -> Makefile --- .gitignore | 2 -- Makefile | 19 +++++++++++++++++++ Makefile.new | 19 ------------------- corepkgs/Makefile | 5 +++++ corepkgs/Makefile.new | 5 ----- mk/install.mk | 2 +- scripts/Makefile | 39 +++++++++++++++++++++++++++++++++++++++ scripts/Makefile.new | 39 --------------------------------------- src/boost/format/Makefile | 7 +++++++ src/boost/format/Makefile.new | 7 ------- src/bsdiff-4.3/Makefile | 13 +++++++++++++ src/bsdiff-4.3/Makefile.new | 13 ------------- src/libexpr/Makefile | 23 +++++++++++++++++++++++ src/libexpr/Makefile.new | 23 ----------------------- src/libmain/Makefile | 11 +++++++++++ src/libmain/Makefile.new | 11 ----------- src/libstore/Makefile | 23 +++++++++++++++++++++++ src/libstore/Makefile.new | 23 ----------------------- src/libutil/Makefile | 15 +++++++++++++++ src/libutil/Makefile.new | 15 --------------- src/nix-daemon/Makefile | 7 +++++++ src/nix-daemon/Makefile.new | 7 ------- src/nix-env/Makefile | 7 +++++++ src/nix-env/Makefile.new | 7 ------- src/nix-hash/Makefile | 7 +++++++ src/nix-hash/Makefile.new | 7 ------- src/nix-instantiate/Makefile | 7 +++++++ src/nix-instantiate/Makefile.new | 7 ------- src/nix-log2xml/Makefile | 5 +++++ src/nix-log2xml/Makefile.new | 5 ----- src/nix-store/Makefile | 9 +++++++++ src/nix-store/Makefile.new | 9 --------- 32 files changed, 198 insertions(+), 200 deletions(-) create mode 100644 Makefile delete mode 100644 Makefile.new create mode 100644 corepkgs/Makefile delete mode 100644 corepkgs/Makefile.new create mode 100644 scripts/Makefile delete mode 100644 scripts/Makefile.new create mode 100644 src/boost/format/Makefile delete mode 100644 src/boost/format/Makefile.new create mode 100644 src/bsdiff-4.3/Makefile delete mode 100644 src/bsdiff-4.3/Makefile.new create mode 100644 src/libexpr/Makefile delete mode 100644 src/libexpr/Makefile.new create mode 100644 src/libmain/Makefile delete mode 100644 src/libmain/Makefile.new create mode 100644 src/libstore/Makefile delete mode 100644 src/libstore/Makefile.new create mode 100644 src/libutil/Makefile delete mode 100644 src/libutil/Makefile.new create mode 100644 src/nix-daemon/Makefile delete mode 100644 src/nix-daemon/Makefile.new create mode 100644 src/nix-env/Makefile delete mode 100644 src/nix-env/Makefile.new create mode 100644 src/nix-hash/Makefile delete mode 100644 src/nix-hash/Makefile.new create mode 100644 src/nix-instantiate/Makefile delete mode 100644 src/nix-instantiate/Makefile.new create mode 100644 src/nix-log2xml/Makefile delete mode 100644 src/nix-log2xml/Makefile.new create mode 100644 src/nix-store/Makefile delete mode 100644 src/nix-store/Makefile.new (limited to 'corepkgs') diff --git a/.gitignore b/.gitignore index 961877ada331..fafe8a17a461 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -Makefile -Makefile.in Makefile.config # / diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..652085a78165 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +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 \ + scripts/Makefile \ + corepkgs/Makefile + +GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr + +include mk/lib.mk diff --git a/Makefile.new b/Makefile.new deleted file mode 100644 index d63fa3ace35b..000000000000 --- a/Makefile.new +++ /dev/null @@ -1,19 +0,0 @@ -SUBS = \ - src/boost/format/Makefile.new \ - src/libutil/Makefile.new \ - src/libstore/Makefile.new \ - src/libmain/Makefile.new \ - src/libexpr/Makefile.new \ - src/nix-hash/Makefile.new \ - src/nix-store/Makefile.new \ - src/nix-instantiate/Makefile.new \ - src/nix-env/Makefile.new \ - src/nix-daemon/Makefile.new \ - src/nix-log2xml/Makefile.new \ - src/bsdiff-4.3/Makefile.new \ - scripts/Makefile.new \ - corepkgs/Makefile.new - -GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr - -include mk/lib.mk diff --git a/corepkgs/Makefile b/corepkgs/Makefile new file mode 100644 index 000000000000..a04e3e3fbc1d --- /dev/null +++ b/corepkgs/Makefile @@ -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/corepkgs/Makefile.new b/corepkgs/Makefile.new deleted file mode 100644 index a04e3e3fbc1d..000000000000 --- a/corepkgs/Makefile.new +++ /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/mk/install.mk b/mk/install.mk index d6e75d2bfb13..633c432a8cfc 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -48,7 +48,7 @@ define install-symlink = $$(eval $$(call create-dir,$$(dir $(2)))) $(2): | $$(dir $(2)) - ln -sfn $(1) $(2) + $(QUIET) ln -sfn $(1) $(2) endef diff --git a/scripts/Makefile b/scripts/Makefile new file mode 100644 index 000000000000..2805128db8de --- /dev/null +++ b/scripts/Makefile @@ -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/scripts/Makefile.new b/scripts/Makefile.new deleted file mode 100644 index 2805128db8de..000000000000 --- a/scripts/Makefile.new +++ /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/src/boost/format/Makefile b/src/boost/format/Makefile new file mode 100644 index 000000000000..b60a2ea4fb62 --- /dev/null +++ b/src/boost/format/Makefile @@ -0,0 +1,7 @@ +LIBS += libformat + +libformat_NAME = libnixformat + +libformat_DIR := $(d) + +libformat_SOURCES = format_implementation.cc free_funcs.cc parsing.cc diff --git a/src/boost/format/Makefile.new b/src/boost/format/Makefile.new deleted file mode 100644 index b60a2ea4fb62..000000000000 --- a/src/boost/format/Makefile.new +++ /dev/null @@ -1,7 +0,0 @@ -LIBS += libformat - -libformat_NAME = libnixformat - -libformat_DIR := $(d) - -libformat_SOURCES = format_implementation.cc free_funcs.cc parsing.cc diff --git a/src/bsdiff-4.3/Makefile b/src/bsdiff-4.3/Makefile new file mode 100644 index 000000000000..a56f6c124db0 --- /dev/null +++ b/src/bsdiff-4.3/Makefile @@ -0,0 +1,13 @@ +PROGRAMS += bsdiff bspatch + +bsdiff_DIR := $(d) +bsdiff_SOURCES = bsdiff.c +bsdiff_LDFLAGS = -lbz2 $(bsddiff_compat_include) +bsdiff_INSTALL_DIR = $(libexecdir) + +bspatch_DIR := $(d) +bspatch_SOURCES = bspatch.c +bspatch_LDFLAGS = -lbz2 $(bsddiff_compat_include) +bspatch_INSTALL_DIR = $(libexecdir) + +dist_files += $(d)/compat-include/* diff --git a/src/bsdiff-4.3/Makefile.new b/src/bsdiff-4.3/Makefile.new deleted file mode 100644 index a56f6c124db0..000000000000 --- a/src/bsdiff-4.3/Makefile.new +++ /dev/null @@ -1,13 +0,0 @@ -PROGRAMS += bsdiff bspatch - -bsdiff_DIR := $(d) -bsdiff_SOURCES = bsdiff.c -bsdiff_LDFLAGS = -lbz2 $(bsddiff_compat_include) -bsdiff_INSTALL_DIR = $(libexecdir) - -bspatch_DIR := $(d) -bspatch_SOURCES = bspatch.c -bspatch_LDFLAGS = -lbz2 $(bsddiff_compat_include) -bspatch_INSTALL_DIR = $(libexecdir) - -dist_files += $(d)/compat-include/* diff --git a/src/libexpr/Makefile b/src/libexpr/Makefile new file mode 100644 index 000000000000..c6ed7d14b9bf --- /dev/null +++ b/src/libexpr/Makefile @@ -0,0 +1,23 @@ +LIBS += libexpr + +libexpr_NAME = libnixexpr + +libexpr_DIR := $(d) + +libexpr_SOURCES = \ + nixexpr.cc eval.cc primops.cc lexer-tab.cc parser-tab.cc \ + get-drvs.cc attr-path.cc value-to-xml.cc value-to-json.cc \ + common-opts.cc names.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/Makefile.new b/src/libexpr/Makefile.new deleted file mode 100644 index c6ed7d14b9bf..000000000000 --- a/src/libexpr/Makefile.new +++ /dev/null @@ -1,23 +0,0 @@ -LIBS += libexpr - -libexpr_NAME = libnixexpr - -libexpr_DIR := $(d) - -libexpr_SOURCES = \ - nixexpr.cc eval.cc primops.cc lexer-tab.cc parser-tab.cc \ - get-drvs.cc attr-path.cc value-to-xml.cc value-to-json.cc \ - common-opts.cc names.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 new file mode 100644 index 000000000000..7312b8d2cd26 --- /dev/null +++ b/src/libmain/Makefile @@ -0,0 +1,11 @@ +LIBS += libmain + +libmain_NAME = libnixmain + +libmain_DIR := $(d) + +libmain_SOURCES = shared.cc stack.cc + +libmain_LIBS = libstore libutil libformat + +libmain_ALLOW_UNDEFINED = 1 diff --git a/src/libmain/Makefile.new b/src/libmain/Makefile.new deleted file mode 100644 index 7312b8d2cd26..000000000000 --- a/src/libmain/Makefile.new +++ /dev/null @@ -1,11 +0,0 @@ -LIBS += libmain - -libmain_NAME = libnixmain - -libmain_DIR := $(d) - -libmain_SOURCES = shared.cc stack.cc - -libmain_LIBS = libstore libutil libformat - -libmain_ALLOW_UNDEFINED = 1 diff --git a/src/libstore/Makefile b/src/libstore/Makefile new file mode 100644 index 000000000000..eaba1005f227 --- /dev/null +++ b/src/libstore/Makefile @@ -0,0 +1,23 @@ +LIBS += libstore + +libstore_NAME = libnixstore + +libstore_DIR := $(d) + +libstore_SOURCES = \ + store-api.cc local-store.cc remote-store.cc derivations.cc build.cc misc.cc \ + globals.cc references.cc pathlocks.cc gc.cc optimise-store.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)\" diff --git a/src/libstore/Makefile.new b/src/libstore/Makefile.new deleted file mode 100644 index eaba1005f227..000000000000 --- a/src/libstore/Makefile.new +++ /dev/null @@ -1,23 +0,0 @@ -LIBS += libstore - -libstore_NAME = libnixstore - -libstore_DIR := $(d) - -libstore_SOURCES = \ - store-api.cc local-store.cc remote-store.cc derivations.cc build.cc misc.cc \ - globals.cc references.cc pathlocks.cc gc.cc optimise-store.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)\" diff --git a/src/libutil/Makefile b/src/libutil/Makefile new file mode 100644 index 000000000000..b604c0078709 --- /dev/null +++ b/src/libutil/Makefile @@ -0,0 +1,15 @@ +LIBS += libutil + +libutil_NAME = libnixutil + +libutil_DIR := $(d) + +libutil_SOURCES = util.cc hash.cc serialise.cc archive.cc xml-writer.cc affinity.cc + +ifeq ($(HAVE_OPENSSL), 1) + libutil_LDFLAGS = $(OPENSSL_LIBS) +else + libutil_SOURCES += md5.c sha1.c sha256.c +endif + +libutil_LIBS = libformat diff --git a/src/libutil/Makefile.new b/src/libutil/Makefile.new deleted file mode 100644 index b604c0078709..000000000000 --- a/src/libutil/Makefile.new +++ /dev/null @@ -1,15 +0,0 @@ -LIBS += libutil - -libutil_NAME = libnixutil - -libutil_DIR := $(d) - -libutil_SOURCES = util.cc hash.cc serialise.cc archive.cc xml-writer.cc affinity.cc - -ifeq ($(HAVE_OPENSSL), 1) - libutil_LDFLAGS = $(OPENSSL_LIBS) -else - libutil_SOURCES += md5.c sha1.c sha256.c -endif - -libutil_LIBS = libformat diff --git a/src/nix-daemon/Makefile b/src/nix-daemon/Makefile new file mode 100644 index 000000000000..2a8a7d92cd26 --- /dev/null +++ b/src/nix-daemon/Makefile @@ -0,0 +1,7 @@ +PROGRAMS += nix-daemon + +nix-daemon_DIR := $(d) + +nix-daemon_SOURCES = nix-daemon.cc + +nix-daemon_LIBS = libmain libstore libutil libformat diff --git a/src/nix-daemon/Makefile.new b/src/nix-daemon/Makefile.new deleted file mode 100644 index 2a8a7d92cd26..000000000000 --- a/src/nix-daemon/Makefile.new +++ /dev/null @@ -1,7 +0,0 @@ -PROGRAMS += nix-daemon - -nix-daemon_DIR := $(d) - -nix-daemon_SOURCES = nix-daemon.cc - -nix-daemon_LIBS = libmain libstore libutil libformat diff --git a/src/nix-env/Makefile b/src/nix-env/Makefile new file mode 100644 index 000000000000..04545231caf3 --- /dev/null +++ b/src/nix-env/Makefile @@ -0,0 +1,7 @@ +PROGRAMS += nix-env + +nix-env_DIR := $(d) + +nix-env_SOURCES = nix-env.cc profiles.cc user-env.cc + +nix-env_LIBS = libexpr libmain libstore libutil libformat diff --git a/src/nix-env/Makefile.new b/src/nix-env/Makefile.new deleted file mode 100644 index 04545231caf3..000000000000 --- a/src/nix-env/Makefile.new +++ /dev/null @@ -1,7 +0,0 @@ -PROGRAMS += nix-env - -nix-env_DIR := $(d) - -nix-env_SOURCES = nix-env.cc profiles.cc user-env.cc - -nix-env_LIBS = libexpr libmain libstore libutil libformat diff --git a/src/nix-hash/Makefile b/src/nix-hash/Makefile new file mode 100644 index 000000000000..462cd78d8c26 --- /dev/null +++ b/src/nix-hash/Makefile @@ -0,0 +1,7 @@ +PROGRAMS += nix-hash + +nix-hash_DIR := $(d) + +nix-hash_SOURCES = nix-hash.cc + +nix-hash_LIBS = libmain libstore libutil libformat diff --git a/src/nix-hash/Makefile.new b/src/nix-hash/Makefile.new deleted file mode 100644 index 462cd78d8c26..000000000000 --- a/src/nix-hash/Makefile.new +++ /dev/null @@ -1,7 +0,0 @@ -PROGRAMS += nix-hash - -nix-hash_DIR := $(d) - -nix-hash_SOURCES = nix-hash.cc - -nix-hash_LIBS = libmain libstore libutil libformat diff --git a/src/nix-instantiate/Makefile b/src/nix-instantiate/Makefile new file mode 100644 index 000000000000..9c4cfec287d9 --- /dev/null +++ b/src/nix-instantiate/Makefile @@ -0,0 +1,7 @@ +PROGRAMS += nix-instantiate + +nix-instantiate_DIR := $(d) + +nix-instantiate_SOURCES = nix-instantiate.cc + +nix-instantiate_LIBS = libexpr libmain libstore libutil libformat diff --git a/src/nix-instantiate/Makefile.new b/src/nix-instantiate/Makefile.new deleted file mode 100644 index 9c4cfec287d9..000000000000 --- a/src/nix-instantiate/Makefile.new +++ /dev/null @@ -1,7 +0,0 @@ -PROGRAMS += nix-instantiate - -nix-instantiate_DIR := $(d) - -nix-instantiate_SOURCES = nix-instantiate.cc - -nix-instantiate_LIBS = libexpr libmain libstore libutil libformat diff --git a/src/nix-log2xml/Makefile b/src/nix-log2xml/Makefile new file mode 100644 index 000000000000..a88f948671dc --- /dev/null +++ b/src/nix-log2xml/Makefile @@ -0,0 +1,5 @@ +PROGRAMS += nix-log2xml + +nix-log2xml_DIR := $(d) + +nix-log2xml_SOURCES = log2xml.cc diff --git a/src/nix-log2xml/Makefile.new b/src/nix-log2xml/Makefile.new deleted file mode 100644 index a88f948671dc..000000000000 --- a/src/nix-log2xml/Makefile.new +++ /dev/null @@ -1,5 +0,0 @@ -PROGRAMS += nix-log2xml - -nix-log2xml_DIR := $(d) - -nix-log2xml_SOURCES = log2xml.cc diff --git a/src/nix-store/Makefile b/src/nix-store/Makefile new file mode 100644 index 000000000000..105513872e81 --- /dev/null +++ b/src/nix-store/Makefile @@ -0,0 +1,9 @@ +PROGRAMS += nix-store + +nix-store_DIR := $(d) + +nix-store_SOURCES = nix-store.cc dotgraph.cc xmlgraph.cc + +nix-store_LIBS = libmain libstore libutil libformat + +nix-store_LDFLAGS = -lbz2 diff --git a/src/nix-store/Makefile.new b/src/nix-store/Makefile.new deleted file mode 100644 index 105513872e81..000000000000 --- a/src/nix-store/Makefile.new +++ /dev/null @@ -1,9 +0,0 @@ -PROGRAMS += nix-store - -nix-store_DIR := $(d) - -nix-store_SOURCES = nix-store.cc dotgraph.cc xmlgraph.cc - -nix-store_LIBS = libmain libstore libutil libformat - -nix-store_LDFLAGS = -lbz2 -- cgit 1.4.1 From 0202ce6b94f287f70a6723473c73a4c7f135dae4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 25 Nov 2013 18:47:03 +0100 Subject: Add support for ‘make installcheck’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 9 --------- Makefile | 3 ++- Makefile.config.in | 2 +- corepkgs/config.nix.in | 2 +- mk/lib.mk | 6 ++++++ scripts/nix-reduce-build.in | 2 +- src/nix-log2xml/Makefile | 3 +++ tests/Makefile | 21 +++++++++++++++++++++ tests/common.sh.in | 8 ++++---- tests/config.nix | 20 ++++++++++++++++++++ tests/config.nix.in | 18 ------------------ tests/parallel.sh | 12 ++++++------ 12 files changed, 65 insertions(+), 41 deletions(-) create mode 100644 tests/Makefile create mode 100644 tests/config.nix delete mode 100644 tests/config.nix.in (limited to 'corepkgs') diff --git a/.gitignore b/.gitignore index fafe8a17a461..42c7be2b7ef6 100644 --- a/.gitignore +++ b/.gitignore @@ -85,10 +85,6 @@ Makefile.config # /src/nix-log2xml/ /src/nix-log2xml/nix-log2xml -/src/nix-log2xml/test*.* -/src/nix-log2xml/*.log -/src/nix-log2xml/*.xml -/src/nix-log2xml/*.html # /src/nix-store/ /src/nix-store/nix-store @@ -98,7 +94,6 @@ Makefile.config # /tests/ /tests/test-tmp -/tests/config.nix /tests/common.sh /tests/dummy /tests/result* @@ -111,11 +106,7 @@ Makefile.config /perl/lib/Nix/Config.pm /perl/lib/Nix/Store.cc -.deps -.libs *.a -*.lo -*.la *.o *.so *.dep diff --git a/Makefile b/Makefile index 6abce9372b2c..85a2dc8e521b 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,8 @@ SUBS = \ src/bsdiff-4.3/Makefile \ perl/Makefile \ scripts/Makefile \ - corepkgs/Makefile + corepkgs/Makefile \ + tests/Makefile GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr diff --git a/Makefile.config.in b/Makefile.config.in index 65080c88f71a..130da2625618 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -1,5 +1,4 @@ BDW_GC_LIBS = @BDW_GC_LIBS@ -BUILD_DEBUG = 1 CC = @CC@ CFLAGS = @CFLAGS@ CXX = @CXX@ @@ -8,6 +7,7 @@ HAVE_OPENSSL = @HAVE_OPENSSL@ OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ +bash = @bash@ bindir = @bindir@ bsddiff_compat_include = @bsddiff_compat_include@ datadir = @datadir@ diff --git a/corepkgs/config.nix.in b/corepkgs/config.nix.in index 3819dc96c164..a5ec83b9ea0c 100644 --- a/corepkgs/config.nix.in +++ b/corepkgs/config.nix.in @@ -4,7 +4,7 @@ let if val != "" then val else def; in { perl = "@perl@"; - shell = "@shell@"; + shell = "@bash@"; coreutils = "@coreutils@"; bzip2 = "@bzip2@"; gzip = "@gzip@"; diff --git a/mk/lib.mk b/mk/lib.mk index 107a5af3f75e..60b6815e9e2e 100644 --- a/mk/lib.mk +++ b/mk/lib.mk @@ -17,6 +17,8 @@ noinst_SCRIPTS := # Pass -fPIC if we're building dynamic libraries. +BUILD_SHARED_LIBS = 1 + ifeq ($(BUILD_SHARED_LIBS), 1) GLOBAL_CFLAGS += -fPIC GLOBAL_CXXFLAGS += -fPIC @@ -25,6 +27,8 @@ endif # Pass -g if we want debug info. +BUILD_DEBUG = 1 + ifeq ($(BUILD_DEBUG), 1) GLOBAL_CFLAGS += -g GLOBAL_CXXFLAGS += -g @@ -38,6 +42,7 @@ include mk/libraries.mk include mk/programs.mk include mk/patterns.mk include mk/templates.mk +include mk/tests.mk # Include all sub-Makefiles. @@ -56,6 +61,7 @@ $(foreach script, $(bin_SCRIPTS), $(eval $(call install-program-in,$(script),$(b $(foreach script, $(bin_SCRIPTS), $(eval programs_list += $(script))) $(foreach script, $(noinst_SCRIPTS), $(eval programs_list += $(script))) $(foreach template, $(template_files), $(eval $(call instantiate-template,$(template)))) +$(foreach test, $(INSTALL_TESTS), $(eval $(call run-install-test,$(test)))) all: $(programs_list) $(libs_list) diff --git a/scripts/nix-reduce-build.in b/scripts/nix-reduce-build.in index 0c33275d5eb0..50beb9d10b16 100755 --- a/scripts/nix-reduce-build.in +++ b/scripts/nix-reduce-build.in @@ -1,4 +1,4 @@ -#! @shell@ +#! @bash@ WORKING_DIRECTORY=$(mktemp -d "${TMPDIR:-/tmp}"/nix-reduce-build-XXXXXX); cd "$WORKING_DIRECTORY"; diff --git a/src/nix-log2xml/Makefile b/src/nix-log2xml/Makefile index a88f948671dc..8b02dca7ae21 100644 --- a/src/nix-log2xml/Makefile +++ b/src/nix-log2xml/Makefile @@ -3,3 +3,6 @@ PROGRAMS += nix-log2xml nix-log2xml_DIR := $(d) nix-log2xml_SOURCES = log2xml.cc + +$(foreach file, mark-errors.xsl log2html.xsl treebits.js, \ + $(eval $(call install-data-in, $(d)/$(file), $(datadir)/nix/log2html))) diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 000000000000..21ffd047f6f2 --- /dev/null +++ b/tests/Makefile @@ -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 diff --git a/tests/common.sh.in b/tests/common.sh.in index 2ae34603fcb5..633769ae2c1e 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -1,7 +1,7 @@ set -e datadir="@datadir@" -profiledir="@profiledir@" +profiledir="@sysconfdir@/profile.d" export TEST_ROOT=$(pwd)/test-tmp export NIX_STORE_DIR @@ -16,7 +16,7 @@ export NIX_STATE_DIR=$TEST_ROOT/var/nix export NIX_DB_DIR=$TEST_ROOT/db export NIX_CONF_DIR=$TEST_ROOT/etc export NIX_MANIFESTS_DIR=$TEST_ROOT/var/nix/manifests -export SHARED=$TEST_ROOT/shared +export _NIX_TEST_SHARED=$TEST_ROOT/shared export NIX_REMOTE=$NIX_REMOTE_ export PATH=@bindir@:$PATH @@ -26,9 +26,9 @@ export dot=@dot@ export xmllint="@xmllint@" export xmlflags="@xmlflags@" export xsltproc="@xsltproc@" -export SHELL="@shell@" +export SHELL="@bash@" -export version=@version@ +export version=@PACKAGE_VERSION@ export system=@system@ readLink() { diff --git a/tests/config.nix b/tests/config.nix new file mode 100644 index 000000000000..6244a15fa48a --- /dev/null +++ b/tests/config.nix @@ -0,0 +1,20 @@ +with import ; + +rec { + inherit shell; + + path = coreutils; + + system = builtins.currentSystem; + + shared = builtins.getEnv "_NIX_TEST_SHARED"; + + mkDerivation = args: + derivation ({ + inherit system; + builder = shell; + args = ["-e" args.builder]; + PATH = path; + } // removeAttrs args ["builder" "meta"]) + // { meta = args.meta or {}; }; +} diff --git a/tests/config.nix.in b/tests/config.nix.in deleted file mode 100644 index db3da145135c..000000000000 --- a/tests/config.nix.in +++ /dev/null @@ -1,18 +0,0 @@ -rec { - shell = "@shell@"; - - path = "@testPath@"; - - system = "@system@"; - - shared = "@extra1@"; - - mkDerivation = args: - derivation ({ - inherit system; - builder = shell; - args = ["-e" args.builder]; - PATH = path; - } // removeAttrs args ["builder" "meta"]) - // { meta = args.meta or {}; }; -} diff --git a/tests/parallel.sh b/tests/parallel.sh index 9b150263a59d..3b7bbe5a2251 100644 --- a/tests/parallel.sh +++ b/tests/parallel.sh @@ -6,7 +6,7 @@ echo "testing nix-build -j..." clearStore -rm -f $SHARED.cur $SHARED.max +rm -f $_NIX_TEST_SHARED.cur $_NIX_TEST_SHARED.max outPath=$(nix-build -j10000 parallel.nix --no-out-link) @@ -15,8 +15,8 @@ echo "output path is $outPath" text=$(cat "$outPath") if test "$text" != "abacade"; then exit 1; fi -if test "$(cat $SHARED.cur)" != 0; then fail "wrong current process count"; fi -if test "$(cat $SHARED.max)" != 3; then fail "not enough parallelism"; fi +if test "$(cat $_NIX_TEST_SHARED.cur)" != 0; then fail "wrong current process count"; fi +if test "$(cat $_NIX_TEST_SHARED.max)" != 3; then fail "not enough parallelism"; fi # Second, test that parallel invocations of nix-build perform builds @@ -25,7 +25,7 @@ echo "testing multiple nix-build -j1..." clearStore -rm -f $SHARED.cur $SHARED.max +rm -f $_NIX_TEST_SHARED.cur $_NIX_TEST_SHARED.max drvPath=$(nix-instantiate parallel.nix --argstr sleepTime 15) @@ -52,5 +52,5 @@ wait $pid2 || fail "instance 2 failed: $?" wait $pid3 || fail "instance 3 failed: $?" wait $pid4 || fail "instance 4 failed: $?" -if test "$(cat $SHARED.cur)" != 0; then fail "wrong current process count"; fi -if test "$(cat $SHARED.max)" != 3; then fail "not enough parallelism"; fi +if test "$(cat $_NIX_TEST_SHARED.cur)" != 0; then fail "wrong current process count"; fi +if test "$(cat $_NIX_TEST_SHARED.max)" != 3; then fail "not enough parallelism"; fi -- cgit 1.4.1 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 (limited to 'corepkgs') 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 From 16e7d692092449263880ee795ec419cecbe22d24 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 1 Feb 2014 12:23:14 +0100 Subject: Update Makefile variable names --- Makefile | 2 +- corepkgs/local.mk | 2 +- doc/manual/local.mk | 8 ++++---- perl/local.mk | 6 +++--- scripts/local.mk | 8 ++++---- src/boost/format/local.mk | 2 +- src/bsdiff-4.3/local.mk | 4 ++-- src/libexpr/local.mk | 2 +- src/libmain/local.mk | 2 +- src/libstore/local.mk | 2 +- src/libutil/local.mk | 2 +- src/nix-daemon/local.mk | 2 +- src/nix-env/local.mk | 2 +- src/nix-hash/local.mk | 2 +- src/nix-instantiate/local.mk | 2 +- src/nix-log2xml/local.mk | 2 +- src/nix-store/local.mk | 2 +- tests/local.mk | 6 +++--- 18 files changed, 29 insertions(+), 29 deletions(-) (limited to 'corepkgs') diff --git a/Makefile b/Makefile index f22a70a81c99..df72578cc54b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -SUBS = \ +makefiles = \ src/boost/format/local.mk \ src/libutil/local.mk \ src/libstore/local.mk \ diff --git a/corepkgs/local.mk b/corepkgs/local.mk index a04e3e3fbc1d..19c1d06962c0 100644 --- a/corepkgs/local.mk +++ b/corepkgs/local.mk @@ -2,4 +2,4 @@ corepkgs_FILES = nar.nix buildenv.nix buildenv.pl unpack-channel.nix derivation. $(foreach file,config.nix $(corepkgs_FILES),$(eval $(call install-data-in,$(d)/$(file),$(datadir)/nix/corepkgs))) -template_files += $(d)/config.nix +template-files += $(d)/config.nix diff --git a/doc/manual/local.mk b/doc/manual/local.mk index ae3a9df5c89f..8d49e1e4d5ae 100644 --- a/doc/manual/local.mk +++ b/doc/manual/local.mk @@ -26,7 +26,7 @@ $(d)/manual.is-valid: $(d)/manual.xmli $(xmllint) --nonet --noout --relaxng $(docbookrng)/docbook.rng - @touch $@ -clean_files += $(d)/manual.xmli $(d)/version.txt $(d)/manual.is-valid +clean-files += $(d)/manual.xmli $(d)/version.txt $(d)/manual.is-valid # Generate man pages. @@ -43,7 +43,7 @@ $(man-pages): $(d)/manual.xmli $(d)/manual.is-valid $(docbookxsl)/profiling/profile.xsl $< 2> /dev/null | \ (cd doc/manual && $(XSLTPROC) $(docbookxsl)/manpages/docbook.xsl -) -clean_files += $(d)/*.1 $(d)/*.5 $(d)/*.8 +clean-files += $(d)/*.1 $(d)/*.5 $(d)/*.8 # Generate the HTML manual. @@ -62,7 +62,7 @@ $(eval $(call install-symlink, manual.html, $(docdir)/manual/index.html)) all: $(d)/manual.html -clean_files += $(d)/manual.html +clean-files += $(d)/manual.html # Generate the PDF manual. @@ -76,4 +76,4 @@ $(d)/manual.pdf: $(d)/manual.xml $(MANUAL_SRCS) $(d)/manual.is-valid exit 1; \ fi -clean_files += $(d)/manual.pdf +clean-files += $(d)/manual.pdf diff --git a/perl/local.mk b/perl/local.mk index cd07631ca888..b5550cc9f87c 100644 --- a/perl/local.mk +++ b/perl/local.mk @@ -17,7 +17,7 @@ ifeq ($(perlbindings), yes) $(d)/lib/Nix/Store.cc: $(d)/lib/Nix/Store.xs xsubpp $^ -output $@ - LIBS += Store + libraries += Store Store_DIR := $(d)/lib/Nix @@ -37,6 +37,6 @@ ifeq ($(perlbindings), yes) endif -clean_files += $(d)/lib/Nix/Config.pm $(d)/lib/Nix/Store.cc +clean-files += $(d)/lib/Nix/Config.pm $(d)/lib/Nix/Store.cc -dist_files += $(nix_perl_sources) +dist-files += $(nix_perl_sources) diff --git a/scripts/local.mk b/scripts/local.mk index 2805128db8de..606b73df6c74 100644 --- a/scripts/local.mk +++ b/scripts/local.mk @@ -9,7 +9,7 @@ nix_bin_scripts := \ $(d)/nix-pull \ $(d)/nix-push -bin_SCRIPTS += $(nix_bin_scripts) +bin-scripts += $(nix_bin_scripts) nix_substituters := \ $(d)/copy-from-other-stores.pl \ @@ -24,7 +24,7 @@ nix_noinst_scripts := \ $(d)/nix-reduce-build \ $(nix_substituters) -noinst_SCRIPTS += $(nix_noinst_scripts) +noinst-scripts += $(nix_noinst_scripts) profiledir = $(sysconfdir)/profile.d @@ -34,6 +34,6 @@ $(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) +clean-files += $(nix_bin_scripts) $(nix_noinst_scripts) -dist_files += $(d)/*.in +dist-files += $(d)/*.in diff --git a/src/boost/format/local.mk b/src/boost/format/local.mk index 17897fa59074..3776eff382fe 100644 --- a/src/boost/format/local.mk +++ b/src/boost/format/local.mk @@ -1,4 +1,4 @@ -LIBS += libformat +libraries += libformat libformat_NAME = libnixformat diff --git a/src/bsdiff-4.3/local.mk b/src/bsdiff-4.3/local.mk index aca1ac116205..320795a94c1b 100644 --- a/src/bsdiff-4.3/local.mk +++ b/src/bsdiff-4.3/local.mk @@ -1,4 +1,4 @@ -PROGRAMS += bsdiff bspatch +programs += bsdiff bspatch bsdiff_DIR := $(d) bsdiff_SOURCES := $(d)/bsdiff.c @@ -10,4 +10,4 @@ bspatch_SOURCES := $(d)/bspatch.c bspatch_LDFLAGS = -lbz2 $(bsddiff_compat_include) bspatch_INSTALL_DIR = $(libexecdir)/nix -dist_files += $(d)/compat-include/* +dist-files += $(d)/compat-include/* diff --git a/src/libexpr/local.mk b/src/libexpr/local.mk index de276aa65296..ff35155b1a96 100644 --- a/src/libexpr/local.mk +++ b/src/libexpr/local.mk @@ -1,4 +1,4 @@ -LIBS += libexpr +libraries += libexpr libexpr_NAME = libnixexpr diff --git a/src/libmain/local.mk b/src/libmain/local.mk index 0efeee531478..71a07d1979ab 100644 --- a/src/libmain/local.mk +++ b/src/libmain/local.mk @@ -1,4 +1,4 @@ -LIBS += libmain +libraries += libmain libmain_NAME = libnixmain diff --git a/src/libstore/local.mk b/src/libstore/local.mk index dcedd4c26ab8..a9ae53270076 100644 --- a/src/libstore/local.mk +++ b/src/libstore/local.mk @@ -1,4 +1,4 @@ -LIBS += libstore +libraries += libstore libstore_NAME = libnixstore diff --git a/src/libutil/local.mk b/src/libutil/local.mk index 83bd05f281d6..8af2e78d9ce4 100644 --- a/src/libutil/local.mk +++ b/src/libutil/local.mk @@ -1,4 +1,4 @@ -LIBS += libutil +libraries += libutil libutil_NAME = libnixutil diff --git a/src/nix-daemon/local.mk b/src/nix-daemon/local.mk index d02f9f6ce22d..db071a3f7c7e 100644 --- a/src/nix-daemon/local.mk +++ b/src/nix-daemon/local.mk @@ -1,4 +1,4 @@ -PROGRAMS += nix-daemon +programs += nix-daemon nix-daemon_DIR := $(d) diff --git a/src/nix-env/local.mk b/src/nix-env/local.mk index 5a38d2fb76af..e80719cd76f7 100644 --- a/src/nix-env/local.mk +++ b/src/nix-env/local.mk @@ -1,4 +1,4 @@ -PROGRAMS += nix-env +programs += nix-env nix-env_DIR := $(d) diff --git a/src/nix-hash/local.mk b/src/nix-hash/local.mk index 062e4d13b29e..7c290ca8466e 100644 --- a/src/nix-hash/local.mk +++ b/src/nix-hash/local.mk @@ -1,4 +1,4 @@ -PROGRAMS += nix-hash +programs += nix-hash nix-hash_DIR := $(d) diff --git a/src/nix-instantiate/local.mk b/src/nix-instantiate/local.mk index daa741eb7f08..7d1bc5ec9dfb 100644 --- a/src/nix-instantiate/local.mk +++ b/src/nix-instantiate/local.mk @@ -1,4 +1,4 @@ -PROGRAMS += nix-instantiate +programs += nix-instantiate nix-instantiate_DIR := $(d) diff --git a/src/nix-log2xml/local.mk b/src/nix-log2xml/local.mk index 8467d1973bda..46eb2e02ca64 100644 --- a/src/nix-log2xml/local.mk +++ b/src/nix-log2xml/local.mk @@ -1,4 +1,4 @@ -PROGRAMS += nix-log2xml +programs += nix-log2xml nix-log2xml_DIR := $(d) diff --git a/src/nix-store/local.mk b/src/nix-store/local.mk index edd111b42015..7f93e4c19196 100644 --- a/src/nix-store/local.mk +++ b/src/nix-store/local.mk @@ -1,4 +1,4 @@ -PROGRAMS += nix-store +programs += nix-store nix-store_DIR := $(d) diff --git a/tests/local.mk b/tests/local.mk index 21ffd047f6f2..87f4e25e6024 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -12,10 +12,10 @@ nix_tests = \ 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)) +install-tests += $(foreach x, $(nix_tests), tests/$(x)) -TESTS_ENVIRONMENT = NIX_REMOTE= $(bash) -e +tests-environment = NIX_REMOTE= $(bash) -e -clean_files += $(d)/common.sh +clean-files += $(d)/common.sh installcheck: $(d)/common.sh -- cgit 1.4.1 From 0c6d62cf27b3b22fa60bddad16ea8e8d062e4a99 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 1 Feb 2014 12:26:38 +0100 Subject: Remove Automakefiles --- Makefile.am | 42 --------------- corepkgs/Makefile.am | 12 ----- doc/Makefile.am | 1 - doc/manual/Makefile.am | 117 ---------------------------------------- misc/Makefile.am | 1 - misc/emacs/Makefile.am | 5 -- perl/Makefile.am | 38 ------------- scripts/Makefile.am | 41 -------------- src/Makefile.am | 3 -- src/boost/format/Makefile.am | 12 ----- src/bsdiff-4.3/Makefile.am | 13 ----- src/libexpr/Makefile.am | 40 -------------- src/libmain/Makefile.am | 11 ---- src/libstore/Makefile.am | 33 ------------ src/libutil/Makefile.am | 18 ------- src/nix-daemon/Makefile.am | 12 ----- src/nix-env/Makefile.am | 12 ----- src/nix-hash/Makefile.am | 8 --- src/nix-instantiate/Makefile.am | 10 ---- src/nix-log2xml/Makefile.am | 17 ------ src/nix-store/Makefile.am | 12 ----- tests/Makefile.am | 52 ------------------ 22 files changed, 510 deletions(-) delete mode 100644 Makefile.am delete mode 100644 corepkgs/Makefile.am delete mode 100644 doc/Makefile.am delete mode 100644 doc/manual/Makefile.am delete mode 100644 misc/Makefile.am delete mode 100644 misc/emacs/Makefile.am delete mode 100644 perl/Makefile.am delete mode 100644 scripts/Makefile.am delete mode 100644 src/Makefile.am delete mode 100644 src/boost/format/Makefile.am delete mode 100644 src/bsdiff-4.3/Makefile.am delete mode 100644 src/libexpr/Makefile.am delete mode 100644 src/libmain/Makefile.am delete mode 100644 src/libstore/Makefile.am delete mode 100644 src/libutil/Makefile.am delete mode 100644 src/nix-daemon/Makefile.am delete mode 100644 src/nix-env/Makefile.am delete mode 100644 src/nix-hash/Makefile.am delete mode 100644 src/nix-instantiate/Makefile.am delete mode 100644 src/nix-log2xml/Makefile.am delete mode 100644 src/nix-store/Makefile.am delete mode 100644 tests/Makefile.am (limited to 'corepkgs') diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index d3ef224de370..000000000000 --- a/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -SUBDIRS = src perl scripts corepkgs doc misc tests -EXTRA_DIST = substitute.mk nix.spec nix.spec.in bootstrap.sh \ - NEWS version misc/systemd/nix-daemon.service - -pkginclude_HEADERS = config.h - -include ./substitute.mk - -nix.spec: nix.spec.in - -install-data-local: init-state - $(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix - $(INSTALL) -d $(DESTDIR)$(docdir) - $(INSTALL_DATA) README $(DESTDIR)$(docdir)/ - -if INIT_STATE - -# For setuid operation, you can enable the following: -# INIT_FLAGS = -g @NIX_GROUP@ -o @NIX_USER@ -# GROUP_WRITABLE = -m 775 - -init-state: - $(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix - $(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/db - $(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/log/nix - $(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/log/nix/drvs - $(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/profiles - $(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/gcroots - $(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/temproots - $(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(localstatedir)/nix/userpool - -$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(storedir) - $(INSTALL) $(INIT_FLAGS) $(GROUP_WRITABLE) -d $(DESTDIR)$(localstatedir)/nix/manifests - -else - -init-state: - -endif - -NEWS: - $(MAKE) -C doc/manual NEWS.txt - cp $(srcdir)/doc/manual/NEWS.txt NEWS diff --git a/corepkgs/Makefile.am b/corepkgs/Makefile.am deleted file mode 100644 index 111b667d0b58..000000000000 --- a/corepkgs/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -all-local: config.nix - -files = nar.nix buildenv.nix buildenv.pl unpack-channel.nix derivation.nix fetchurl.nix \ - imported-drv-to-derivation.nix - -install-exec-local: - $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs - $(INSTALL_DATA) config.nix $(files) $(DESTDIR)$(datadir)/nix/corepkgs - -include ../substitute.mk - -EXTRA_DIST = config.nix.in $(files) diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index e76efafdb8a2..000000000000 --- a/doc/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = manual diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am deleted file mode 100644 index 56be7e1b88ed..000000000000 --- a/doc/manual/Makefile.am +++ /dev/null @@ -1,117 +0,0 @@ -XMLLINT = $(xmllint) --nonet $(xmlflags) -XSLTPROC = $(xsltproc) --nonet $(xmlflags) \ - --param section.autolabel 1 \ - --param section.label.includes.component.label 1 \ - --param html.stylesheet \'style.css\' \ - --param xref.with.number.and.title 1 \ - --param toc.section.depth 3 \ - --param admon.style \'\' \ - --param callout.graphics.extension \'.gif\' \ - --param contrib.inline.enabled 0 - -dblatex_opts = \ - -P doc.collab.show=0 \ - -P latex.output.revhistory=0 - -# Note: we use GIF for now, since the PNGs shipped with Docbook aren't -# transparent. - -man1_MANS = nix-env.1 nix-build.1 nix-shell.1 nix-store.1 nix-instantiate.1 \ - nix-collect-garbage.1 nix-push.1 nix-pull.1 \ - nix-prefetch-url.1 nix-channel.1 \ - nix-install-package.1 nix-hash.1 nix-copy-closure.1 - -man5_MANS = nix.conf.5 - -man8_MANS = nix-daemon.8 - -FIGURES = figures/user-environments.png - -MANUAL_SRCS = manual.xml introduction.xml installation.xml \ - package-management.xml writing-nix-expressions.xml builtins.xml \ - build-farm.xml \ - $(man1_MANS:.1=.xml) $(man8_MANS:.8=.xml) \ - troubleshooting.xml bugs.xml opt-common.xml opt-common-syn.xml opt-inst-syn.xml \ - env-common.xml quick-start.xml nix-lang-ref.xml glossary.xml \ - conf-file.xml release-notes.xml \ - style.css images - -# Do XInclude processing. -manual.xmli: $(MANUAL_SRCS) version.txt - $(XMLLINT) --xinclude $< -o $@.tmp - mv $@.tmp $@ - -# Note: RelaxNG validation requires xmllint >= 2.7.4. -manual.is-valid: manual.xmli - $(XSLTPROC) --novalid --stringparam profile.condition manual \ - $(docbookxsl)/profiling/profile.xsl $< 2> /dev/null | \ - $(XMLLINT) --noout --relaxng $(docbookrng)/docbook.rng - - touch $@ - -version.txt: - echo -n $(VERSION) > version.txt - -man $(MANS): manual.is-valid - $(XSLTPROC) --stringparam profile.condition manpage \ - $(docbookxsl)/profiling/profile.xsl manual.xmli 2> /dev/null | \ - $(XSLTPROC) $(docbookxsl)/manpages/docbook.xsl - - -manual.html: $(MANUAL_SRCS) manual.is-valid images - $(XSLTPROC) --xinclude --stringparam profile.condition manual \ - $(docbookxsl)/profiling/profile.xsl manual.xml | \ - $(XSLTPROC) --output manual.html $(docbookxsl)/html/docbook.xsl - - -manual.pdf: $(MANUAL_SRCS) manual.is-valid images - if test "$(dblatex)" != ""; then \ - $(XSLTPROC) --xinclude --stringparam profile.condition manual \ - $(docbookxsl)/profiling/profile.xsl manual.xml | \ - $(dblatex) -o manual.pdf $(dblatex_opts) -; \ - else \ - echo "Please install dblatex and rerun configure."; \ - exit 1; \ - fi - - -NEWS_OPTS = \ - --stringparam generate.toc "article nop" \ - --stringparam section.autolabel.max.depth 0 \ - --stringparam header.rule 0 - -NEWS.html: release-notes.xml - $(XSLTPROC) --xinclude --output $@ $(NEWS_OPTS) \ - $(docbookxsl)/html/docbook.xsl release-notes.xml - -NEWS.txt: release-notes.xml - $(XSLTPROC) --xinclude quote-literals.xsl release-notes.xml | \ - $(XSLTPROC) --output $@.tmp.html $(NEWS_OPTS) \ - $(docbookxsl)/html/docbook.xsl - - LANG=en_US $(w3m) -dump $@.tmp.html > $@ - rm $@.tmp.html - - -all-local: manual.html NEWS.html NEWS.txt - -install-data-local: manual.html - $(INSTALL) -d $(DESTDIR)$(docdir)/manual - $(INSTALL_DATA) manual.html $(DESTDIR)$(docdir)/manual - ln -sf manual.html $(DESTDIR)$(docdir)/manual/index.html - $(INSTALL_DATA) style.css $(DESTDIR)$(docdir)/manual - cp -r images $(DESTDIR)$(docdir)/manual/images - $(INSTALL) -d $(DESTDIR)$(docdir)/manual/figures - $(INSTALL_DATA) $(FIGURES) $(DESTDIR)$(docdir)/manual/figures - $(INSTALL) -d $(DESTDIR)$(docdir)/release-notes - $(INSTALL_DATA) NEWS.html $(DESTDIR)$(docdir)/release-notes/index.html - $(INSTALL_DATA) style.css $(DESTDIR)$(docdir)/release-notes/ - -images: - mkdir images -# cp $(docbookxsl)/images/*.gif images - mkdir images/callouts - cp $(docbookxsl)/images/callouts/*.gif images/callouts - chmod -R +w images - -KEEP = manual.html manual.xmli manual.is-valid version.txt $(MANS) NEWS.html NEWS.txt - -EXTRA_DIST = $(MANUAL_SRCS) $(FIGURES) $(KEEP) - -DISTCLEANFILES = $(KEEP) diff --git a/misc/Makefile.am b/misc/Makefile.am deleted file mode 100644 index ef10d1e98120..000000000000 --- a/misc/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = emacs diff --git a/misc/emacs/Makefile.am b/misc/emacs/Makefile.am deleted file mode 100644 index 49f19fe50628..000000000000 --- a/misc/emacs/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -EXTRA_DIST = nix-mode.el - -install-data-local: - $(INSTALL) -d $(DESTDIR)$(datadir)/emacs/site-lisp - $(INSTALL_DATA) $(srcdir)/nix-mode.el $(DESTDIR)$(datadir)/emacs/site-lisp diff --git a/perl/Makefile.am b/perl/Makefile.am deleted file mode 100644 index b8e60bc2dc2b..000000000000 --- a/perl/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -PERL_MODULES = lib/Nix/Store.pm lib/Nix/Manifest.pm lib/Nix/GeneratePatches.pm lib/Nix/SSH.pm lib/Nix/CopyClosure.pm lib/Nix/Config.pm.in lib/Nix/Utils.pm lib/Nix/Crypto.pm - -all: $(PERL_MODULES:.in=) - -install-exec-local: $(PERL_MODULES:.in=) install-perl-xs - $(INSTALL) -d $(DESTDIR)$(perllibdir)/Nix - $(INSTALL_DATA) $(PERL_MODULES:.in=) $(DESTDIR)$(perllibdir)/Nix - -if PERL_BINDINGS -install-perl-xs: - $(INSTALL) -d $(DESTDIR)$(perllibdir)/auto/Nix/Store - ln -sfn $(pkglibdir)/libNixStore$(dynlib_suffix) $(DESTDIR)$(perllibdir)/auto/Nix/Store/Store$(dynlib_suffix) - -# Awful hackery to get libtool to build Perl XS bindings. -pkglib_LTLIBRARIES = libNixStore.la - -nodist_libNixStore_la_SOURCES = lib/Nix/Store.cc - -CLEANFILES = lib/Nix/Store.cc - -libNixStore_la_LIBADD = $(top_builddir)/src/libstore/libstore.la - -AM_CXXFLAGS = \ - -I$(top_srcdir)/src -I$(top_srcdir)/src/libutil -I$(top_srcdir)/src/libstore \ - -I$(shell $(perl) -e 'use Config; print $$Config{archlibexp};')/CORE \ - -D_FILE_OFFSET_BITS=64 - -lib/Nix/Store.cc: lib/Nix/Store.xs - $(INSTALL) -d lib/Nix - xsubpp $^ -output $@ - -else -install-perl-xs: -endif - -EXTRA_DIST = $(PERL_MODULES) lib/Nix/Store.xs - -include ../substitute.mk diff --git a/scripts/Makefile.am b/scripts/Makefile.am deleted file mode 100644 index d9f39aad1b4f..000000000000 --- a/scripts/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -bin_SCRIPTS = nix-collect-garbage \ - nix-pull nix-push nix-prefetch-url \ - nix-install-package nix-channel nix-build \ - nix-copy-closure nix-generate-patches - -noinst_SCRIPTS = nix-profile.sh \ - find-runtime-roots.pl build-remote.pl nix-reduce-build \ - copy-from-other-stores.pl nix-http-export.cgi - -profiledir = $(sysconfdir)/profile.d - -install-exec-local: download-using-manifests.pl copy-from-other-stores.pl download-from-binary-cache.pl find-runtime-roots.pl - $(INSTALL) -d $(DESTDIR)$(profiledir) - $(INSTALL_DATA) nix-profile.sh $(DESTDIR)$(profiledir)/nix.sh - $(INSTALL) -d $(DESTDIR)$(libexecdir)/nix - $(INSTALL_PROGRAM) find-runtime-roots.pl $(DESTDIR)$(libexecdir)/nix - $(INSTALL_PROGRAM) build-remote.pl $(DESTDIR)$(libexecdir)/nix - $(INSTALL) -d $(DESTDIR)$(libexecdir)/nix/substituters - $(INSTALL_PROGRAM) download-using-manifests.pl copy-from-other-stores.pl download-from-binary-cache.pl $(DESTDIR)$(libexecdir)/nix/substituters - $(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix - ln -sf nix-build $(DESTDIR)$(bindir)/nix-shell - -include ../substitute.mk - -EXTRA_DIST = nix-collect-garbage.in \ - nix-pull.in nix-push.in nix-profile.sh.in \ - nix-prefetch-url.in nix-install-package.in \ - nix-channel.in \ - nix-build.in \ - download-using-manifests.pl.in \ - copy-from-other-stores.pl.in \ - download-from-binary-cache.pl.in \ - nix-copy-closure.in \ - find-runtime-roots.pl.in \ - build-remote.pl.in \ - nix-reduce-build.in \ - nix-http-export.cgi.in \ - nix-generate-patches.in - -clean: - rm -f $(bin_SCRIPTS) $(noinst_SCRIPTS) diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index a5e411b9ed6e..000000000000 --- a/src/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS = boost libutil libstore libmain nix-store nix-hash \ - libexpr nix-instantiate nix-env nix-daemon \ - nix-log2xml bsdiff-4.3 diff --git a/src/boost/format/Makefile.am b/src/boost/format/Makefile.am deleted file mode 100644 index 13e23d315da8..000000000000 --- a/src/boost/format/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -pkglib_LTLIBRARIES = libformat.la - -libformat_la_SOURCES = format_implementation.cc free_funcs.cc \ - parsing.cc - -pkginclude_HEADERS = exceptions.hpp feed_args.hpp format_class.hpp \ - format_fwd.hpp group.hpp internals.hpp internals_fwd.hpp \ - macros_default.hpp - -pkgincludedir = ${includedir}/nix/boost/format - -AM_CXXFLAGS = -Wall -I$(srcdir)/../.. diff --git a/src/bsdiff-4.3/Makefile.am b/src/bsdiff-4.3/Makefile.am deleted file mode 100644 index 62315333a76a..000000000000 --- a/src/bsdiff-4.3/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -EXTRA_DIST = compat-include - -libexec_PROGRAMS = bsdiff bspatch - -bsdiff_SOURCES = bsdiff.c - -bsdiff_LDADD = -lbz2 - -bspatch_SOURCES = bspatch.c - -bspatch_LDADD = -lbz2 - -AM_CFLAGS = -O3 ${bsddiff_compat_include} diff --git a/src/libexpr/Makefile.am b/src/libexpr/Makefile.am deleted file mode 100644 index 7edbe77157d8..000000000000 --- a/src/libexpr/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -pkglib_LTLIBRARIES = libexpr.la - -libexpr_la_SOURCES = \ - nixexpr.cc eval.cc primops.cc lexer-tab.cc parser-tab.cc \ - get-drvs.cc attr-path.cc value-to-xml.cc value-to-json.cc \ - common-opts.cc names.cc - -pkginclude_HEADERS = \ - nixexpr.hh eval.hh eval-inline.hh lexer-tab.hh parser-tab.hh \ - get-drvs.hh attr-path.hh value-to-xml.hh value-to-json.hh \ - common-opts.hh names.hh symbol-table.hh value.hh - -libexpr_la_LIBADD = ../libutil/libutil.la ../libstore/libstore.la \ - ../boost/format/libformat.la @BDW_GC_LIBS@ - -BUILT_SOURCES = \ - parser-tab.hh lexer-tab.hh parser-tab.cc lexer-tab.cc - -EXTRA_DIST = lexer.l parser.y - -AM_CXXFLAGS = \ - -I$(srcdir)/.. \ - -I$(srcdir)/../libutil -I$(srcdir)/../libstore - - -# Parser generation. - -parser-tab.cc parser-tab.hh: parser.y - $(bison) -v -o parser-tab.cc $(srcdir)/parser.y -d - -lexer-tab.cc lexer-tab.hh: lexer.l - $(flex) --outfile lexer-tab.cc --header-file=lexer-tab.hh $(srcdir)/lexer.l - - -# 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 diff --git a/src/libmain/Makefile.am b/src/libmain/Makefile.am deleted file mode 100644 index 75b9d83dcf73..000000000000 --- a/src/libmain/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -pkglib_LTLIBRARIES = libmain.la - -libmain_la_SOURCES = shared.cc stack.cc - -libmain_la_LIBADD = ../libstore/libstore.la @BDW_GC_LIBS@ - -pkginclude_HEADERS = shared.hh - -AM_CXXFLAGS = \ - -I$(srcdir)/.. -I$(srcdir)/../libutil \ - -I$(srcdir)/../libstore diff --git a/src/libstore/Makefile.am b/src/libstore/Makefile.am deleted file mode 100644 index 3dfb1e0c3a24..000000000000 --- a/src/libstore/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -pkglib_LTLIBRARIES = libstore.la - -libstore_la_SOURCES = \ - store-api.cc local-store.cc remote-store.cc derivations.cc build.cc misc.cc \ - globals.cc references.cc pathlocks.cc gc.cc \ - optimise-store.cc - -pkginclude_HEADERS = \ - store-api.hh local-store.hh remote-store.hh derivations.hh misc.hh \ - globals.hh references.hh pathlocks.hh \ - worker-protocol.hh - -libstore_la_LIBADD = ../libutil/libutil.la ../boost/format/libformat.la @SQLITE3_LIBS@ -lbz2 - -EXTRA_DIST = schema.sql - -AM_CXXFLAGS = -Wall \ - -I$(srcdir)/.. -I$(srcdir)/../libutil \ - -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)\" \ - -DNIX_VERSION=\"$(VERSION)\" \ - -I$(srcdir)/.. -I$(srcdir)/../libutil \ - -I$(srcdir)/../libstore - -local-store.lo: schema.sql.hh - -%.sql.hh: %.sql - sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/' < $< > $@ || (rm $@ && exit 1) diff --git a/src/libutil/Makefile.am b/src/libutil/Makefile.am deleted file mode 100644 index 0c4073e66eab..000000000000 --- a/src/libutil/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -pkglib_LTLIBRARIES = libutil.la - -libutil_la_SOURCES = util.cc hash.cc serialise.cc \ - archive.cc xml-writer.cc affinity.cc - -libutil_la_LIBADD = ../boost/format/libformat.la - -pkginclude_HEADERS = util.hh hash.hh serialise.hh \ - archive.hh xml-writer.hh types.hh affinity.hh - -if !HAVE_OPENSSL -libutil_la_SOURCES += \ - md5.c md5.h sha1.c sha1.h sha256.c sha256.h md32_common.h -else -libutil_la_LIBADD += @OPENSSL_LIBS@ -endif - -AM_CXXFLAGS = -Wall -I$(srcdir)/.. diff --git a/src/nix-daemon/Makefile.am b/src/nix-daemon/Makefile.am deleted file mode 100644 index b8e9f4a064ad..000000000000 --- a/src/nix-daemon/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -bin_PROGRAMS = nix-daemon - -nix_daemon_SOURCES = nix-daemon.cc -nix_daemon_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la - -AM_CXXFLAGS = \ - -I$(srcdir)/.. -I$(srcdir)/../libutil \ - -I$(srcdir)/../libstore -I$(srcdir)/../libmain - -install-exec-local: - ln -sf nix-daemon $(DESTDIR)$(bindir)/nix-worker diff --git a/src/nix-env/Makefile.am b/src/nix-env/Makefile.am deleted file mode 100644 index 4d3bd111d719..000000000000 --- a/src/nix-env/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -bin_PROGRAMS = nix-env - -nix_env_SOURCES = nix-env.cc profiles.cc profiles.hh user-env.cc user-env.hh - -nix_env_LDADD = ../libmain/libmain.la ../libexpr/libexpr.la \ - ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la - -AM_CXXFLAGS = \ - -I$(srcdir)/.. \ - -I$(srcdir)/../libutil -I$(srcdir)/../libstore \ - -I$(srcdir)/../libexpr -I$(srcdir)/../libmain -I../libexpr diff --git a/src/nix-hash/Makefile.am b/src/nix-hash/Makefile.am deleted file mode 100644 index ef7bb8423980..000000000000 --- a/src/nix-hash/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -bin_PROGRAMS = nix-hash - -nix_hash_SOURCES = nix-hash.cc -nix_hash_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la - -AM_CXXFLAGS = \ - -I$(srcdir)/.. -I$(srcdir)/../libutil -I$(srcdir)/../libstore -I$(srcdir)/../libmain diff --git a/src/nix-instantiate/Makefile.am b/src/nix-instantiate/Makefile.am deleted file mode 100644 index 96978f36c5ae..000000000000 --- a/src/nix-instantiate/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -bin_PROGRAMS = nix-instantiate - -nix_instantiate_SOURCES = nix-instantiate.cc -nix_instantiate_LDADD = ../libmain/libmain.la ../libexpr/libexpr.la \ - ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la - -AM_CXXFLAGS = \ - -I$(srcdir)/.. -I$(srcdir)/../libutil -I$(srcdir)/../libstore \ - -I$(srcdir)/../libexpr -I$(srcdir)/../libmain -I../libexpr diff --git a/src/nix-log2xml/Makefile.am b/src/nix-log2xml/Makefile.am deleted file mode 100644 index c538fda08014..000000000000 --- a/src/nix-log2xml/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -bin_PROGRAMS = nix-log2xml - -nix_log2xml_SOURCES = log2xml.cc - -%.xml: %.log nix-log2xml - ./nix-log2xml < $< > $@ - -%.html: %.xml mark-errors.xsl log2html.xsl - $(xsltproc) mark-errors.xsl $< | $(xsltproc) log2html.xsl - > $@ - -LOG2HTML = $(srcdir)/mark-errors.xsl $(srcdir)/log2html.xsl $(srcdir)/treebits.js - -EXTRA_DIST = $(LOG2HTML) - -install-data-local: - $(INSTALL) -d $(DESTDIR)$(datadir)/nix/log2html - $(INSTALL_DATA) $(LOG2HTML) $(DESTDIR)$(datadir)/nix/log2html diff --git a/src/nix-store/Makefile.am b/src/nix-store/Makefile.am deleted file mode 100644 index fca9eff7cde8..000000000000 --- a/src/nix-store/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -bin_PROGRAMS = nix-store - -nix_store_SOURCES = \ - nix-store.cc dotgraph.cc dotgraph.hh \ - xmlgraph.cc xmlgraph.hh - -nix_store_LDADD = ../libmain/libmain.la ../libstore/libstore.la ../libutil/libutil.la \ - ../boost/format/libformat.la -lbz2 - -AM_CXXFLAGS = \ - -I$(srcdir)/.. -I$(srcdir)/../libutil \ - -I$(srcdir)/../libstore -I$(srcdir)/../libmain diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 38cf7b1bda1f..000000000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -TESTS_ENVIRONMENT = NIX_REMOTE= $(bash) -e - -extra1 = $(shell pwd)/test-tmp/shared - -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 - -XFAIL_TESTS = - -profiledir = $(sysconfdir)/profile.d - -include ../substitute.mk - -$(TESTS): common.sh config.nix - -EXTRA_DIST = $(TESTS) \ - config.nix.in \ - simple.nix simple.builder.sh \ - hash-check.nix \ - dependencies.nix dependencies.builder*.sh \ - parallel.nix parallel.builder.sh \ - build-hook.nix build-hook.hook.sh \ - substituter.sh substituter2.sh \ - gc-concurrent.nix gc-concurrent.builder.sh gc-concurrent2.builder.sh \ - user-envs.nix user-envs.builder.sh \ - fixed.nix fixed.builder1.sh fixed.builder2.sh \ - gc-runtime.nix \ - check-refs.nix \ - filter-source.nix \ - export-graph.nix \ - negative-caching.nix \ - binary-patching.nix \ - timeout.nix timeout.builder.sh \ - secure-drv-outputs.nix \ - multiple-outputs.nix \ - import-derivation.nix \ - fetchurl.nix \ - $(wildcard lang/*.nix) $(wildcard lang/*.exp) $(wildcard lang/*.exp.xml) $(wildcard lang/*.flags) $(wildcard lang/dir*/*.nix) \ - common.sh.in - -# Hacky. -check-am: - @echo "Warning: Nix has no 'make check'. Please install Nix and run 'make installcheck' instead." - -installcheck: check-TESTS -- cgit 1.4.1