FACT++  1.0
string Configuration::UnLibToolize ( const std::string &  src) const
private

Removes /.libs/lt- from a path or just lt- from the filename.

Parameters
srcinput path with filename
Returns
path cleaned from libtool extensions

Definition at line 1356 of file Configuration.cc.

Referenced by PrintUsage().

1357 {
1358  const boost::filesystem::path path(src);
1359 
1360  string pname = path.parent_path().string();
1361 #if BOOST_VERSION < 104600
1362  string fname = path.filename();
1363 #else
1364  string fname = path.filename().string();
1365 #endif
1366 
1367  // If the filename starts with "lt-" remove it from the name
1368  if (fname.substr(0, 3)=="lt-")
1369  fname = fname.substr(3);
1370 
1371  string pwd;
1372  // If no directory is contained determine the current directory
1373  if (pname.empty())
1374  pname = boost::filesystem::current_path().string();
1375 
1376  // If the directory is relative and just ".libs" forget about it
1377  if (pname==".libs")
1378  return fname;
1379 
1380 
1381  // Check if the directory is long enough to contain "/.libs"
1382  if (pname.length()>=6)
1383  {
1384  // If the directory ends with "/.libs", remove it
1385  const size_t pos = pname.length()-6;
1386  if (pname.substr(pos)=="/.libs")
1387  pname = pname.substr(0, pos);
1388  }
1389 
1390  // If the path is the local path do not return the path-name
1391  if (pname==boost::filesystem::current_path().string())
1392  return fname;
1393 
1394  return pname+'/'+fname;
1395 }

+ Here is the caller graph for this function: