C makefile, in CCS, "The system cannot find the file specified"
I am new to makefiles so please bear with me. I tried to edit the auto-generated makefile in Code Composer Studios, but I am getting an error. Here is an excerpt from the makefile
# All Target
all: makefile_project_test1.out
@echo ''
@echo '============================'
@echo 'APPLICATION BUILD SUCCESSFUL'
@echo '============================'
@echo ''
@myfaketarget
# Other Targets
.PHONY: myfaketarget
myfaketarget:
echo "TEST MY FAKE TARGET"
And here is the error message that gets printed.
process_begin: CreateProcess(NULL, myfaketarget, ...) failed.
make (e=2): The system cannot find the file specified.
gmake: *** [all] Error 2
Can anyone shed some light on this and help me get this in order to compile it? Thanks to
source to share
The string @myfaketarget
is the command line. You are telling make to run a system command named myfaketarget
. It is not a binary / application / etc. although the system (Windows) cannot do this.
If you want the target to myfaketarget
run as a precondition for the target all
, then you want to list it next to makefile_project_test1.out
in line all: makefile_project_test1.out
.
If you want this target to run after the rest of this body has all
been run (i.e. where is that line @myfaketarget
), you have to manually run it make myfaketarget
yourself (perhaps as $(MAKE) myfaketarget
depending on make version).
source to share