I am new to makefile. I have a makefile with following statement:
....
all: prepare hreader $(DIRS)
echo $(DIRS)
.PHONY: prepare hreader $(DIRS)
prepare:
mkdir -p ./lib
$(MAKE) -C game_proc prepare #here, why 'prepare'?!
hreader:
make -C extra/hreader
$(DIRS):
$(MAKE) -C $@
In my makefile directory, i have a 'game_proc' directory. And from GNU make tutorial, i know that below lines
prepare:
mkdir -p ./lib
$(MAKE) -C game_proc
will do a recursive make on 'game_proc'.
But why 'prepare' also appear in the recipe? Now how do i interpret '$(MAKE) -C game_proc prepare'? It does a recursive make on 'game_proc', and what? also a recursive make on 'prepare'?
Thanks,