tools/pic32: Make the post build process depend on INTELHEX_BINARY, as

it converts a hex file.
Build the tool if it didn't exist.
This commit is contained in:
Ouss4 2020-03-07 15:48:25 +00:00 committed by patacongo
parent 0d02168d28
commit 9be72e0706

View File

@ -24,17 +24,17 @@
# POSTBUILD -- Perform post build operations
ifeq ($(CONFIG_INTELHEX_BINARY),y)
define POSTBUILD
$(Q)echo "Converting the hex file";
$(Q) if [ ! -f "tools/pic32/mkpichex" ] ; then \
echo "mkpichex tool doesn't exist"; \
echo "Please run the following command to build the tool"; \
echo "make -C tools$(DELIM)pic32 -f Makefile.host"; \
echo "then run make again."; \
else \
tools$(DELIM)pic32$(DELIM)mkpichex$(HOSTEXEEXT) $(PWD); \
([ $$? -eq 0 ] && echo "Done."); \
$(MAKE) -C $(TOPDIR)$(DELIM)tools$(DELIM)pic32 -f Makefile.host; \
fi
tools$(DELIM)pic32$(DELIM)mkpichex$(HOSTEXEEXT) $(PWD)
$(Q)([ $$? -eq 0 ] && echo "Done.")
endef
endif