about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile.lib20
-rw-r--r--Makefile.new12
2 files changed, 20 insertions, 12 deletions
diff --git a/Makefile.lib b/Makefile.lib
index 449f19ad506f..b6d31e7ce83b 100644
--- a/Makefile.lib
+++ b/Makefile.lib
@@ -1,6 +1,12 @@
-default: all
+# Include Autoconf variables.
+Makefile.config: Makefile.config.in
+	./config.status
+
+include Makefile.config
+
+clean_list :=
+dist_files :=
 
-here = $(dir $(lastword $(MAKEFILE_LIST)))
 
 QUIET = @
 
@@ -34,6 +40,8 @@ define LIBS_template =
   dist_files += $$(_srcs)
 endef
 
+$(foreach lib, $(LIBS), $(eval $(call LIBS_template,$(lib))))
+
 
 # Generate Make rules for programs.
 programs_list :=
@@ -58,10 +66,10 @@ define PROGRAMS_template =
   dist_files += $$(_srcs)
 endef
 
+$(foreach prog, $(PROGRAMS), $(eval $(call PROGRAMS_template,$(prog))))
 
-# Distributing stuff.
-dist_files :=
 
+# Distributing stuff.
 dist_name = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
 
 dist:
@@ -70,10 +78,12 @@ dist:
 
 
 # Cleaning stuff.
-clean_list :=
 
 clean:
 	rm -fv $(clean_list)
 
 dryclean:
 	@echo $(clean_list)
+
+
+all: $(programs_list)
diff --git a/Makefile.new b/Makefile.new
index 8911d6d72c40..ea4096cc1c4b 100644
--- a/Makefile.new
+++ b/Makefile.new
@@ -1,5 +1,6 @@
-include Makefile.config
-include Makefile.lib
+default: all
+
+here = $(dir $(lastword $(MAKEFILE_LIST)))
 
 include src/boost/format/Makefile.new
 include src/libutil/Makefile.new
@@ -12,9 +13,6 @@ include src/nix-instantiate/Makefile.new
 include src/nix-env/Makefile.new
 include src/nix-daemon/Makefile.new
 
-CXXFLAGS += -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr
-
-$(foreach lib, $(LIBS), $(eval $(call LIBS_template,$(lib))))
-$(foreach prog, $(PROGRAMS), $(eval $(call PROGRAMS_template,$(prog))))
+include Makefile.lib
 
-all: $(programs_list)
+CXXFLAGS += -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr