[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Ruby question: Purpose of "ruby -run"?

From: Max Bowsher <maxb_at_ukf.net>
Date: 2005-03-20 15:40:13 CET

Garrett Rooney wrote:
> Max Bowsher wrote:
>> +INSTALL_EXTRA_SWIG_RB=\
>> + $(RUBY) -run -e mkdir -- -p
>> $(DESTDIR)$(SWIG_RB_SITE_LIB_DIR)/svn/ext; \
>> + (cd $(SWIG_RB_DIR); \
>> + find svn \
>> + -name "*.rb" \
>> + -exec $(RUBY) -run -e install -- \
>> + $(SWIG_RB_DIR)/\{\} \
>> + $(DESTDIR)$(SWIG_RB_SITE_LIB_DIR)/\{\} \;)
>> +
>>
>> What is the advantage of "ruby -run" over invoking the command directly?
>
> The -r flag to ruby pulls in the specified module, in this case the 'un'
> module,

I rather suspected that that was the case.

> which holds ruby implementations of various common command line
> utilities (rm, mkdir, etc.). On a unix system there's probably little
> reason to use it, other than the fact that you can be reasonably certain
> that they will work the same on various systems. It's more useful on
> say win32 or something where you aren't likely to have them.

OK. So using it in a _Makefile_, where those utilities are being used bare
elsewhere, is just unnecessary verbosity.

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 20 15:41:36 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.