Hi,
I will explain the context.
I have a build system which has inter-dependencies between modules.
So for building a module i hope to write a single function which uses a
single argument,namely, the module name:
define build_module
MODULE_NAME=$(1); \
$(do_some_sanity_checks); \
echo building module $$MODULE_NAME; \
for dep in `extract_dependencies_of_the_module`;do \
$(call build_module,$$dep); \
done; \
$(do_build)
endef
My hope being, the module which has no dependencies builds first and so
on..But it does not achieve what is intended.
Any hints are greatly appreciated.
regards
kalyan
On Tue, Nov 25, 2008 at 4:25 PM, Boris Godin <[EMAIL PROTECTED]>wrote:
> The make tries to expand the function (which in this case is infinite),
> that's why you can't see any output.
> But... what are you trying to do? You should be more specific.
>
> kalyan wrote:
>
> Hi
> I would assume it goes to infinite loop. But what happens to "echo $(1)" .
> I get nothing on the console :(
>
> regards
> kalyan
>
>
> On Tue, Nov 25, 2008 at 2:18 PM, Philip Guenther <[EMAIL PROTECTED]>wrote:
>
>> On Tue, Nov 25, 2008 at 12:43 AM, kalyan <[EMAIL PROTECTED]>
>> wrote:
>> > I am using make-3.81.
>> > The GNU make manual says "The call function can be nested. Each
>> recursive
>> > invocation gets its own local values for $(1), etc. that mask the values
>> of
>> > higher-level call."
>> >
>> > I have tried this code but it gets stuck forever:
>> > -----------
>> > define test_function
>> > echo $(1)
>> > $(call test_function,1)
>> > endef
>> > all:
>> > @$(call test_function,1)
>> > ------------
>>
>> Yep, that's the correct behavior. Apparently that's not what you
>> expected from the text. It would be easier to correct your
>> understanding if you were to explain how you thought that snippet
>> would behave.
>>
>>
>> Philip Guenther
>>
>
> ------------------------------
>
> _______________________________________________
> Help-make mailing [EMAIL PROTECTED]://lists.gnu.org/mailman/listinfo/help-make
>
>
>
> --
> Boris Godin
> *Java Developer* - Gameloft COR
> Paraná 560, Nueva Córdoba (CP 5000)
> Tel.: (+54 0351) 460 26 26 int. 111
> MSN: [EMAIL PROTECTED]
>
> _______________________________________________
> Help-make mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/help-make
>
>
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make