[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Making multiple action lines from a varaible
From: |
EXT-Pennington, Dale K |
Subject: |
Making multiple action lines from a varaible |
Date: |
Wed, 1 Aug 2007 12:29:13 -0500 |
Folks,
My existing make environment has multiple .mak files for different
chunks of my library in one Scripts directory, and a master build shell
script that looks like :
gmake -f a.mak %1
gmake -f b.mak %1
gmake -f c.mak %1
I would much perfer to have a master make makefile so that, among other
things, when one fails we stop and can fix it before heading to the
others. Now I could obviously do a brute force approach :
all :
gmake -f a.mak all
gmake -f b.mak all
gmake -f c.mak all
clean :
gmake -f a.mak clean
gmake -f b.mak clean
gmake -f c.mak clean
But I would much perfer to not have to do that. So far I have the
following approach
MAKFILES = a.mak b.mak c.mak
all :
$(foreach make,$(MAKFILES),gmake -f $(make) all;)
clean :
$(foreach make,$(MAKFILES),gmake -f $(make) clean;)
This generates the desired result, almost. The problem is that since all
the makes are done on 1 line, they are all submitted as one shell
action, and all are attempted before a possible failure return. (I
tested this by deliberately putting a command line option error to make
gmake fail).
So the question is :
Is there a way to use the spare format of the second example to produce
equivalent results of the first example ?
Of course the example above is a bit more trivial than our actual make
environment.
Thanks
Dale Pennington
- Making multiple action lines from a varaible,
EXT-Pennington, Dale K <=