[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a for-loop-like function
From: |
Chien-Lung Wu |
Subject: |
a for-loop-like function |
Date: |
Wed, 10 Sep 2003 15:35:06 -0400 |
Hi,
I have a question about writing Makefile. Could any one help me.
Question:
As I do my project using gnu make, I have sub_directories and I
would like the files/directories under these subdirectories been compiled.
Therefore I create a makefile as follows:
SUB_DIRS = src vlan ip lib # (I have 4 subdirs-- src, vlan, ip,
and lib)
all:
for subdir in $(SUBDIRS) ; do \
make -C $subdir; \
done;
So that I can "make -C" to each sub-directory and get them compiled.
However, Make utility seems can not support this kind of for-loop.
Are there any way in make utility to get this for-loop done?
David
- a for-loop-like function,
Chien-Lung Wu <=