[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pass parent stem value to prerequisite rule
From: |
Martin d'Anjou |
Subject: |
pass parent stem value to prerequisite rule |
Date: |
Thu, 28 Jul 2011 09:50:35 -0400 |
Hi,
I can't figure out how to pass the parent stem value to a prerequisite rule:
.SECONDEXPANSION:
rule_%: test=foo
rule_%: parent_stem=$*
rule_%: child_b
@echo in parent: parent_stem=$(parent_stem)
child_%:
@echo in child: stem=$*
@echo in child: test=$(test)
@echo 'in child: parent_stem=$(parent_stem) --> this should be "a", not "b"'
all: rule_a
@echo done
$ make
in child: stem=b
in child: test=foo
in child: parent_stem=b --> this should be "a", not "b"
in parent: parent_stem=a
done
The parent stem value is noticeably empty. I tried different
variations, with and without .SECONDEXPANSION:, but no success. Can
this be done?
Thanks,
Martin
- pass parent stem value to prerequisite rule,
Martin d'Anjou <=