3 Star 19 Fork 2

AI-IoTDB/openGemini

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile.common 3.92 KB
一键复制 编辑 原始数据 按行查看 历史
# Copyright 2022 Huawei Cloud Computing Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
export GOROOT=$(shell go env GOROOT)
export GOPATH=$(shell go env GOPATH)
export GOOS=$(shell go env GOOS)
export GOARCH=$(shell go env GOARCH)
export PATH := $(PATH):$(GOROOT)/bin:$(GOPATH)/bin
GO := GO111MODULE=on go
GOTEST := $(GO) test
PYTHON := python
STATICCHECK := staticcheck
FAILPOINT_ENABLE := find $$PWD/ -type d | grep -vE "(\.git|\.github|\.tests)" | xargs failpoint-ctl enable
FAILPOINT_DISABLE := find $$PWD/ -type d | grep -vE "(\.git|\.github|\.tests)" | xargs failpoint-ctl disable
PACKAGE_LIST_OPEN_GEMINI_TESTS := $(GO) list ./... | grep -vE "tests|lifted\/hashicorp"
PACKAGES_OPEN_GEMINI_TESTS ?= $$($(PACKAGE_LIST_OPEN_GEMINI_TESTS))
COPYRIGHT_EXCEPT := "lifted|tests|lib/netstorage/data/data.pb.go|lib/statisticsPusher/statistics/handler_statistics.go|app/ts-meta/meta/snapshot.go|engine/index/tsi/tag_filters.go|engine/index/tsi/tag_filter_test.go|engine/index/mergeindex/item.go|lib/config/openGemini_dir.go"
COPYRIGHT_GOFILE := $$(find . -name '*.go' | grep -vE $(COPYRIGHT_EXCEPT))
COPYRIGHT_HEADER := "Copyright 2022|2023|2024 Huawei Cloud Computing Technologies Co., Ltd."
STYLE_CHECK_EXCEPT := "lifted/hashicorp|lifted/protobuf"
STYLE_CHECK_GOFILE := $$(find . -name '*.go' | grep -vE $(STYLE_CHECK_EXCEPT))
PROTOC_ZIP_LINUX=protoc-3.14.0-linux-x86_64.zip
PROTOC_ZIP_MACOS=protoc-3.14.0-osx-x86_64.zip
PROTOC_ZIP_WINDOWS=protoc-3.14.0-win64.zip
install-goimports-reviser:
@$(GO) install github.com/incu6us/goimports-reviser/v3@v3.3.1
install-staticcheck:
@$(GO) install honnef.co/go/tools/cmd/staticcheck@v0.4.3
install-golangci-lint:
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$($(GO) env GOPATH)/bin v1.53.3
install-failpoint:
@$(GO) install github.com/pingcap/failpoint/failpoint-ctl
install-tmpl:
@$(GO) install github.com/benbjohnson/tmpl@v1.1.0
install-goyacc:
@$(GO) install golang.org/x/tools/cmd/goyacc@v0.13.0
install-protoc:
@VERSION=$$(protoc --version); if [ "$$VERSION" = "libprotoc 3.14.0" ]; then exit 0; fi; \
if [ $$(uname -s) = "Linux" ]; then \
make install-protoc-linux; \
elif [ $$(uname -s) = "Darwin" ]; then \
make install-protoc-darwin; \
else \
echo "unknown arch"; \
fi
install-protoc-linux:
@curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/$(PROTOC_ZIP_LINUX)
@sudo unzip -o $(PROTOC_ZIP_LINUX) -d /usr/local bin/protoc
@sudo unzip -o $(PROTOC_ZIP_LINUX) -d /usr/local 'include/*'
@sudo chmod +x /usr/local/bin/protoc
@rm -f $(PROTOC_ZIP_LINUX)
install-protoc-darwin:
@curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/$(PROTOC_ZIP_MACOS)
@sudo unzip -X -o $(PROTOC_ZIP_MACOS) -d /usr/local bin/protoc
@sudo unzip -o $(PROTOC_ZIP_MACOS) -d /usr/local 'include/*'
@sudo chmod +x /usr/local/bin/protoc
@rm -f $(PROTOC_ZIP_MACOS)
install-protoc-windows:
@curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/$(PROTOC_ZIP_WINDOWS)
@powershell.exe Expand-Archive -Path protoc-3.14.0-win64.zip -DestinationPath $(GOPATH)\protobuf -Force
@del $(PROTOC_ZIP_WINDOWS)
install-protoc-gen-gogo:
@$(GO) install github.com/gogo/protobuf/protoc-gen-gogo@latest
install-protoc-gen-go:
@$(GO) install github.com/golang/protobuf/protoc-gen-go@latest
failpoint-enable:
@$(FAILPOINT_ENABLE)
failpoint-disable:
@$(FAILPOINT_DISABLE)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ai-iotdb/openGemini.git
git@gitee.com:ai-iotdb/openGemini.git
ai-iotdb
openGemini
openGemini
main

搜索帮助