Improve makefile targets

This commit is contained in:
John Zhao 2018-11-18 22:17:54 +08:00
parent ae8cc4cae2
commit 5e8bc7c05b

View File

@ -24,7 +24,7 @@ MKFILE_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
SUDO ?= sudo SUDO ?= sudo
.DEFAULT_GOAL := help .DEFAULT_GOAL := all
help: help:
@echo "Usage:" @echo "Usage:"
@ -44,7 +44,7 @@ help:
.PHONY: help .PHONY: help
all: test samples tools all: samples tools ros
.PHONY: all .PHONY: all
@ -78,7 +78,7 @@ submodules:
# init # init
init: submodules init:
@$(call echo,Make $@) @$(call echo,Make $@)
@$(SH) ./scripts/init.sh $(INIT_OPTIONS) @$(SH) ./scripts/init.sh $(INIT_OPTIONS)
@ -86,7 +86,7 @@ init: submodules
# build # build
build: submodules build: init
@$(call echo,Make $@) @$(call echo,Make $@)
ifeq ($(HOST_OS),Win) ifeq ($(HOST_OS),Win)
@$(call cmake_build,./_build,..,-DCMAKE_INSTALL_PREFIX=$(MKFILE_DIR)/_install) @$(call cmake_build,./_build,..,-DCMAKE_INSTALL_PREFIX=$(MKFILE_DIR)/_install)
@ -98,7 +98,7 @@ endif
# test # test
test: install test: submodules install
@$(call echo,Make $@) @$(call echo,Make $@)
@$(call echo,Make gtest,33) @$(call echo,Make gtest,33)
ifeq ($(HOST_OS),Win) ifeq ($(HOST_OS),Win)