From 21590232a6dd550a707fdcbbe9a71b1740ae9b4f Mon Sep 17 00:00:00 2001 From: Jordan Lewis Date: Thu, 28 Dec 2017 13:10:03 -0500 Subject: [PATCH 1/2] build: don't print GEN flagsfile.go messages They're not helpful and cause make to feel slower than it is. Release note: None --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 31aa7a0d425d..3171a86bbe6d 100644 --- a/Makefile +++ b/Makefile @@ -505,7 +505,6 @@ CGO_FLAGS_FILES := $(CGO_UNSUFFIXED_FLAGS_FILES) $(CGO_SUFFIXED_FLAGS_FILES) $(CGO_UNSUFFIXED_FLAGS_FILES): .ALWAYS_REBUILD $(CGO_FLAGS_FILES): Makefile - @echo 'GEN $@' @echo '// GENERATED FILE DO NOT EDIT' > $@ @echo >> $@ @echo '// +build $(if $(findstring $(NATIVE_SPECIFIER_TAG),$@),$(NATIVE_SPECIFIER_TAG),!make)' >> $@ From 03806d0375639675c191f62dba033367b27df57f Mon Sep 17 00:00:00 2001 From: Jordan Lewis Date: Thu, 28 Dec 2017 13:30:51 -0500 Subject: [PATCH 2/2] build: only build one of roach and roachccl roachccl depends on roach internally, so specifying them both from the top-level Makefile is redundant. Also introduce `libs` target for testing. Release note: None --- Makefile | 10 +++++++--- build/variables.mk | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3171a86bbe6d..9ecbf8ad67a4 100644 --- a/Makefile +++ b/Makefile @@ -471,8 +471,9 @@ LIBROACH_DIR := $(BUILD_DIR)/libroach PROTOC_DIR := $(GOPATH)/native/$(HOST_TRIPLE)/protobuf PROTOC := $(PROTOC_DIR)/protoc -C_LIBS_OSS = $(if $(USE_STDMALLOC),,libjemalloc) libprotobuf libsnappy librocksdb libroach -C_LIBS_CCL = $(C_LIBS_OSS) libcryptopp libroachccl +C_LIBS_COMMON = $(if $(USE_STDMALLOC),,libjemalloc) libprotobuf libsnappy librocksdb +C_LIBS_OSS = $(C_LIBS_COMMON) libroach +C_LIBS_CCL = $(C_LIBS_COMMON) libcryptopp libroachccl # Go does not permit dashes in build tags. This is undocumented. Fun! NATIVE_SPECIFIER_TAG := $(subst -,_,$(NATIVE_SPECIFIER))$(STDMALLOC_SUFFIX) @@ -636,7 +637,7 @@ libroach: $(LIBROACH_DIR)/Makefile $(CPP_PROTOS_TARGET) @$(MAKE) --no-print-directory -C $(LIBROACH_DIR) roach .PHONY: libroachccl -libroachccl: $(LIBROACH_DIR)/Makefile $(CPP_PROTOS_CCL_TARGET) libroach +libroachccl: $(LIBROACH_DIR)/Makefile $(CPP_PROTOS_CCL_TARGET) @$(MAKE) --no-print-directory -C $(LIBROACH_DIR) roachccl PHONY: check-libroach @@ -677,6 +678,9 @@ CPP_PROTOS_CCL_TARGET := $(LOCAL_BIN)/.cpp_ccl_protobuf_sources .DEFAULT_GOAL := all all: $(COCKROACH) +.PHONY: c-deps +c-deps: $(C_LIBS_CCL) + buildoss: BUILDTARGET = ./pkg/cmd/cockroach-oss buildoss: $(C_LIBS_OSS) $(UI_ROOT)/distoss/bindata.go diff --git a/build/variables.mk b/build/variables.mk index 17c6b16d5ce1..b72980e8bb43 100644 --- a/build/variables.mk +++ b/build/variables.mk @@ -41,6 +41,7 @@ define VALID_VARS CXX_PATH C_DEPS_DIR C_LIBS_CCL + C_LIBS_COMMON C_LIBS_OSS DUPLFLAGS ENABLE_ROCKSDB_ASSERTIONS