support a fast-make mode that avoids globbing into llvm and libuv

This commit is contained in:
Graydon Hoare 2012-02-10 12:07:01 -08:00
parent 8e55d3130a
commit 5fc2e9e9ab
3 changed files with 18 additions and 5 deletions

1
configure vendored
View file

@ -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"

View 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

View file

@ -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)))" \