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?
Matt
---------------------------------------------------------------------
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:29:57 2002