> -----Original Message----- > From: rhuij...@apache.org [mailto:rhuij...@apache.org] > Sent: donderdag 28 januari 2016 10:47 > To: dev@serf.apache.org > Subject: svn commit: r1727295 - /serf/trunk/SConstruct > > Author: rhuijben > Date: Thu Jan 28 09:47:00 2016 > New Revision: 1727295 > > URL: http://svn.apache.org/viewvc?rev=1727295&view=rev > Log: > Avoid constructing a library name with variables without > proper escaping when SHLIBNAME is '$LIBNAME' > > Found by: philip > > * SConstruct > Handle special case that should have been caught by scons. > > Modified: > serf/trunk/SConstruct > > Modified: serf/trunk/SConstruct > URL: > http://svn.apache.org/viewvc/serf/trunk/SConstruct?rev=1727295&r1=1727 > 294&r2=1727295&view=diff > ========================================================== > ==================== > --- serf/trunk/SConstruct (original) > +++ serf/trunk/SConstruct Thu Jan 28 09:47:00 2016 > @@ -230,11 +230,15 @@ incdir = '$PREFIX/include/serf-$MAJOR' > if sys.platform != 'sunos5': > env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0) > > -SHLIBNAME = '%sserf-%d' % (env['SHLIBPREFIX'], MAJOR) > -LIBNAME = '%sserf-%s' % (env['LIBPREFIX'], MAJOR) > +LIBNAME = '%sserf-%d' % (env['LIBPREFIX'], MAJOR) > if sys.platform == 'win32': > # On Win32 SHLIBPREFIX and LIBPREFIX are empty and both produce a .lib > file. > SHLIBNAME = 'libserf-%d' % (MAJOR, ) > +elif env['SHLIBPREFIX'] == '$LIBPREFIX': > + # Let's avoid constructing '$LIBPREFIXserf...' which evaluates to '' > + SHLIBNAME = LIBNAME > +else: > + SHLIBNAME = '%sserf-%d' % (env['SHLIBPREFIX'], MAJOR)
A better fix might involve env.subst() or just adding the variable properly escaped ourselves, but I'm not entirely sure. But for now, I think this fixes the problem identified by Philip. Bert