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
@myfaketargetline 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
myfaketargettarget to be run as a prerequisite of thealltarget then you want to list it next tomakefile_project_test1.outon theall: makefile_project_test1.outline.If you want that target to be run after the rest of that
allbody is run (i.e. where that@myfaketargetline is) then you need to manually runmake myfaketargetyourself (possibly as$(MAKE) myfaketargetdepending on make version).