help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

2 rules for one target


From: Alexander.Farber
Subject: 2 rules for one target
Date: Wed, 15 Dec 2004 13:13:33 +0100

Hi,

sorry for another probably basic question, but for the following 3 rules:

$(INFILE): $(OBJS) $(CXXOBJS) $(CIAOBJS)
        $(AR) $(ARFLAGS) $^ -o $@

# These files are located in $(OBJDIR), which should be created first
$(OBJS) $(CXXOBJS) $(CIAPRES) $(CIAGENS) $(CIAOBJS) $(INFILE): $(OBJDIR)/.stamp

$(OBJDIR)/.stamp:
        mkdir -p $(dir $@) && touch $@

Why does it stop working when the list of prerequisites (the objects) in the 
top 
rule is empty? For some strange reason I get $(OBJDIR)/.stamp in the $^ 
variable:

boclu25:hal {113} gmake -f src/hal_lib.mmp.ARMV5.mbs

armlink -diag_suppress 6331 -partial 
/projects/scratch_r0923/afarber/thunder/epoc32/build/src/cedar/generic/base/hal/hal_lib/ARMV5/UREL/.stamp
 -o 
/projects/scratch_r0923/afarber/thunder/epoc32/build/src/cedar/generic/base/hal/hal_lib/ARMV5/UREL/hal.in

Fatal error: L6007U: Could not recognize the format of file 
/projects/scratch_r0923/afarber/thunder/epoc32/build/src/cedar/generic/base/hal/hal_lib/ARMV5/UREL/.stamp.

Why does the prerequisite of the 2nd rule land in the $^ of the 1st rule?

Thank you
Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]