From: Nathael Pajani Date: Wed, 19 Apr 2017 00:55:03 +0000 (+0200) Subject: Add a test in apps makefiles to get proper function of :make in vim when the user... X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=ecc51bc239d3fa763424583f1316b197fa6f217d;p=soft%2Fperso%2Fcpe Add a test in apps makefiles to get proper function of :make in vim when the user has added "let $COMPILE_FROM_IDE = 1" to his ~/.vimrc --- diff --git a/cape_rccar/Makefile b/cape_rccar/Makefile index da530ea..41ae555 100644 --- a/cape_rccar/Makefile +++ b/cape_rccar/Makefile @@ -1,13 +1,21 @@ -# Makefile for "rf_sub1G" apps -# This includes all apps for the RF-sub1GHz Modules. +# Makefile for apps MODULE = $(shell basename $(shell cd .. && pwd && cd -)) NAME = $(shell basename $(CURDIR)) +# Add this to your ~/.vimrc in order to get proper function of :make in vim : +# let $COMPILE_FROM_IDE = 1 +ifeq ($(strip $(COMPILE_FROM_IDE)),) + PRINT_DIRECTORY = --no-print-directory +else + PRINT_DIRECTORY = + LANG = C +endif + .PHONY: $(NAME).bin $(NAME).bin: - @make -C ../../.. --no-print-directory NAME=$(NAME) MODULE=$(MODULE) apps/$(MODULE)/$(NAME)/$@ + @make -C ../../.. ${PRINT_DIRECTORY} NAME=$(NAME) MODULE=$(MODULE) apps/$(MODULE)/$(NAME)/$@ clean mrproper: - @make -C ../../.. --no-print-directory $@ + @make -C ../../.. ${PRINT_DIRECTORY} $@