serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1727295 - /serf/trunk/SConstruct
Date Thu, 28 Jan 2016 09:47:00 GMT
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=1727294&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)
 
 env.Append(RPATH=[libdir],
            PDB='${TARGET.filebase}.pdb')



Mime
View raw message