I mention avoiding targets because most developers don't notice, as I
didn't, that the upper level makefile is included at the end so any
targets should follow that inclusion. Given how little many devs no
about Makefiles that little tidbit becomes difficult to debug.
Specifically any tar
Well I screwed up on this. The makefile actually runs before including
Board.mk which contains the real targets so the default target becomes
the one in the src/Makefile.
Fundamentally this Makefile should not contain any targets.
On 12/31/2023 6:46 PM, Bill Rees wrote:
Out of curios
Out of curiosity I followed your example and added a clean:: to a
src/Makefile. The target fired.
:: git diff
diff --git a/boards/arm/efm32/efm32-g8xx-stk/src/Makefile
b/boards/arm/efm32/efm32-g8xx-stk/src/Makefile
index dc8938..79998ed009 100644
--- a/boards/arm/efm32/efm32-g8xx-st
The command to your rule, clean:: does not need a shell process
wrapper.
You don't need the $() to execute shell commands in the recipe
since make does that for you.
Change the echo to simply: echo "board level clean" >&2
The '>&2' directs the output of echo to the stderr
You're welcome.
The error message is pointing out that you have two targets for clean.
One is clean: and the other is clean::
You may be getting a clean target from an included makefile such as a
Make.def which may be in a directory up the path. Try issuing a grep for
clean: to see what fi
Running make where Makefile exists runs that Makefile.
Running make where you have a Make.defs won't do anything.
On 12/16/2023 8:55 PM, yfliu2008 wrote:
Hi,
It seems that some board source folder uses Makefile and some uses Make.defs:
boards/risc-v/hpm6750/hpm6750evk2/src/Makefile