standard build script (method 2)

Charles Wilson cwilson@ece.gatech.edu
Fri Jul 12 12:13:00 GMT 2002



Lapo Luchini wrote:

> Charles Wilson wrote:
> 
>> Lapo Luchini wrote:
>>
>>>> strip() {
>>>>   (cd ${instdir} && \
>>>>   find . -name "*.dll" | xargs strip > /dev/null 2>&1
>>>>   find . -name "*.exe" | xargs strip > /dev/null 2>&1 )
>>>> }
>>>
>>>
>>> Shouldn't that be changed to the following?
>>>
>>> strip() {
>>>  (cd ${instdir} && \
>>>  find . -name "*.dll" | xargs strip > /dev/null 2>&1 && \
>>>  find . -name "*.exe" | xargs strip > /dev/null 2>&1 )
>>> } 
>>
>>
> Uhm..dunno what I was thinking when I pressed the "send" button, I meant 
> to send the following code:
> 
> strip() {
> (cd ${instdir} && \
> find . -name "*.dll" -or -name "*.exe" | xargs strip > /dev/null 2>&1 )
> }


Yes, this would work just fine.  But I'm confused as to why there's so 
much discussion about "fixing" something that works.  "Efficiency?" 
We've all just wasted 27 times as much time just writing these emails as 
this would EVER save...

Now I know how cgf feels sometimes when *I* go off on a tangent...


>> No.  If there are no *.dll files, then xargs fails -- which would mean 
>> that the exe's don't get stripped.
> 

> Doesn't seems "right" to me that the (sometimes normal) absence of DLLs 
> should stop the thing.
> You could of course reply that scripts are meant to be adapted to the 
> package...


You misunderstand.  The current code continues, and will strip .exe's 
even if there are no .dll's.  The initial proposed change would break 
the current (good) behavior.

> 
>>> and moreover doing it all in a single line is a little more optimized.
>>
>>
>> It's possible to optimize into non-functionality, which is what '&& \' 
>> would do. 
> 
> 
> Well I actually was talking about what I pasted this time, not that time 
> 0=)


You can do whatever you want in your buildscript -- it is totally 
user-customizable.  I just don't feel like messing with a working 
example in pursuit of (possibly illusory) "efficiency" goals...all to 
save 0.2 seconds per build.

--Chuck



More information about the Cygwin-apps mailing list