Browse Source

fix: makefile in windows goos (#109)

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
tags/v0.1.2
Xinwei Xiong GitHub 3 years ago
parent
commit
4d0beaba2a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 4 deletions
  1. +13
    -4
      Makefile

+ 13
- 4
Makefile View File

@@ -140,16 +140,25 @@ ifeq ($(origin GOBIN), undefined)
GOBIN := $(GOPATH)/bin
endif

COMMANDS ?= $(filter-out %.md, $(wildcard ${ROOT_DIR}/server/cmd/*))
BINS ?= $(foreach cmd,${COMMANDS},$(notdir ${cmd}))
ifeq ($(OS),Windows_NT)
NULL :=
SPACE := $(NULL) $(NULL)
ROOT_DIR := $(subst $(SPACE),\$(SPACE),$(shell cd))
else
ROOT_DIR := $(shell pwd)
endif

ifeq (${COMMANDS},)
COMMANDS := $(filter-out %.md, $(wildcard $(ROOT_DIR)/server/cmd/*))
BINS := $(notdir $(COMMANDS))

ifeq ($(strip $(COMMANDS)),)
$(error Could not determine COMMANDS, set ROOT_DIR or run in source dir)
endif
ifeq (${BINS},)
ifeq ($(strip $(BINS)),)
$(error Could not determine BINS, set ROOT_DIR or run in source dir)
endif


EXCLUDE_TESTS=github.com/OpenIMSDK/OpenKF/test

# ==============================================================================


Loading…
Cancel
Save