Skip Menu |

This queue is for tickets about the Slay-Makefile CPAN distribution.

Report information
The Basics
Id: 29370
Status: resolved
Priority: 0/
Queue: Slay-Makefile

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.06
Fixed in: (no value)



Subject: Setting variables from command line
It would be nice to have the ability to set variables from command line, like in normal make programs. BSD make and GNU make use the syntax make ... VARIABLE=VALUE ... In slaymake, this could set the value of a global variable $VARIABLE in the perl process. However, the semantical behaviour would probably be different between classic make and slaymake: setting variables on the command line in classic makes would overwrite a setting of the same variable, while the slaymake programmer has to write $VARIABLE = "Default value" unless defined $VARIABLE; for this behaviour. Regards, Slaven
Subject: Re: [rt.cpan.org #29370] Setting variables from command line
Date: Fri, 14 Sep 2007 11:29:38 -0500
To: bug-Slay-Makefile [...] rt.cpan.org
From: Mark Nodine <nodine [...] intrinsity.com>
What would you think if, instead of using the make syntax make ... VARIABLE=VALUE ... we went more with a perl syntax slaymake ... -e '$VARIBLE="value";' -e '@ARRAY=qw(a b c)' That way you could run any code you needed to or set any kind of variable. --Mark
CC: SREZIC [...] cpan.org
Subject: Re: [rt.cpan.org #29370] Setting variables from command line
Date: 15 Sep 2007 00:29:31 +0200
To: bug-Slay-Makefile [...] rt.cpan.org
From: Slaven Rezic <slaven [...] rezic.de>
"nodine@intrinsity.com via RT" <bug-Slay-Makefile@rt.cpan.org> writes: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=29370 > > > What would you think if, instead of using the make syntax > > make ... VARIABLE=VALUE ... > > we went more with a perl syntax > > slaymake ... -e '$VARIBLE="value";' -e '@ARRAY=qw(a b c)' > > That way you could run any code you needed to or set any kind > of variable. >
Maybe we can have both? The make syntax which requires less to type and the -e switch to have more complex initialisation? For setting complex variables the make variable setting syntax could be extended by a dot or xpath-like notation: make HASH.KEY1=VAL1 HASH.KEY2=VAL2 target or make HASH/KEY1=VAL1 HASH/KEY2=VAL2 target make "ARRAY[0]=VAL1" "ARRAY[1]=VAL2" target Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de tktimex - time recording tool http://sourceforge.net/projects/ptktools/
Thanks for implementing the feature! Regards, Slaven