I am new to makefiles, so please bear with me. I tried to edit an automatically generated makefile in Code Composer Studios, but I'm 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 prints out.
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 to get this to compile cleanly? Thanks
The
@myfaketarget
line is a command line. You are telling make to run a system command with the namemyfaketarget
. That isn't a binary/application/etc. though so the system (Windows) cannot do that.If you want the
myfaketarget
target to be run as a prerequisite of theall
target then you want to list it next tomakefile_project_test1.out
on theall: makefile_project_test1.out
line.If you want that target to be run after the rest of that
all
body is run (i.e. where that@myfaketarget
line is) then you need to manually runmake myfaketarget
yourself (possibly as$(MAKE) myfaketarget
depending on make version).