Automatically regenerate Makefile.config

And move some stuff around.
This commit is contained in:
Eelco Dolstra 2013-11-22 16:59:09 +01:00
parent ffdc85fc8a
commit 9a14d5e2f3
2 changed files with 20 additions and 12 deletions

View file

@ -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 = @ QUIET = @
@ -34,6 +40,8 @@ define LIBS_template =
dist_files += $$(_srcs) dist_files += $$(_srcs)
endef endef
$(foreach lib, $(LIBS), $(eval $(call LIBS_template,$(lib))))
# Generate Make rules for programs. # Generate Make rules for programs.
programs_list := programs_list :=
@ -58,10 +66,10 @@ define PROGRAMS_template =
dist_files += $$(_srcs) dist_files += $$(_srcs)
endef endef
$(foreach prog, $(PROGRAMS), $(eval $(call PROGRAMS_template,$(prog))))
# Distributing stuff. # Distributing stuff.
dist_files :=
dist_name = $(PACKAGE_NAME)-$(PACKAGE_VERSION) dist_name = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
dist: dist:
@ -70,10 +78,12 @@ dist:
# Cleaning stuff. # Cleaning stuff.
clean_list :=
clean: clean:
rm -fv $(clean_list) rm -fv $(clean_list)
dryclean: dryclean:
@echo $(clean_list) @echo $(clean_list)
all: $(programs_list)

View file

@ -1,5 +1,6 @@
include Makefile.config default: all
include Makefile.lib
here = $(dir $(lastword $(MAKEFILE_LIST)))
include src/boost/format/Makefile.new include src/boost/format/Makefile.new
include src/libutil/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-env/Makefile.new
include src/nix-daemon/Makefile.new include src/nix-daemon/Makefile.new
include Makefile.lib
CXXFLAGS += -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr 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))))
all: $(programs_list)