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 files contain it. Something like "grep -r clean.*:"
You may have to move a dir or two up the path.
You may wish to try changing the syntax of your target to use the colon
syntax of the other. E.g. :: -- : or vice versa. Make allows multiple
instances of a target in some circumstances.
Another way to get around this is to add the target as another name and
perform what you need to do. E.g. instead of clean use myclean:
Please get back with your results.
Bill
On 12/30/2023 4:25 PM, yfliu2008 wrote:
Bill,
Thanks for the information.
So far I have been using make command at the $(TOPDIR) and the contents in the board source folder
(i.e. "boards/<arch>/<name>/src/ ") are also built. So my question was really
about how to manage the make of board source folder files.
For example, I tried to add a "clean:" target in the Makefile at board source
folder, but got errors like:
yf@r7:uttx/nuttx$ make cleanMakefile:35: *** target file 'clean' has both : and ::
entries. Stop.
make[1]: *** [Makefile:230: clean] Error 2
make: *** [tools/Unix.mk:757: arch/risc-v/src_clean] Error 2
I still lack understanding for the overall Makefile design, so pointers to it
are highly welcomed.
Regards,
yf
Original
From:"Bill Rees"< redskyo...@icloud.com.INVALID >;
Date:2023/12/17 16:32
To:"dev"< dev@nuttx.apache.org >;
Subject:Re: Makefile vs Make.defs
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
>
>
> boards/risc-v/qemu-rv/rv-virt/src/Makefile
> boards/risc-v/mpfs/icicle/src/Make.defs
>
> boards/risc-v/esp32c6/esp32c6-devkit/src/Make.defs
>
> I am wondering what are the differences?
>
>
>
> Regards,
> yf