I haven't been able to undertand Makefile 'error', 'warning' and 'info' commands used for displaying output. I have got them working in some cases though. Here is the current problem I am stuck with.
Code:
$(LCD_LIB) : $(RAMTEX_OBJS)
$(CSTOOL_PREFIX)ar cr $(RAMTEX_BIN_DIR)/$(LCD_LIB) $^
$(info copying the library to $(abspath $(COMMON_LIB_DIR)))
sudo cp --preserve $(RAMTEX_BIN_DIR)/$(LCD_LIB) $(COMMON_LIB_DIR)/
I don't know why doesn't it print the output the way I expect. Here I want to display the string "copying the ..." after bulding the static library. However, it prints the display string first and then builds library as shown below.
copying the library to /home/asabat/manhattan/simple_ui_project/lib
arm-none-linux-gnueabi-ar cr ./bin/libramtex.a obj/gcarc.o obj/gchlnsp.o ...
sudo cp --preserve ./bin/libramtex.a ../lib/
If I modify the Makefile to use echo instead of info, that works fine as given below.
Code:
$(LCD_LIB) : $(RAMTEX_OBJS)
$(CSTOOL_PREFIX)ar cr $(RAMTEX_BIN_DIR)/$(LCD_LIB) $^
@echo -e "copying the library to $(abspath $(COMMON_LIB_DIR))"
sudo cp --preserve $(RAMTEX_BIN_DIR)/$(LCD_LIB) $(COMMON_LIB_DIR)/
arm-none-linux-gnueabi-ar cr ./bin/libramtex.a obj/gcarc.o obj/gchlnsp.o ...
copying the library to /home/asabat/manhattan/simple_ui_project/lib
sudo cp --preserve ./bin/libramtex.a ../lib/
I have seen these issues even while using the other commands 'warning' and 'error'. I will appreciate any help in understanding my mistake here.