]> git.lizzy.rs Git - rust.git/commitdiff
support a fast-make mode that avoids globbing into llvm and libuv
authorGraydon Hoare <graydon@mozilla.com>
Fri, 10 Feb 2012 20:07:01 +0000 (12:07 -0800)
committerGraydon Hoare <graydon@mozilla.com>
Fri, 10 Feb 2012 20:07:11 +0000 (12:07 -0800)
configure
mk/llvm.mk
mk/rt.mk

index 10770c07b748fd0244b4ba3645c0bad1feaa7a51..a910f6d9eabf588a69d79243dc39fad5fb2064f8 100755 (executable)
--- a/configure
+++ b/configure
@@ -262,6 +262,7 @@ opt docs     1 "build documentation"
 opt optimize 1 "build optimized rust code"
 opt optimize-cxx 1 "build optimized C++ code"
 opt optimize-llvm 1 "build optimized LLVM"
+opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
 opt manage-submodules 1 "let the build manage the git submodules"
 opt mingw-cross 0 "cross-compile for win32 using mingw"
 opt clang 0 "prefer clang to gcc for building the runtime"
index 17a8425c227e2ae98d7e1b93046ed4b0d427df3e..9b7c82c139d4a071762177e33bf11f86ed4c1d89 100644 (file)
@@ -1,3 +1,7 @@
+
+ifdef CFG_ENABLE_FAST_MAKE
+LLVM_DEPS := $(S)/.gitmodules
+else
 # Recursive wildcard function
 # http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html
 rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) \
@@ -5,6 +9,7 @@ rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) \
 
 # This is just a rough approximation of LLVM deps
 LLVM_DEPS=$(call rwildcard,$(CFG_LLVM_SRC_DIR),*cpp *hpp)
+endif
 
 define DEF_LLVM_RULES
 
index 2ba8610f344ebcd47346d62aa82492d61507dd93..e43a68e5211de8419684489b41a59730fcb1f6b7 100644 (file)
--- a/mk/rt.mk
+++ b/mk/rt.mk
@@ -158,11 +158,18 @@ rt/$(1)/$(CFG_RUNTIME): $$(RUNTIME_OBJS_$(1)) $$(MKFILE_DEPS) \
 # FIXME: For some reason libuv's makefiles can't figure out the correct definition
 # of CC on the mingw I'm using, so we are explicitly using gcc. Also, we
 # have to list environment variables first on windows... mysterious
-$$(LIBUV_LIB_$(1)): $$(wildcard \
-                     $$(S)src/libuv/* \
-                     $$(S)src/libuv/*/* \
-                     $$(S)src/libuv/*/*/* \
-                     $$(S)src/libuv/*/*/*/*)
+
+ifdef CFG_ENABLE_FAST_MAKE
+LIBUV_DEPS := $$(S)/.gitmodules
+else
+LIBUV_DEPS := $$(wildcard \
+              $$(S)src/libuv/* \
+              $$(S)src/libuv/*/* \
+              $$(S)src/libuv/*/*/* \
+              $$(S)src/libuv/*/*/*/*)
+endif
+
+$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
        $$(Q)$$(MAKE) -C $$(S)mk/libuv/$$(LIBUV_ARCH_$(1))/$$(LIBUV_OSTYPE_$(1)) \
                CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
         LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \