bugmake - Bugs: bug #7167, For more then one pattern target,...

 
 

bug #7167: For more then one pattern target, only the first one is made.

Submitted by:  Alon Blayer-Gat <alonbg>
Submitted on:  Sun 11 Jan 2004 07:41:43 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.80Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 18 Jan 2004 04:58:46 PM UTC, comment #1:

This is not a bug. Rules with multiple patterns on the left-hand side do not behave the same as explicit rules with multiple targets on the left-hand side.

Please see the GNU make manual section "Introduction to Pattern Rules".

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Sun 11 Jan 2004 07:41:43 AM UTC, original submission:

# Here I will deligate the target %.cpptest to all sub directories
# example: 'make all.cpptest'

LIBS = billing db kern

MAKE_ALL_CPPTEST = $(addsuffix /test/%.cpptest,$(LIBS))

.PHONY: %.cpptest $(MAKE_ALL_CPPTEST)

%.cpptest: $(MAKE_ALL_CPPTEST) ;

# This rule does not work ( only the first target (billing) is made)
$(MAKE_ALL_CPPTEST):
if [ -f $(@D)/Makefile ]; then \
$(MAKE) -C $(@D) $(@F); \
fi

#This is the workaround, define each target separately, using eval.

define cpptest_template
$(1)/test/%.cpptest:
if [ -f $$(@D)/Makefile ]; then \
$(MAKE) -C $$(@D) $$(@F); \
fi
endef

$(foreach lib,$(LIBS),$(eval $(call cpptest_template,$(lib))))

Alon Blayer-Gat <alonbg>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 18 Jan 2004 04:58:46 PM UTCpsmithStatusNone=>Not A Bug
  Assigned toNone=>psmith
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1