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

Re: svn commit: rev 4077 - trunk

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2002-12-10 19:47:02 CET

Matt Kraai <kraai@alumni.cmu.edu> writes:

> On Tue, Dec 10, 2002 at 10:17:10AM -0800, Daniel Rall wrote:
> > dlr@tigris.org writes:
> >
> > > # FIXME: Replace inline Perl invocation with something cleaner.
> > > swig-java-ext: swig-assert-available mkdir-init
> > > - cd $(SWIG_SRC_DIR); \
> > > - for source in *.i; do \
> > > - target="`echo -n $$source | perl -pe 's/\.i$$/.c/'`"; \
> > > - $(SWIG) -c -java -noproxy -module 'svn_' \
> > > + cd $(SWIG_SRC_DIR)/java/org/tigris/subversion/swig; \
> > > + for source in $(SWIG_SRC_DIR)/*.i; do \
> > > + target="`echo -n $$source | perl -pe 's!^.*/(.+)\.i$$!$$1.c!'`"; \
> > > + $(SWIG) -c -java -noproxy -module 'Subversion' \
> > > + -package 'org.tigris.subversion.swig' \
> > > -I$(SWIG_SRC_DIR) \
> > > -I$(abs_srcdir)/subversion/include $(SVN_APR_INCLUDES) \
> > > -o java/build/$$target $$source; \
> > > done
> >
> > Within Subversion's build process, what is the Right Way to handle the
> > inline Perl invocation at the beginning of the shell "for" loop? m4
> > and sed (two tools I'm less familiar with)? Suggestions appreciated.
>
> Does
>
> target="`echo $$source | sed -n 's,.*/\(.*\).i,\1.c,p'`"; \
>
> work?

It does. I used a slight variation, which includes start and end
anchors, and drops the -n (be quiet) option and p (print) command
which seemed to cancel each other out. Committed as r4083.

  target="`echo -n $$source | sed 's!^.*/\(.*\)\.i$$!\1.c!'`"; \

Thanks!

-- 
Daniel Rall <dlr@finemaltcoding.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 10 19:47:33 2002

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.