From 9be72e070697189ac38885de39dfb329951f2d6b Mon Sep 17 00:00:00 2001 From: Ouss4 Date: Sat, 7 Mar 2020 15:48:25 +0000 Subject: [PATCH] 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. --- tools/pic32/Config.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/pic32/Config.mk b/tools/pic32/Config.mk index 2f1786c333f..a16519b7ab5 100644 --- a/tools/pic32/Config.mk +++ b/tools/pic32/Config.mk @@ -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