[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Partial generation of recipe and dependencies
From: |
Philip Guenther |
Subject: |
Re: Partial generation of recipe and dependencies |
Date: |
Wed, 20 Jun 2012 23:08:44 -0700 |
On Wed, Jun 20, 2012 at 3:20 PM, Andre Majorel <address@hidden> wrote:
> On 2012-06-19 19:30 +0200, Andre Majorel wrote:
>> define tgt
>> .PHONY: $(1)
>> $(1): destdir-unsafe
>> endef
>>
>> $(eval $(call tgt, target1))
>> do something
>>
>> $(eval $(call tgt, target2))
>> do something else
>>
>> Unfortunately, the splicing of the two lines coming from $(tgt)
>> and the "do something" line does not take place and Make bombs
>> with
>>
>> Makefile:#: *** commands commence before first target. Stop.
>>
>> on the "do something" line. Any way to make it work ? Thanks in
>> advance.
>
> No answers because it's a FAQ or because it's a tough one ?
Or because some of us have paying day jobs. I've other things to do,
so I'll leave it to *you* to figure out why this works:
-----
define tgt
$(eval .PHONY: $(value 1)
$(value 1): destdir-unsafe)$(1):
endef
$(call tgt, target1)
@echo something
$(call tgt, target2)
@echo something2
-----
Philip Guenther