I have a directory (root_dir
), that contains a number of sub-directories (subdir1, subdir2, ...
).
I want to run the make
in each directory in root_dir
, using a Makefile placed in it.
(Obviously supposed that each of subdir...
has inside its own Makefile).
So there are essentially two questions:
- How to get a list of directories in Makefile (automatically)?
- How to run
make
for each of the directories inside a make file?
As I know in order to run make
in a specific directory I need to do the following:
$(MAKE) -C subdir
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…