[webkit-reviews] build script changes for review
Maciej Stachowiak
mjs at apple.com
Sun Jun 12 16:11:43 PDT 2005
On Jun 12, 2005, at 3:23 PM, Darin Adler wrote:
> On Jun 12, 2005, at 2:28 AM, Maciej Stachowiak wrote:
>
>
>>> -my $lib = "${productDir}/libWebKitSystemInterface.a";
>>> +my $lib = "$productDir/libWebKitSystemInterface.a";
>>>
>>
>> It's generally considered better perl style to have braces around
>> a variable expansion in quotes, not sure why you took them out
>> here and elsewhere.
>>
>
> I took them out because I prefer to use the same syntax for the
> variables inside quotes and outside. Makes it easier when doing
> searches for uses of a variable and global replacement.
>
> I think you are overstating the case about "generally considered
> better style". It's true that with the braces you can immediately
> follow a variable expansion with an alphanumeric chracter, but
All I mean is that my perl books tell me to do it. I see your point
about global replacement, though of course that would stop working if
$productDir was ever followed immediately by an alphanumeric
character. One way of writing this that always works is $productDir .
"/libWebKitSystemInterface.a", though of course that is a couple more
characters to type.
>>> - system "mkdir", "-p", "${productDir}/usr/local/include";
>>> + system "mkdir", "-p", "$productDir/usr/local/include";
>>>
>>>
>>
>> This doesn't have much to do with your change but I would totally
>> write this kind of thing as `mkdir -p "$productDir/usr/local/
>> include"`.
>>
>
> We can discuss this another time. I think the "system with a list"
> approach handles quoting better, but that might be incorrect.
I don't know what you mean by "better". I don't know of any relevant
difference. I'm pretty sure what I wrote will get the same result as
what you wrote in all cases, even if $productDir contains a space.
What happens here is that perl does its own variable substitution in
backticks (treating them as a type of quote) but passes any nested
double-quote characters through to the shell, which is precisely the
desired behavior.
>> Style nitpitchs notwithstanding, r=me on the substantive changes
>> (assuming you tested reasonably).
>>
>
> I really like Stuart Morgan's technique of using FindDir, so I'm
> going to integrate that before landing the patch.
>
Sounds fine to me.
Regards,
Maciej
More information about the webkit-reviews
mailing list