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 name myfaketarget
. 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 the all
target then you want to list it next to makefile_project_test1.out
on the all: 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 run make myfaketarget
yourself (possibly as $(MAKE) myfaketarget
depending on make version).