Martin d Anjou wrote:
_ARCH := 2801 28015
OBJDIR := $(_ARCH:%=_%)
$(OBJDIR):
[EMAIL PROTECTED] -d $@ ] || mkdir -p $@
[EMAIL PROTECTED](MAKETARGET)
The rule runs only once. If you want to build two targets, this is not
the way to do it. Try this instead (I have grossly simpified it):
_ARCH := 2801 28015
OBJDIR := $(_ARCH:%=_%)
_%:
echo Hi
all: $(OBJDIR)
Martin
Thanks for the feedback. Unfortunately I wasn't able to make your
suggestion work. However I did manage to come up with a solution once
I saw this line in the manual: "If the first rule has multiple
targets, only the first target is taken as the default." Obviously
this is why I was only getting one arch build when I invoked make
without an explicit goal. By simply adding an 'all' target ahead of
the $(OBJDIR) target, I get the desired behavior. The relevant
section now looks like this:
.PHONY: all
all: $(OBJDIR)
.PHONY: $(OBJDIR)
$(OBJDIR):
[EMAIL PROTECTED] -d $@ ] || mkdir -p $@
[EMAIL PROTECTED](MAKETARGET)
Makefile : ;
%.mk :: ;
% :: $(OBJDIR) ; :
Thanks again for your help.
galen
--
Galen Seitz
[EMAIL PROTECTED]
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make