See the image, I wanted to create folders in Makefile for c project under Windows 10. At the last line, I accidentally added "#", and it works. However, it does not work without the "#" at the last line.
That line is as follows:
mkdir -p $@
or
mkdir -p $@ #
- Why does it not work without "#"?
- How to write it correctly under windows 10?
Edit: Error Message in short error message is the system cannot find the given files ( it is a translattion )
making dirs....
build/
mkdir -p build/
Makefile:293: recipe for target 'build/' failed
process_begin: CreateProcess(NULL, mkdir -p build/, ...) failed.
make (e=2): Das System kann die angegebene Datei nicht finden.
make: *** [build/] Error 2
Edit: I add the code in text as follows
#Create non existing dirs
OBJDIRS = $(sort $(dir $(OBJS))) #sort removes duplicate dirs...
$(OBJDIRS):
@echo
@echo "making dirs...."
@echo $@
mkdir -p $@ #ok