A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/proj__tree__builder_8cpp_source.html below:

NCBI C++ ToolKit: src/build-system/project_tree_builder/proj_tree_builder.cpp Source File

61  ITERATE

(list<string>, d, dependencies) {

64  if

(

n

!=

tree

.m_Projects.

end

()) {

72  "should be built after: "

<< dep_item.

m_MkName

);

84  PLibExclude

(

const string

& prj_name,

const

list<string>& excluded_lib_ids)

87  copy

(excluded_lib_ids.begin(), excluded_lib_ids.end(),

108  const string

& projname,

111  string

fname =

"Makefile."

+ projname;

118  string

fname_msvc2(fname_msvc);

122

fname_msvc +=

".msvcproj"

;

124

fname_msvc2 +=

".in"

;

155  else if

(

CDirEntry

(fname_dll).Exists() )

157  else if

(

CDirEntry

(fname_app).Exists() )

167  "Makefile not found"

);

172  "Makefile not found"

);

177  "Makefile not found"

);

182  "Makefile not found"

);

187  "Makefile not found"

);

196  return

name ==

"Makefile.in"

;

239  bool

msvc_empty = msvc_prj.

IsEmpty

();

243

p->second.m_Contents) {

245  const string

&

key

=

n

->first;

246

list<string>& values =

n

->second;

247  bool

cppflags =

key

==

"CPPFLAGS"

;

251  bool

modified =

false

;

252

list<string> new_vals;

253

list<string> redef_values;

254

modified = msvc_prj.

Redefine

(values,redef_values);

258  const string

&

val

= *k;

259  if

(cppflags &&

site

.IsCppflagDescribed(

val

)) {

261

new_vals.push_back(

val

);

267

new_vals.push_back(

val

);

272

list<string> resolved_def;

274

resolver.

Resolve

(

val

, &resolved_def, p->second);

275  if

( resolved_def.empty() ) {

277

new_vals.push_back(val_define);

281  ITERATE

(list<string>,

l

, resolved_def) {

282  const string

& define = *

l

;

285  string

resolved_def_str;

286

list<string> libchoices_includes ;

287  site

.GetLibChoiceIncludes(stripped, &libchoices_includes);

288  if

(!libchoices_includes.empty()) {

289

resolved_def_str =

NStr::Join

( libchoices_includes,

" "

);

291

resolved_def_str =

site

.GetDefinesEntry(stripped);

293  if

( !resolved_def_str.empty() ) {

294

defs_resolved[define] = resolved_def_str;

295

list<string> resolved_defs;

300  copy

(resolved_defs.begin(),

302

back_inserter(new_vals));

304

msvc_prj.

Append

(new_vals,resolved_defs);

308

list<string> components;

309  site

.GetComponents(stripped, &components);

310  if

(!components.empty()) {

311

defs_resolved[define] =

"Component= "

+

NStr::Join

( components,

", "

);

313

defs_unresolved.

insert

(define);

316

new_vals.push_back(define);

318

msvc_prj.

Append

(new_vals,define);

327  string

resolved_def_str =

site

.GetDefinesEntry(stripped);

328  if

(resolved_def_str ==

" "

) {

329

resolved_def_str.erase();

334

new_vals.push_back( def);

336

msvc_prj.

Append

(new_vals,def);

340

new_vals.push_back(define);

342

msvc_prj.

Append

(new_vals,define);

351

msvc_prj.

Redefine

(new_vals,redef_values);

352

values = redef_values;

358  if

(!defs_resolved.

empty

()) {

361  r

!= defs_resolved.

end

(); ++

r

) {

368  PTB_INFO

(

"Resolved macro definitions: "

<< s);

370  if

(!defs_unresolved.

empty

()) {

373

u != defs_unresolved.

end

(); ++u) {

378  "Unresolved macro definitions:"

<< s);

385  size_t

token_pos = flag.find(token);

386  if

(token_pos !=

NPOS

&&

387

token_pos + token.length() < flag.length()) {

388  return

flag.substr(token_pos + token.length());

395  const string

& source_base_dir,

396

list<string>* include_dirs)

398

include_dirs->clear();

399  ITERATE

(list<string>, p, cpp_flags) {

400  const string

& flag = *p;

406  if

( !token_val.empty() ) {

413

include_dirs->push_back(dir);

416  if

( !token_val.empty() ) {

421

include_dirs->push_back(dir);

426  if

( !token_val.empty() || flag ==

"-I$(srcdir)"

) {

433

include_dirs->push_back(dir);

438  if

( !token_val.empty() && token_val[0] !=

'$'

&& token_val[0] !=

'@'

&& token_val[0] !=

':'

) {

441

include_dirs->push_back(dir);

448  if

( !dir_all.empty() ) {

449

list<string> dir_list;

451  ITERATE

(list<string>, dir_item, dir_list) {

452  const string

& dir = *dir_item;

454

include_dirs->push_back(dir);

457

<< flag <<

" = "

<< dir <<

": " 458

<< dir <<

" not found"

);

459

include_dirs->push_back(dir);

466

include_dirs->push_back(d);

482

list<string> libchoices_abs_includes ;

484

&libchoices_abs_includes);

485  ITERATE

(list<string>,

n

, libchoices_abs_includes) {

486  const string

& dir = *

n

;

487  if

( !dir.empty() ) {

488

include_dirs->push_back(dir);

493

include_dirs->sort();

494

include_dirs->unique();

499

list<string>* defines)

503  ITERATE

(list<string>, p, cpp_flags) {

504  const string

& flag = *p;

506

defines->push_back(flag.substr(2));

513  const

list<string>& libs_flags,

const

list<string>& expected_flags,

514

list<string>* libs_list,

const string

* mkname)

518

list<string> unkflags;

519

list<CProjKey> libs3;

520  ITERATE

(list<string>, p, libs_flags) {

530  if

(liborder_found && find(

531  GetApp

().m_LibraryOrder[*mkname].begin(),

532  GetApp

().m_LibraryOrder[*mkname].end(), flag.substr(2)) !=

533  GetApp

().m_LibraryOrder[*mkname].end()) {

539  done

.insert(flag.substr(2));

541  if

(p != libs_flags.end()) {

547

unkflags.push_back(flag);

551  if

(

GetApp

().m_AddMissingDep) {

552  ITERATE

(list<string>, p, expected_flags) {

553  const string

& flag = *p;

555  if

(

done

.find(flag.substr(2)) ==

done

.end()) {

557  done

.insert(flag.substr(2));

561  if

(

done

.find(flag) ==

done

.end()) {

567  if

(find(unkflags.begin(), unkflags.end(), flag) == unkflags.end()) {

568

unkflags.push_back(flag);

574  if

(mkname !=

NULL

&& !

GetApp

().IsScanningWholeTree() && !libs3.empty()) {

575

list<string> liborder;

577

liborder.push_back(

""

);

580  if

(!liborder.empty()) {

582  ITERATE

( list<string>, s, liborder) {

585  if

(libs_list && find(libs_list->begin(), libs_list->end(), *s) == libs_list->end()) {

589

libs_list->push_back(*s);

714

p = makein_contents.

m_Contents

.

find

(

"EXPENDABLE_UNIX_PROJ"

);

731

(

const string

& base_dir,

732  const string

& projname,

738  string

fname =

"Makefile."

+ projname;

749

fname +=

".msvcproj"

;

759  const

list<string> files,

760

list<string>* full_pathes)

762  ITERATE

(list<string>, p, files) {

764

full_pathes->push_back(full_path);

771  const string

& branch,

775  if

(all_dep.

find

(branch) != all_dep.

end

()) {

779  if

(source_flags.find(branch) != source_flags.end()) {

785  if

(source_dep.find(branch) != source_dep.end()) {

786  const set<string>

& branches(source_dep.find(branch)->second);

794

list<CProjKey>& depends_ids_arg,

const string

& mkname, list<string>& liborder,

795  const set<string>

* libs_3party, list<string>* expected_3party)

797  if

(depends_ids_arg.empty()) {

800  if

(

GetApp

().m_GraphDepPrecedes.empty()) {

804

list<string> warnings;

805

list<string> original;

806

list<string> duplicates;

807

list<string> missing;

811

list<CProjKey> depends_ids( depends_ids_arg);

813  for

(list<CProjKey>::const_iterator p = depends_ids.begin();

814

p != depends_ids.end(); ++p) {

815  for

(list<CProjKey>::const_iterator

i

= p;

816

++

i

!= depends_ids.end();) {

818

duplicates.push_back(

i

->Id());

822

original.push_back(p->Id());

825  if

(expected_3party !=

nullptr

) {

827

expected_3party->push_back(*s);

834

list<CProjKey>::const_iterator p = depends_ids.begin();

835  for

(; p != depends_ids.end(); ++p) {

836  if

(p->Id() ==

id

) {

840  if

(p == depends_ids.end()) {

841  for

(p = depends_ids.begin(); p != depends_ids.end(); ++p) {

846  if

(p == depends_ids.end()) {

847  if

(libs_3party ==

nullptr

||

848

libs_3party->

find

(

id

) == libs_3party->

end

()) {

852

missing.push_back(

id

);

853

missing_suffix[id] = s_suffix;

855

}

else if

(expected_3party !=

nullptr

) {

857

expected_3party->push_back(

id

);

859

expected_3party->push_back(

"-l"

+

id

);

865  if

(!missing.empty()) {

866

warnings.push_back(

"missing dependencies: "

+

NStr::Join

(missing,

","

));

868  ITERATE

( list<string>, m, missing) {

873  if

(!duplicates.empty()) {

874

warnings.push_back(

"duplicate dependencies: "

+

NStr::Join

(duplicates,

","

));

878  bool

fix = (!liborder.empty() && liborder.begin()->empty()) ||

879

!duplicates.

empty

() || depends_ids_arg.size() != depends_ids.size();

885  for

(list<CProjKey>::const_iterator p = depends_ids.begin();

886

p != depends_ids.end(); ++p) {

888  bool

obsolete =

false

;

898

projlibs.

erase

(*s);

899

projlibs.

insert

(p->Id());

900

warnings.push_back(

"obsolete library: "

+ *s +

" already included into "

+ p->Id());

905

projlibs.

erase

(p->Id());

907

warnings.push_back(

"obsolete library: "

+ p->Id() +

" already included into "

+ *s);

910  if

(!wrong.empty()) {

913  if

(find(missing.begin(), missing.end(), p->Id()) == missing.end()) {

914

warnings.push_back(

"wrong library order: "

+ p->Id() +

" should precede "

+

NStr::Join

(wrong,

","

));

918

libsofar.

insert

(p->Id());

920

projlibs.

insert

(p->Id());

925

list<string> unknown;

928

unknown.push_back(*p);

931  if

(!unknown.empty()) {

933

warnings.push_back(

"unknown libraries: "

+

NStr::Join

(unknown,

","

));

940

liborder.push_back(*p);

943

vector< list<string> > recommend;

946  while

(recommend.size() < rank+1) {

948

recommend.push_back(

t

);

950

recommend[rank].push_back(*p);

953  for

(

size_t a

= recommend.size();

a

!= 0; --

a

) {

954

advice.insert(advice.end(), recommend[

a

-1].begin(), recommend[

a

-1].end());

957

warnings.push_back(

"present library order: "

+

NStr::Join

(original,

","

));

958

warnings.push_back(

"recommended library order: "

+

NStr::Join

(advice,

","

));

960

list<string> advice_full;

961  ITERATE

( list<string>,

a

, advice) {

962  for

(list<CProjKey>::const_iterator p = depends_ids.begin();

963

p != depends_ids.end(); ++p) {

964  if

(*

a

== p->Id()) {

965

advice_full.push_back( p->FullId());

970

liborder = advice_full;

974  if

(!warnings.empty() && expected_3party !=

nullptr

) {

975  if

(libs_3party ==

nullptr

) {

976

warnings.push_front(

"====== Library order warnings (3rd party libs) ======"

);

978

warnings.push_front(

"====== Library order warnings (toolkit libs) ======"

);

996  for

(list<CProjKey>::const_iterator p = depends_ids.begin();

997

p != depends_ids.end(); ++p) {

1001

wrong.push_back(*s);

1005  "obsolete library: "

<< *s <<

" already included into "

<< p->Id());

1009  "obsolete library: "

<< p->Id() <<

" already included into "

<< *s);

1012  if

(!wrong.empty()) {

1014  "wrong library order: "

<< p->Id() <<

" should precede "

<<

NStr::Join

(wrong,

","

));

1016

libsofar.

insert

(p->Id());

1020  if

(depends_ids_arg.size() != depends_ids.size()) {

1021

depends_ids_arg = depends_ids;

1026

list<CProjKey>* depends_ids,

1027  const string

* mkname,

1028

list<string>* expected_3party)

1030

list<string> depends_libs;

1034  ITERATE

(list<string>, p, depends_libs) {

1041

list<string> resolved_def;

1043  ITERATE

(list<string>,

r

, resolved_def) {

1045  if

(!

site

.IsLibWithChoice(

id

) ||

1051

}

else if

(

id

.

empty

()) {

1053  if

(!

site

.IsLibWithChoice(

id

) ||

1060  if

(mkname !=

NULL

&& !

GetApp

().IsScanningWholeTree()) {

1062

&

GetApp

().m_3PartyLibs, expected_3party);

1065

depends_ids->sort();

1066

depends_ids->unique();

1070

list<string>& depends_libs)

1073  ITERATE

(list<string>, p, depends) {

1074  const string

&

id

= *p;

1075  if

(

id

[0] ==

'#'

) {

1078  string

lib =

site

.ProcessMacros(

id

,

false

);

1080

depends_libs.push_back(lib);

1088

depends_libs.push_back(

r

->substr(2));

1090

depends_libs.push_back(*

r

);

1094

depends_libs.push_back(

id

);

1104

string::size_type end = define.find(

"@"

,1);

1105  return

end != string::npos && ( ++end == define.size() || define[end] ==

'\0'

);

1115

define.substr(1, define.length() - 2):

""

;

1120  return count

(define.begin(), define.end(),

'@'

) > 1;

1125

string::size_type start, end;

1126

start = define.find(

"@"

);

1127

end = define.find(

"@"

,start+1);

1128  if

(end == string::npos) {

1132  return

define.substr(start,end-start+1);

1137

list<string>* libs_list)

1144  const

list<string>& values = k->second;

1146  ITERATE

(list<string>, p, values) {

1147  const string

&

val

= *p;

1149  string

lib_id =

val

.substr(2);

1150

libs_list->push_back(lib_id);

1152

libs_list->push_back(

val

);

1157

libs_list->unique();

1161  const string

& proj_name,

1162  const string

& applib_mfilepath,

1168  if

(m == makeapp.

end

()) {

1180  string

full_makefile_path = applib_mfilepath;

1185  if

(k == makefile.

m_Contents

.

end

() || k->second.empty()) {

1186  if

(

GetApp

().IsScanningWholeTree()) {

1188  "APP is not specified: "

<< full_makefile_name);

1191  "APP is not specified: "

<< full_makefile_name);

1195  string

proj_id = k->second.front();

1199  if

(z !=

tree

->m_Projects.

end

()) {

1202  "Application "

<< proj_id <<

" already defined at " 1203

<<

tree

->m_Projects[proj_key].m_SourcesBaseDir);

1217  if

(

GetApp

().IsScanningWholeTree()) {

1219  "SRC is not specified: "

<< full_makefile_name);

1222  "SRC is not specified: "

<< full_makefile_name);

1230

source_base_dir, k->second);

1231

list<string> sources;

1238

source_base_dir, k->second);

1239

list<string> unix_sources;

1240

unix_src_resolver.

ResolveTo

(&unix_sources);

1241  copy

(unix_sources.begin(), unix_sources.end(), back_inserter(sources));

1246

list<string> depends;

1257  ITERATE

(list<string>,

i

, k->second) {

1263

depends.push_back( *

i

);

1271

list<string> added_depends;

1274

list<string> excluded_depends;

1277

list<string> adj_depends(depends);

1278  copy

(added_depends.begin(),

1279

added_depends.end(), back_inserter(adj_depends));

1284

list<string> expected_3party;

1285

list<CProjKey> depends_ids;

1287

&applib_mfilepath, &expected_3party);

1289

list<CProjKey> unconditional_depends_ids;

1290

k = m->second.m_Contents.find(

"USR_DEP"

);

1291  if

(k != m->second.m_Contents.end()) {

1292  const

list<string> depends = k->second;

1294  copy

(unconditional_depends_ids.begin(),

1295

unconditional_depends_ids.end(), back_inserter(depends_ids));

1297

k = m->second.m_Contents.find(

"MSVC_DEP"

);

1298  if

(k != m->second.m_Contents.end()) {

1299  const

list<string> deps = k->second;

1300  ITERATE

(list<string>, p, deps) {

1308

list<string> req_lst;

1311

project_makefile.

Redefine

(req_lst,reqs);

1315

list<string> libs_3_party;

1324  if

(k != makefile.

m_Contents

.

end

() || !expected_3party.empty()) {

1325

list<string> libs_flags;

1327

libs_flags = k->second;

1333

list<string> include_dirs;

1334

list<string> defines;

1337  const

list<string>& cpp_flags = k->second;

1339

source_base_dir, &include_dirs);

1342  bool

style_objcpp =

false

;

1345  const

list<string>& cxx_flags = k->second;

1346

style_objcpp = find(cxx_flags.begin(), cxx_flags.end(),

"objective-c++"

) != cxx_flags.end();

1351

list<string> ncbi_clibs;

1353

libs_3_party.push_back(

"NCBI_C_LIBS"

);

1372

project.

m_MkName

= applib_mfilepath;

1376

list<CDataToolGeneratedSrc> datatool_sources;

1379  const

list<string> datatool_src_list = k->second;

1380  ITERATE

(list<string>,

i

, datatool_src_list) {

1382  const string

& src = *

i

;

1384  string

source_file_path =

1387  if

(

CDirEntry

(source_file_path +

".asn"

).Exists() )

1388

source_file_path +=

".asn"

;

1389  else if

(

CDirEntry

(source_file_path +

".dtd"

).Exists() )

1390

source_file_path +=

".dtd"

;

1391  else if

(

CDirEntry

(source_file_path +

".xsd"

).Exists() )

1392

source_file_path +=

".xsd"

;

1396  if

( !data_tool_src.

IsEmpty

() )

1397

datatool_sources.push_back(data_tool_src);

1400  if

( !datatool_sources.empty() ) {

1410  GetApp

().GetProjectTreeInfo().m_Src, source_base_dir);

1413

check_dir.erase(check_dir.size()-1,1);

1415  string

check_testname(proj_name);

1416  string

check_appname(proj_id);

1420  if

( k != makefile.

m_Contents

.

end

() && !k->second.empty() ) {

1423  string

check_timeout(

"200"

);

1425  if

( k != makefile.

m_Contents

.

end

() && !k->second.empty() ) {

1426

check_timeout =

NStr::Join

(k->second,

" "

);

1429  bool

check_requires_ok =

true

;

1430  string

check_requires;

1432  if

( k != makefile.

m_Contents

.

end

() && !k->second.empty() ) {

1434  ITERATE

(list<string>, p, k->second) {

1435  if

( !

GetApp

().GetSite().IsProvided(*p) ) {

1436

check_requires_ok =

false

;

1440

check_requires =

NStr::Join

(k->second,

" "

);

1442  if

(check_requires_ok) {

1444  if

( k != makefile.

m_Contents

.

end

() && !k->second.empty() ) {

1445  if

(!check_requires.empty()) {

1446

check_requires +=

" "

;

1448

check_requires +=

NStr::Join

(k->second,

" "

);

1452  string

check_authors;

1453

list<string> lst_authors;

1456

check_authors =

NStr::Join

(lst_authors,

" "

);

1460  if

( k != makefile.

m_Contents

.

end

() && !k->second.empty() ) {

1461

check_authors =

NStr::Join

(k->second,

" "

);

1471  const

list<string> check_cmd_list = k->second;

1473  ITERATE

(list<string>,

i

, check_cmd_list) {

1475

string::size_type

n

= check_cmd.find(

test_name

);

1476  if

(

n

!= string::npos) {

1478

check_cmd = check_cmd.substr(0,

n

);

1496  if

(find(reqs.begin(), reqs.end(),

"internal"

) == reqs.end() ) {

1499

project.

m_ProjTags

.push_back(

"internal"

);

1504

list<string> pch_lst;

1507

project.

m_Pch

= pch_lst.front();

1511  tree

->m_Projects[proj_key] = project;

1519  const string

& proj_name,

1520  const string

& applib_mfilepath,

1526  if

(m == makelib.

end

()) {

1538  string

full_makefile_path = applib_mfilepath;

1542

k = m->second.m_Contents.find(

"LIB"

);

1545

m->second.m_Contents.find(

"STATIC_LIB"

);

1546  if

(tmp_k != m->second.m_Contents.end()) {

1550  if

(k == m->second.m_Contents.end() ||

1551

k->second.empty()) {

1552  if

(

GetApp

().IsScanningWholeTree()) {

1554  "LIB is not specified: "

<< full_makefile_name);

1557  "LIB is not specified: "

<< full_makefile_name);

1561  string

proj_id = k->second.front();

1565  if

(z !=

tree

->m_Projects.

end

()) {

1568  "Library "

<< proj_id <<

" already defined at " 1569

<<

tree

->m_Projects[proj_key].m_SourcesBaseDir);

1582

k = m->second.m_Contents.find(

"SRC"

);

1583  if

(k == m->second.m_Contents.end()) {

1584  if

(

GetApp

().IsScanningWholeTree()) {

1586  "SRC is not specified: "

<< full_makefile_name);

1589  "SRC is not specified: "

<< full_makefile_name);

1597

source_base_dir, k->second);

1598

list<string> sources;

1602

k = m->second.m_Contents.find(

"UNIX_SRC"

);

1603  if

(k != m->second.m_Contents.end()) {

1605

source_base_dir, k->second);

1606

list<string> unix_sources;

1607

unix_src_resolver.

ResolveTo

(&unix_sources);

1608  copy

(unix_sources.begin(), unix_sources.end(), back_inserter(sources));

1613

list<CProjKey> depends_ids;

1614

list<CProjKey> unconditional_depends_ids;

1615

k = m->second.m_Contents.find(

"ASN_DEP"

);

1616  if

(k != m->second.m_Contents.end()) {

1617  const

list<string> depends = k->second;

1619  copy

(unconditional_depends_ids.begin(),

1620

unconditional_depends_ids.end(), back_inserter(depends_ids));

1622

k = m->second.m_Contents.find(

"USR_DEP"

);

1623  if

(k != m->second.m_Contents.end()) {

1624  const

list<string> depends = k->second;

1626  copy

(unconditional_depends_ids.begin(),

1627

unconditional_depends_ids.end(), back_inserter(depends_ids));

1629

k = m->second.m_Contents.find(

"MSVC_DEP"

);

1630  if

(k != m->second.m_Contents.end()) {

1631  const

list<string> deps = k->second;

1632  ITERATE

(list<string>, p, deps) {

1639

k = m->second.m_Contents.find(

"LIB_OR_DLL"

);

1640  if

(k != m->second.m_Contents.end()) {

1641

lib_or_dll = k->second.front();

1648  bool

need_dll = (!dll_host.empty() &&

1653

list<string> req_lst;

1654  if

(m->second.CollectValues(

"REQUIRES"

,req_lst,

1658

project_makefile.

Redefine

(req_lst,reqs);

1662

list<string> include_dirs;

1663

list<string> defines;

1664

k = m->second.m_Contents.find(

"CPPFLAGS"

);

1665  if

(k != m->second.m_Contents.end()) {

1666  const

list<string>& cpp_flags = k->second;

1668

source_base_dir, &include_dirs);

1672  bool

style_objcpp =

false

;

1673

k = m->second.m_Contents.find(

"CXXFLAGS"

);

1674  if

(k != m->second.m_Contents.end()) {

1675  const

list<string>& cxx_flags = k->second;

1676

style_objcpp = find(cxx_flags.begin(), cxx_flags.end(),

"objective-c++"

) != cxx_flags.end();

1679  bool

isbundle =

false

;

1680

k = m->second.m_Contents.find(

"DLL_TYPE"

);

1681  if

(k != m->second.m_Contents.end() && k->second.front() ==

"plugin"

) {

1687

list<string> dll_depends;

1688

k = m->second.m_Contents.find(

"DLL_LIB"

);

1689  if

(

GetApp

().m_AllDllBuild) {

1691

m->second.m_Contents.find(

"DLL_DLIB"

);

1692  if

(tmp_k != m->second.m_Contents.end()) {

1696  if

(k != m->second.m_Contents.end()) {

1697  ITERATE

(list<string>,

i

, k->second) {

1699

dll_depends.push_back(

1703

dll_depends.push_back(*

i

);

1707

list<string> expected_3party;

1708

list<CProjKey> dll_depends_ids;

1710

need_dll ? &applib_mfilepath :

NULL

,

1711

need_dll ? &expected_3party :

NULL

);

1712  copy

(dll_depends_ids.begin(),

1713

dll_depends_ids.end(),

1714

back_inserter(depends_ids));

1719

list<string> libs_3_party;

1720

k = m->second.m_Contents.find(

"LIBS"

);

1723

m->second.m_Contents.find(

"STATIC_LIBS"

);

1724  if

(tmp_k != m->second.m_Contents.end()) {

1728  if

(k != m->second.m_Contents.end() || !expected_3party.empty()) {

1729

list<string> libs_flags;

1730  if

(k != m->second.m_Contents.end()) {

1731

libs_flags = k->second;

1734

need_dll ? &applib_mfilepath :

NULL

);

1752

(

tree

->m_Projects[proj_key]).m_StyleObjcpp = style_objcpp;

1753

(

tree

->m_Projects[proj_key]).m_MkName = applib_mfilepath;

1756

(

tree

->m_Projects[proj_key]).m_IsMetallib =

true

;

1760  if

(k != m->second.m_Contents.end()) {

1761

(

tree

->m_Projects[proj_key]).m_ExportHeaders = k->second;

1763

k = m->second.m_Contents.find(

"PACKAGE_EXPORT"

);

1764  if

(k != m->second.m_Contents.end()) {

1765

(

tree

->m_Projects[proj_key]).m_ExportHeadersDest = k->second.front();

1767

list<string> lst_watchers;

1768  if

(m->second.CollectValues(

"WATCHERS"

, lst_watchers,

1770  tree

->m_Projects[proj_key].m_Watchers =

NStr::Join

(lst_watchers,

" "

);

1773  tree

->m_Projects[proj_key].m_ProjTags.push_back(

"lib"

);

1774  if

(find(reqs.begin(), reqs.end(),

"internal"

) == reqs.end() ) {

1775  tree

->m_Projects[proj_key].m_ProjTags.push_back(

"public"

);

1777  tree

->m_Projects[proj_key].m_ProjTags.push_back(

"internal"

);

1779

m->second.CollectValues(

"PROJ_TAG"

,

tree

->m_Projects[proj_key].m_ProjTags,

1782

list<string> pch_lst;

1783  if

(m->second.CollectValues(

"USE_PCH"

, pch_lst,

1785  tree

->m_Projects[proj_key].m_Pch = pch_lst.front();

1789  tree

->m_Projects[proj_key].m_DllHost = dll_host;

1791  if

(

tree

->m_Projects.find(proj_dll) ==

tree

->m_Projects.

end

()) {

1795

item_dll.

m_Name

= dll_host;

1796

item_dll.

m_ID

= dll_host;

1798

item_dll.

m_Name

= proj_name;

1799

item_dll.

m_ID

= proj_id;

1808

item_dll.

m_MkName

= applib_mfilepath;

1812  tree

->m_Projects[proj_dll] = item_dll;

1815  ITERATE

(list<CProjKey>, u, unconditional_depends_ids) {

1816

(

tree

->m_Projects[proj_key]).m_UnconditionalDepends.insert( *u);

1822  const string

& source_base_dir,

1823  const string

& proj_name,

1824  const string

& proj_id,

1828  string

spec_proj_name = proj_name;

1829  string

spec_proj_id = proj_id;

1831

list<string> s_empty;

1832

list<CProjKey> d_empty;

1852  string

spec_proj_name = name;

1855

list<string> s_empty;

1856

list<CProjKey> d_empty;

1875  const string

& proj_name,

1876  const string

& applib_mfilepath,

1882  if

(m == makedll.

end

()) {

1890

k = m->second.m_Contents.find(

"DLL"

);

1891  if

(k == m->second.m_Contents.end() ||

1892

k->second.empty()) {

1894

<<

".dll at "

<< applib_mfilepath);

1897  string

proj_id = k->second.front();

1901  if

(z !=

tree

->m_Projects.

end

()) {

1905  string

full_makefile_path = applib_mfilepath;

1907  "DLL "

<< proj_id <<

" already defined at " 1908

<<

tree

->m_Projects[proj_key].m_SourcesBaseDir);

1922

list<string> include_dirs;

1923

list<string> defines;

1924

k = m->second.m_Contents.find(

"CPPFLAGS"

);

1925  if

(k != m->second.m_Contents.end()) {

1926  const

list<string>& cpp_flags = k->second;

1928

source_base_dir, &include_dirs);

1932  bool

style_objcpp =

false

;

1933

k = m->second.m_Contents.find(

"CXXFLAGS"

);

1934  if

(k != m->second.m_Contents.end()) {

1935  const

list<string>& cxx_flags = k->second;

1936

style_objcpp = find(cxx_flags.begin(), cxx_flags.end(),

"objective-c++"

) != cxx_flags.end();

1939

list<CProjKey> depends_ids;

1940

k = m->second.m_Contents.find(

"DEPENDENCIES"

);

1941  if

(k != m->second.m_Contents.end()) {

1942  const

list<string> depends = k->second;

1947

reqs.push_back(

"DLL"

);

1949

list<string> sources;

1950

list<string> libs_3_party;

1965  tree

->m_Projects[proj_key].m_External =

true

;

1966  tree

->m_Projects[proj_key].m_StyleObjcpp = style_objcpp;

1967  tree

->m_Projects[proj_key].m_MkName = applib_mfilepath;

1970

k = m->second.m_Contents.find(

"HOSTED_LIBS"

);

1971  if

(k != m->second.m_Contents.end()) {

1972  tree

->m_Projects[proj_key].m_HostedLibs = k->second;

1974

k = m->second.m_Contents.find(

"DLL_TYPE"

);

1975  if

(k != m->second.m_Contents.end() && k->second.front() ==

"plugin"

) {

1976  tree

->m_Projects[proj_key].m_IsBundle =

true

;

1978

list<string> lst_watchers;

1979  if

(m->second.CollectValues(

"WATCHERS"

, lst_watchers,

1981  tree

->m_Projects[proj_key].m_Watchers =

NStr::Join

(lst_watchers,

" "

);

1983  tree

->m_Projects[proj_key].m_ProjTags.push_back(

"dll"

);

1984

m->second.CollectValues(

"PROJ_TAG"

,

tree

->m_Projects[proj_key].m_ProjTags,

1991  const string

& proj_name,

1992  const string

& applib_mfilepath,

2024  if

( p != makeapp.

end

() ) {

2032

p = makelib.

find

(applib_mfilepath);

2033  if

( p != makelib.

end

() ) {

2046  const string

& proj_name,

2047  const string

& applib_mfilepath,

2060

proj_name, applib_mfilepath, makelib,

tree

, maketype) :

2062

proj_name, applib_mfilepath, makeapp,

tree

, maketype);

2063  if

( proj_id.

Id

().empty() )

2067  if

(p ==

tree

->m_Projects.

end

()) {

2075  switch

(makeinfo.

m_Type

) {

2077  if

(

CDirEntry

(source_file_path +

".asn"

).Exists() )

2078

source_file_path +=

".asn"

;

2081  if

(

CDirEntry

(source_file_path +

".dtd"

).Exists() )

2082

source_file_path +=

".dtd"

;

2085  if

(

CDirEntry

(source_file_path +

".xsd"

).Exists() )

2086

source_file_path +=

".xsd"

;

2089  if

(

CDirEntry

(source_file_path +

".wsdl"

).Exists() )

2090

source_file_path +=

".wsdl"

;

2093  if

(

CDirEntry

(source_file_path +

".jsd"

).Exists() )

2094

source_file_path +=

".jsd"

;

2097  if

(

CDirEntry

(source_file_path +

".proto"

).Exists() )

2098

source_file_path +=

".proto"

;

2103  if

( !

CDirEntry

(source_file_path).Exists() ) {

2107

<<

"Data specification for ASN project not found: "

<< source_file_path);

2113  if

( !data_tool_src.

IsEmpty

()) {

2122

project.

m_Pch

=

"FALSE"

;

2132  const string

& proj_name,

2133  const string

& applib_mfilepath,

2146  if

(m == makefile.

end

()) {

2159

<<

" at "

<< applib_mfilepath);

2162  const

list<string> asn_names = k->second;

2164

list<CDataToolGeneratedSrc> datatool_sources;

2165  ITERATE

(list<string>, p, asn_names) {

2166  const string

&

asn

= *p;

2172  if

(

CDirEntry

(asn_path_abs +

".asn"

).Exists() )

2173

asn_path_abs +=

".asn"

;

2174  else if

(

CDirEntry

(asn_path_abs +

".dtd"

).Exists() )

2175

asn_path_abs +=

".dtd"

;

2176  else if

(

CDirEntry

(asn_path_abs +

".xsd"

).Exists() )

2177

asn_path_abs +=

".xsd"

;

2180  string

parent_dir_abs =

ParentDir

(source_base_dir);

2186  if

(

CDirEntry

(asn_path_abs +

".asn"

).Exists() )

2187

asn_path_abs +=

".asn"

;

2188  else if

(

CDirEntry

(asn_path_abs +

".dtd"

).Exists() )

2189

asn_path_abs +=

".dtd"

;

2190  else if

(

CDirEntry

(asn_path_abs +

".xsd"

).Exists() )

2191

asn_path_abs +=

".xsd"

;

2199  if

(

CDirEntry

(asn_path_abs +

".asn"

).Exists() )

2200

asn_path_abs +=

".asn"

;

2201  else if

(

CDirEntry

(asn_path_abs +

".dtd"

).Exists() )

2202

asn_path_abs +=

".dtd"

;

2203  else if

(

CDirEntry

(asn_path_abs +

".xsd"

).Exists() )

2204

asn_path_abs +=

".xsd"

;

2207  "ASN spec file not found"

);

2214  if

( !data_tool_src.

IsEmpty

() )

2215

datatool_sources.push_back(data_tool_src);

2224

<<

" at "

<< applib_mfilepath);

2227

list<string> src_list = k->second;

2231  copy

(k->second.begin(), k->second.end(), back_inserter(src_list));

2234

list<string> sources;

2235  ITERATE

(list<string>, p, src_list) {

2236  const string

& src = *p;

2238

sources.push_back(src);

2244

proj_name, applib_mfilepath, makelib,

tree

, maketype) :

2246

proj_name, applib_mfilepath, makeapp,

tree

, maketype);

2247  if

( proj_id.

Id

().empty() )

2251  if

(pid ==

tree

->m_Projects.

end

()) {

2253

<<

" at "

<< applib_mfilepath);

2261  ITERATE

(list<string>, p, src_list) {

2262  const string

& src = *p;

2266  ITERATE

( list<CDataToolGeneratedSrc>, dts, datatool_sources) {

2267  const string

&

asn

= dts->m_SourceCPP;

2272

project.

m_Sources

.push_back(src +

"__"

);

2273

project.

m_Sources

.push_back(src +

"___"

);

2276  if

( !datatool_sources.empty() ) {

2288  const string

& proj_name,

2289  const string

& applib_mfilepath,

2295  if

(m == makemsvc.

end

()) {

2305

proj_id = proj_name;

2308

k = m->second.m_Contents.find(is_xcode ?

"XCODE_PROJ"

:

"MSVC_PROJ"

);

2309  if

(k == m->second.m_Contents.end() ||

2310

k->second.empty()) {

2313

<<

" at "

<< applib_mfilepath);

2316

proj_id = k->second.front();

2321  if

(z !=

tree

->m_Projects.

end

()) {

2323  string

full_makefile_path = applib_mfilepath;

2325  "Native project \'"

<< proj_id <<

"\' already defined at " 2326

<<

tree

->m_Projects[proj_key].m_SourcesBaseDir);

2339

list<string> sources;

2343  string

vcproj_key(

"VCPROJ"

);

2345

vcproj_key =

"VCXPROJ"

;

2347

k = m->second.m_Contents.find(vcproj_key);

2348  if

(k == m->second.m_Contents.end()) {

2351

<<

" at "

<< applib_mfilepath);

2354  ITERATE

(list<string>, s, k->second) {

2360

sources.push_back( d );

2366

list<CProjKey> depends_ids;

2367

k = m->second.m_Contents.find(

"LIB_DEP"

);

2368  if

(k != m->second.m_Contents.end()) {

2369  const

list<string> deps = k->second;

2370  ITERATE

(list<string>, p, deps) {

2374

k = m->second.m_Contents.find(

"APP_DEP"

);

2375  if

(k != m->second.m_Contents.end()) {

2376  const

list<string> deps = k->second;

2377  ITERATE

(list<string>, p, deps) {

2381

k = m->second.m_Contents.find(

"DLL_DEP"

);

2382  if

(k != m->second.m_Contents.end()) {

2383  const

list<string> deps = k->second;

2384  ITERATE

(list<string>, p, deps) {

2388

k = m->second.m_Contents.find(

"MSVC_DEP"

);

2389  if

(k != m->second.m_Contents.end()) {

2390  const

list<string> deps = k->second;

2391  ITERATE

(list<string>, p, deps) {

2395

k = m->second.m_Contents.find(

"USR_DEP"

);

2396  if

(k != m->second.m_Contents.end()) {

2397  const

list<string> deps = k->second;

2400  copy

(ids.begin(), ids.end(), back_inserter(depends_ids));

2405

list<string> req_lst;

2406  if

(m->second.CollectValues(

"REQUIRES"

, req_lst,

2410

project_makefile.

Redefine

(req_lst,reqs);

2413

list<string> libs_3_party;

2414

list<string> include_dirs;

2415

list<string> defines;

2435

m->second.CollectValues(

"PROJ_TAG"

, project.

m_ProjTags

,

2438

list<string> watchers;

2439  if

(m->second.CollectValues(

"WATCHERS"

, watchers,

2444

project.

m_MkName

= applib_mfilepath;

2445  tree

->m_Projects[proj_key] = project;

2461

list<string> list_lib;

2465

list<string> lib_list_in, lib_list_in0;

2466  for

(

const string

& lib : list_lib) {

2467  if

(lib.at(0) ==

'#'

) {

2475  copy

(

tmp

.begin(),

tmp

.end(), back_inserter(lib_list_in));

2477

lib_list_in.push_back(def);

2480

lib_list_in.push_back(lib);

2483  if

(lib_list_in.empty()) {

2486

lib_list_in0 = lib_list_in;

2491

list<string> lib_list_out[2];

2493  for

(pass=0; pass<4; ++pass) {

2496

lib_list_out[0] = lib_list_out[1];

2497

lib_list_out[1].

clear

();

2499

list<string>& list_in = pass == 0 ? lib_list_in : lib_list_out[0];

2500

list<string>& list_out = pass == 0 ? lib_list_out[0] : lib_list_out[1];

2503  for

(list<string>::const_iterator

l

= list_in.begin(); ; ++

l

) {

2506  if

(

l

== list_in.end()) {

2509  const string

& lib = *

l

;

2511

list_out.push_back(lib);

2516

list<string> resolved;

2519

resolver.

Resolve

(lib, &resolved);

2521

for_each(resolved.begin(), resolved.end(), [&lib_contents, &lib](

const string

& ce) {

2523

CSymResolver::StripSuffix(e);

2524

if (!e.empty() && e.at(0) !=

'@'

) {

2525

lib_contents[lib].insert(e);

2531  for

(

const string

& lib_item : lib_contents[lib]) {

2534

for_each(alldepends.begin(), alldepends.end(), [&lib_dependencies, &lib](

const string

& ce){

2536

CSymResolver::StripSuffix(e);

2537

if (!e.empty() && e.at(0) !=

'@'

) {

2538

lib_dependencies[lib].insert(e);

2541

list<string>::iterator iout = list_out.begin();

2542  bool

do_append =

true

;

2545  for

(; iout != list_out.end(); ++iout) {

2546  for

(

const string

& lib_dep : lib_dependencies[lib]) {

2547  if

(lib_contents[*iout].find(lib_dep) != lib_contents[*iout].end()) {

2559

list_out.push_back(lib);

2563

list<string>::const_iterator

i

= iout;

2565  bool

do_replace =

false

;

2569

already_there.

clear

();

2570  for

(

const string

& lib_item : lib_contents[*iout]) {

2571  if

(lib_contents[lib].find(lib_item) != lib_contents[lib].end()) {

2572

already_there.

insert

(lib_item);

2575  if

(already_there.

size

() == lib_contents[*iout].

size

() &&

2576

already_there.

size

() != lib_contents[lib].

size

()) {

2584

already_there.

clear

();

2585  for

(

i

= iout;

i

!= list_out.end(); ++

i

) {

2586  for

(

const string

& lib_item : lib_contents[lib]) {

2587  if

(lib_contents[*

i

].find(lib_item) != lib_contents[*

i

].end()) {

2588

already_there.

insert

(lib_item);

2592  if

(already_there.

size

() == lib_contents[lib].

size

()) {

2599

already_there.

size

() != 0 &&

2600

already_there.

size

() >= (lib_contents[lib].

size

() * 3)/4) {

2601  for

(

const string

& lib_item : lib_contents[lib]) {

2602  if

(already_there.

find

(lib_item) == already_there.

end

()) {

2603

list_in.push_back(lib_item);

2611  bool

do_insert =

true

;

2616  for

(;

i

!= list_out.end(); ++

i

) {

2617  for

(

const string

& lib_dep : lib_dependencies[*

i

]) {

2618  if

(lib_contents[lib].find(lib_dep) != lib_contents[lib].end()) {

2621  if

(lib_contents[*

i

].find(lib_dep) != lib_contents[*

i

].end()) {

2637  if

(do_append && ++

i

== list_out.end()) {

2638

list_out.push_back(lib);

2641

iout = list_out.erase(iout);

2643

list_out.insert(iout, lib);

2651  for

(

i

=iout;

i

!= list_out.end(); ++

i

) {

2652  for

(

const string

& lib_dep : lib_dependencies[lib]) {

2653  if

(lib_contents[*

i

].find(lib_dep) != lib_contents[*

i

].end()) {

2654  if

(lib_contents[lib].find(lib_dep) != lib_contents[lib].end()) {

2668

list_out.erase(iout);

2669  for

(

const string

& lib_item : already_there) {

2670

list_out.remove(lib_item);

2675

list_out.push_back(lib);

2681

list_out.push_back(lib);

2684  if

(list_in.size() == list_out.size() &&

2685

equal(list_in.begin(), list_in.end(), list_out.begin())) {

2690

list<string> warnings;

2691

warnings.push_back(

"====== Library order warnings (toolkit libs) ======"

);

2692

warnings.push_back(

"present library order: "

+

NStr::Join

(lib_list_in0,

" "

));

2693  if

(lib_list_out[0].

size

() == lib_list_out[1].

size

() &&

2694

equal(lib_list_out[0].begin(), lib_list_out[0].end(), lib_list_out[1].begin())) {

2695

warnings.push_back(

"recommended library order: "

+

NStr::Join

(lib_list_out[0],

" "

));

2698  for

(

const string

& lib_item: lib_list_out[0]) {

2699

all_libs.

insert

( lib_contents[lib_item].begin(),lib_contents[lib_item].end());

2700

all_deps.

insert

( lib_dependencies[lib_item].begin(),lib_dependencies[lib_item].end());

2703  for

(

const string

& lib_item: all_deps) {

2704  if

(all_libs.

find

(lib_item) == all_libs.

end

()) {

2705

all_missing.

insert

(lib_item);

2708  if

(!all_missing.

empty

()) {

2709

warnings.push_back(

"missing libraries: "

+

NStr::Join

(all_missing,

" "

));

2712

warnings.push_back(

"Failed to identify recommended library order"

);

2714

warnings.push_back(

"candidate1: "

+

NStr::Join

(lib_list_out[0],

" "

));

2715

warnings.push_back(

"candidate2: "

+

NStr::Join

(lib_list_out[1],

" "

));

2727  const string

& root_src_path,

2738

list<string> metadata_files;

2744  ITERATE

(list<string>, p, metadata_files) {

2746  if

(!

GetApp

().m_BuildRoot.empty()) {

2749  if

(fileloc.empty() || !

CFile

(fileloc).Exists()) {

2752  if

(!

CDirEntry

(fileloc).Exists() && !

GetApp

().m_ExtSrcRoot.empty()) {

2755  GetApp

().GetConfig().

Get

(

"ProjectTree"

,

"src"

)),

2763  bool

is_good =

true

;

2765  if

(sym.

GetValue

(

"REQUIRES"

, reqs)) {

2768  for

(

const string

&

i

: items) {

2769  if

(!

GetApp

().GetSite().IsProvided(

i

)) {

2777  PTB_INFO

(

"Resolve macros using rules from "

<< fileloc);

2778

resolver.

Append

( sym,

true

);;

2787

subtree_makefiles.

m_In

,

2788

subtree_makefiles.

m_Lib

,

2789

subtree_makefiles.

m_Dll

,

2790

subtree_makefiles.

m_App

,

2793  if

(!

GetApp

().IsScanningWholeTree()) {

2801  const string

& root_src_path,

2809  if

(

GetApp

().IsScanningWholeTree()) {

2810

*

tree

= target_tree;

2813  t

->second.m_External =

true

;

2819  if

(

GetApp

().m_InteractiveCfg &&

2820

!

GetApp

().Gui_ConfirmProjects(target_tree))

2830

list<CProjKey> external_depends;

2834  if

( !external_depends.empty()) {

2835

list<CProjKey> depends_to_resolve = external_depends;

2836  while

( !depends_to_resolve.empty() ) {

2837  bool

modified =

false

;

2838  ITERATE

(list<CProjKey>, p, depends_to_resolve) {

2844  if

(

n

!=

GetApp

().GetWholeTree().m_Projects.end()) {

2850  _TRACE

(

"Project not found: "

+ prj_id.

Id

());

2857

*

tree

= target_tree;

2871

*

tree

= target_tree;

2887  GetApp

().GetProjectTreeInfo().m_TreeNode);

2888  if

( !is_root && !

CDirEntry

(node_path).Exists() ) {

2897  "Makefile.in missing"

);

2905

contents = dir.

GetEntries

(

GetApp

().GetProjectTreeInfo().m_CustomMetaData);

2909

contents = dir.

GetEntries

(

GetApp

().GetProjectTreeInfo().m_CustomConfH);

2922  GetApp

().GetProjectTreeInfo().m_Src, dir_name);

2926  "skipped missing subtree"

);

2932  bool

process_projects = !is_root && filter->

CheckProject

(dir_name,&weak);

2933  if

(!process_projects && !weak && !is_root) {

2944

vector<string> ordered_subprojects;

2946  bool

has_metal =

false

;

2948  if

(is_root && get_order) {

2952  if

( process_projects || weak || !topbuilddir.empty()) {

2953  string

node(topbuilddir.empty() ? node_path : topbuilddir);

2956  if

(p != makefiles->

m_In

.

end

()) {

2961  string

subproj[] = {

"SUB_PROJ"

,

"EXPENDABLE_SUB_PROJ"

,

"POTENTIAL_SUB_PROJ"

,

""

};

2966  for

(j=0; !subproj[j].empty(); ++j) {

2969  const

list<string>& values = k->second;

2970  for

(list<string>::const_iterator

i

=values.begin();

i

!=values.end(); ++

i

) {

2971  if

(

i

->at(0) ==

'#'

) {

2974

subprojects[*

i

] =

max

(maketype, subtype[j]);

2975

ordered_subprojects.push_back(*

i

);

2979  if

( process_projects ) {

2980  string

userproj[] = {

"UNIX_PROJ"

,

"EXPENDABLE_UNIX_PROJ"

,

""

};

2983

userproj[0] = is_xcode ?

"XCODE_PROJ"

:

"MSVC_PROJ"

;

2987  for

(j=0; !userproj[j].empty(); ++j) {

2990  const

list<string>& values = k->second;

2991  for

(list<string>::const_iterator

i

=values.begin();

i

!=values.end(); ++

i

) {

2992  if

(

i

->at(0) ==

'#'

) {

2996

userprojects[

"Makefile."

+ *

i

] =

max

(maketype, usertype[j]);

2997

userprojects[

"Makefile."

+ *

i

+

".in"

] =

max

(maketype, usertype[j]);

3003  string

mkname(

"Makefile."

+ *

i

);

3005

mkname +=

".msvcproj"

;

3007

userprojects[mkname] =

max

(maketype, usertype[j]);

3015  string

libproj[] = {

"ASN_PROJ"

,

"DTD_PROJ"

,

"XSD_PROJ"

,

"WSDL_PROJ"

,

"JSD_PROJ"

,

"PROTOBUF_PROJ"

,

3016  "LIB_PROJ"

,

"EXPENDABLE_LIB_PROJ"

,

"POTENTIAL_LIB_PROJ"

,

""

};

3021  for

(j=0; !libproj[j].empty(); ++j) {

3024  const

list<string>& values = k->second;

3025  for

(list<string>::const_iterator

i

=values.begin();

i

!=values.end(); ++

i

) {

3026  if

(

i

->at(0) ==

'#'

) {

3029  string

mkname(

"Makefile."

+ *

i

+

".lib"

);

3030

libprojects[mkname] =

max

(maketype, libtype[j]);

3037  string

dllproj[] = {

"DLL_PROJ"

,

"EXPENDABLE_DLL_PROJ"

,

"POTENTIAL_DLL_PROJ"

,

""

};

3040  for

(j=0; !dllproj[j].empty(); ++j) {

3043  const

list<string>& values = k->second;

3044  for

(list<string>::const_iterator

i

=values.begin();

i

!=values.end(); ++

i

) {

3045  if

(

i

->at(0) ==

'#'

) {

3048  string

mkname(

"Makefile."

+ *

i

+

".dll"

);

3049

dllprojects[mkname] =

max

(maketype, dlltype[j]);

3056  string

metallib[] = {

"METAL_PROJ"

,

""

};

3058  for

(j=0; !metallib[j].empty(); ++j) {

3061  const

list<string>& values = k->second;

3062  for

(list<string>::const_iterator

i

=values.begin();

i

!=values.end(); ++

i

) {

3063  if

(

i

->at(0) ==

'#'

) {

3066  string

mkname(

"Makefile."

+ *

i

+

".metal"

);

3067

libprojects[mkname] =

max

(maketype, metaltype[j]);

3075  string

appproj[] = {

"APP_PROJ"

,

"EXPENDABLE_APP_PROJ"

,

"POTENTIAL_APP_PROJ"

,

""

};

3080  for

(j=0; !appproj[j].empty(); ++j) {

3083  const

list<string>& values = k->second;

3084  for

(list<string>::const_iterator

i

=values.begin();

i

!=values.end(); ++

i

) {

3085  if

(

i

->at(0) ==

'#'

) {

3088  string

mkname(

"Makefile."

+ *

i

+

".app"

);

3089

appprojects[mkname] =

max

(maketype, apptype[j]);

3101  if

( process_projects && !libprojects.

empty

()) {

3106  const string

name = dir_entry->GetName();

3107  if

(libprojects.

find

(name) != libprojects.

end

() &&

3113

contents = dir.

GetEntries

(

"Makefile.*.metal"

);

3116  const string

name = dir_entry->GetName();

3117  if

(libprojects.

find

(name) != libprojects.

end

()) {

3124  if

( process_projects && !dllprojects.

empty

()) {

3129  const string

name = dir_entry->GetName();

3130  if

(dllprojects.

find

(name) != dllprojects.

end

() &&

3137  if

( process_projects && !appprojects.

empty

() ) {

3142  const string

name = dir_entry->GetName();

3143  if

(appprojects.

find

(name) != appprojects.

end

() &&

3150  if

( process_projects && !userprojects.

empty

() ) {

3156  const string

name = dir_entry->GetName();

3157  if

(userprojects.

find

(name) != userprojects.

end

()

3164  if

( process_projects) {

3171

contents = dir.

GetEntries

(

GetApp

().GetProjectTreeInfo().m_CustomConfH);

3180

vector<string> ordered_subprojects_dirs;

3183  ITERATE

( vector<string>, p, ordered_subprojects) {

3186  if

( dir_entry.

IsDir

() ) {

3187  if

(subprojects.

find

(name) != subprojects.

end

()) {

3188

subprojects_dirs[dir_entry.

GetPath

()] = subprojects[name];

3190

subprojects_dirs[dir_entry.

GetPath

()] =

3193  if

(find(ordered_subprojects_dirs.begin(), ordered_subprojects_dirs.end(), name) ==

3194

ordered_subprojects_dirs.end()) {

3195

ordered_subprojects_dirs.push_back(name);

3198  "Duplicate entry: "

<< name);

3208  if

( !dir_entry->IsDir() ) {

3211  string

name = dir_entry->GetName();

3213  if

( name[0] ==

'.'

|| name ==

"CVS"

||

3217  if

(find(ordered_subprojects_dirs.begin(), ordered_subprojects_dirs.end(), name) !=

3218

ordered_subprojects_dirs.end()) {

3222  if

(subprojects.

find

(name) != subprojects.

end

()) {

3223

subprojects_dirs[dir_entry->GetPath()] = subprojects[name];

3225

subprojects_dirs[dir_entry->GetPath()] =

3228  if

(find(ordered_subprojects_dirs.begin(), ordered_subprojects_dirs.end(), name) ==

3229

ordered_subprojects_dirs.end()) {

3230

ordered_subprojects_dirs.push_back(name);

3235  for

(s = subprojects.

begin

(); s != subprojects.

end

(); ++s) {

3236  if

(s->first.

find

(

'/'

) != string::npos) {

3239  if

(dir_entry.

IsDir

()) {

3240

subprojects_dirs[dir_entry.

GetPath

()] = subprojects[s->first];

3259  ITERATE

( vector<string>, ps, ordered_subprojects_dirs) {

3261  ProcessDir

(subproject_dir,

false

, filter, makefiles, subprojects_dirs[subproject_dir], mkin);

3303  string

s =

"MakeDll : "

+

file_name

+

" "

;

3310  PTB_INFO

(s <<

"rejected (is empty)"

);

3352  _TRACE

(

"*** Resolving macrodefinitions in App projects ***"

);

3358

keys.

insert

(

"STATIC_LIB"

);

3359

keys.

insert

(

"STATIC_LIBS"

);

3361

keys.

insert

(

"NCBI_C_LIBS"

);

3366  _TRACE

(

"*** Resolving macrodefinitions in Lib projects ***"

);

3372

keys.

insert

(

"STATIC_LIB"

);

3373

keys.

insert

(

"STATIC_LIBS"

);

3376

keys.

insert

(

"DLL_LIB"

);

3378

keys.

insert

(

"DLL_DLIB"

);

3384  _TRACE

(

"*** Resolving macrodefinitions in Msvc projects ***"

);

3386

keys.

insert

(

"DLL_DEP"

);

3402  const CProjKey

& project_id = p->first;

3409  string

src_abs_path =

3411  string

src_rel_path =

3413

(

GetApp

().GetProjectTreeInfo().m_Src,

3415

(*datatool_ids)[src_rel_path] = project_id;

3427  bool

whole_collected =

false

;

3428  if

(

GetApp

().IsScanningWholeTree()) {

3429

whole_collected =

true

;

3434  bool

tree_extented =

false

;

3439

tree_extented =

false

;

3450  const string

& module = *

i

;

3452

datatool_ids.

find

(module);

3453  if

(j == datatool_ids.

end

()) {

3454  if

(!whole_collected) {

3455

whole_collected =

true

;

3458

j = whole_datatool_ids.

find

(module);

3459  if

(j != whole_datatool_ids.

end

()) {

3460  const CProjKey

& depends_id = j->second;

3462

datatool_ids[module] = depends_id;

3465  tree

->m_Projects[depends_id] =

3467

tree_extented =

true

;

3475

tree_extented = !added.

empty

();

3477  tree

->m_Projects[p->first] = p->second;

3480

}

while

( tree_extented );

3488  const CProjKey

& project_id = p->first;

3495  if

(z !=

tree

->m_Projects.

end

()) {

3496

z->second.m_DatatoolSources.push_back(src);

3499  const string

& module = *

i

;

3501

datatool_ids.

find

(module);

3502  if

(j != datatool_ids.

end

()) {

3503  const CProjKey

& depends_id = j->second;

3504  if

(depends_id != project_id) {

3505

project.

m_Depends

.push_back(depends_id);

EBuildType GetType(void) const

static EMsvcPlatform GetMsvcPlatform(void)

static string GetTopBuilddir(void)

static EMsvcVersion GetMsvcVersion(void)

CMsvcProjectMakefile –.

bool Redefine(const string &value, list< string > &redef) const

void Append(list< string > &values, const string &def) const

virtual void GetAdditionalLIB(const SConfigInfo &config, list< string > *lib_ids) const

virtual void GetExcludedLIB(const SConfigInfo &config, list< string > *lib_ids) const

bool IsLibWithChoice(const string &lib_id) const

void CollectRequires(const list< string > &reqs) const

bool ResolveDefine(const string &define, string &resolved) const

bool Is3PartyLibWithChoice(const string &lib3party_id) const

void GetLibChoiceIncludes(const string &cpp_flags_define, list< string > *abs_includes) const

CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:

set< string > m_Frameworks

void UpdateDepGraph(CProjectTreeBuilder::TFiles &files)

void AddCustomMetaData(const string &file)

const CBuildType & GetBuildType(void)

map< string, list< string > > m_3PartyLibraryOrder

map< string, set< string > > m_GraphDepIncludes

map< string, size_t > m_GraphDepRank

set< string > m_3PartyLibs

map< string, list< string > > m_LibraryOrder

void SetFail(int exit_code=1)

void RegisterSuspiciousProject(const CProjKey &proj)

void ExcludeUnrequestedProjects(CProjectItemsTree &tree) const

void AddCustomConfH(const string &file)

void GetMetaDataFiles(list< string > *files) const

string ProcessLocationMacros(string data)

const CProjectItemsTree & GetWholeTree(void)

const CMsvc7RegSettings & GetRegSettings(void)

void ExcludeProjectsByTag(CProjectItemsTree &tree) const

map< string, set< string > > m_GraphDepFlags

bool IsScanningWholeTree(void) const

map< string, set< string > > m_GraphDepPrecedes

const CMsvcSite & GetSite(void)

list< string > m_IncludeDirs

Resolved contents of CPPFLAG ( -I<m_IncludeDir> -I/..) Absolute pathes.

list< string > m_Sources

List of source files without extension ( *.cpp or *.c ) - with relative pathes from m_SourcesBaseDir.

CSimpleMakeFileContents m_DataSource

list< CProjKey > m_Depends

What projects this project is depend upon (IDs).

list< CDataToolGeneratedSrc > m_DatatoolSources

Source files *.asn , *.dtd to be processed by datatool app.

TProjType m_ProjType

Type of the project.

EMakeFileType m_MakeType

Type of the project.

string m_ID

ID of atomic project.

list< string > m_HostedLibs

string m_GUID

project GUID

string m_Pch

Precompiled header.

list< string > m_NcbiCLibs

Libraries from NCBI C Toolkit to link with.

list< string > m_ProjTags

string m_Name

Name of atomic project.

string m_SourcesBaseDir

Base directory of source files (....c++/src/a/ )

list< string > m_CheckInfo

const string & Id(void) const

TProjType Type(void) const

Resolver for SRC keys in Makefiles:

void ResolveTo(list< string > *sources_dst)

static void CreateFrom(const string &root_src, const TFiles &makein, const TFiles &makelib, const TFiles &makedll, const TFiles &makeapp, const TFiles &makemsvc, CProjectItemsTree *tree)

void GetExternalDepends(list< CProjKey > *externalDepends) const

Get depends that are not inside this project tree.

static bool VerifyBuildOrder(const CProjItem &item, list< string > dependencies, const CProjectItemsTree &tree)

static void ProcessDir(const string &dir_name, bool is_root, const IProjectFilter *filter, SMakeFiles *makefiles, EMakeFileType maketype, const CSimpleMakeFileContents *parent)

static void ProcessMakeLibFile(const string &file_name, SMakeFiles *makefiles, EMakeFileType type, const CSimpleMakeFileContents *parent)

static void BuildOneProjectTree(const IProjectFilter *filter, const string &root_src_path, CProjectItemsTree *tree)

Build one project tree and do not resolve (include) depends.

static void ProcessUserProjFile(const string &file_name, SMakeFiles *makefiles, EMakeFileType type, const CSimpleMakeFileContents *parent)

static void ResolveDefs(CSymResolver &resolver, SMakeFiles &makefiles)

static void AddDatatoolSourcesDepends(CProjectItemsTree *tree)

static void ProcessMakeAppFile(const string &file_name, SMakeFiles *makefiles, EMakeFileType type, const CSimpleMakeFileContents *parent)

static void ProcessMakeInFile(const string &file_name, SMakeFiles *makefiles, EMakeFileType type, const CSimpleMakeFileContents *parent)

static void BuildProjectTree(const IProjectFilter *filter, const string &root_src_path, CProjectItemsTree *tree)

Build project tree and include all projects this tree depends upon.

static void ProcessMakeDllFile(const string &file_name, SMakeFiles *makefiles, EMakeFileType type, const CSimpleMakeFileContents *parent)

CSimpleMakeFileContents –.

EMakeFileType GetMakeType(void) const

bool CollectValues(const string &key, list< string > &values, EHowToCollect how) const

bool GetValue(const string &key, string &value) const

void SetParent(const CSimpleMakeFileContents *parent)

void Resolve(const string &define, list< string > *resolved_def)

CSymResolver & Append(const CSymResolver &src, bool warn_redef=false)

static string StripDefine(const string &define)

static bool HasDefine(const string &param)

static bool StripSuffix(string &libname, string *suffix=nullptr)

static bool IsDefine(const string &param)

bool GetValue(const string &key, string &value) const

Utilits for Project Tree Builder:

virtual bool ExcludePotential(void) const =0

virtual bool CheckProject(const string &project_base_dir, bool *weak=0) const =0

container_type::const_iterator const_iterator

container_type::iterator iterator

const_iterator begin() const

const_iterator end() const

const_iterator find(const key_type &key) const

iterator_bool insert(const value_type &val)

const_iterator begin() const

const_iterator find(const key_type &key) const

const_iterator end() const

pre_order_iterator begin() const

pre_order_iterator end() const

string MakeFileTypeAsString(EMakeFileType type)

static char test_name[128]

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

void Error(CExceptionArgs_Base &args)

void Warning(CExceptionArgs_Base &args)

static string NormalizePath(const string &path, EFollowLinks follow_links=eIgnoreLinks)

Normalize a path.

TEntries GetEntries(const string &mask=kEmptyStr, TGetEntriesFlags flags=0) const

Get directory entries based on the specified "mask".

static bool IsAbsolutePath(const string &path)

Check if a "path" is absolute for the current OS.

int TGetEntriesFlags

Binary OR of "EGetEntriesFlags".

static string DeleteTrailingPathSeparator(const string &path)

Delete trailing path separator, if any.

static string AddTrailingPathSeparator(const string &path)

Add trailing path separator, if needed.

static string CreateRelativePath(const string &path_from, const string &path_to)

Create a relative path between two points in the file system specified by their absolute paths.

bool IsDir(EFollowLinks follow=eFollowLinks) const

Check whether a directory entry is a directory.

static string ConvertToOSPath(const string &path)

Convert "path" on any OS to the current OS-dependent path.

static char GetPathSeparator(void)

Get path separator symbol specific for the current platform.

static string ConcatPath(const string &first, const string &second)

Concatenate two parts of the path for the current OS.

string GetName(void) const

Get the base entry name with extension (if any).

const string & GetPath(void) const

Get entry path.

string GetExt(void) const

Get extension name.

@ fIgnoreRecursive

Suppress "self recursive" elements (the directories "." and "..").

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive compare of a substring with another string.

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)

Check if a string ends with a specified suffix value.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

static string Join(const TContainer &arr, const CTempString &delim)

Join strings using the specified delimiter.

static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

static int CompareCase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-sensitive compare of a substring with another string.

@ fSplit_Tokenize

All delimiters are merged and trimmed, to get non-empty tokens only.

@ fSplit_MergeDelimiters

Merge adjacent delimiters.

string CreateMsvcProjectMakefileName(const string &project_name, CProjItem::TProjType type)

Create project makefile name.

#define LIST_SEPARATOR

Separator for list values in registry.

CProjKey CreateProjKey(const string &project_name)

string IdentifySlnGUID(const string &source_dir, const CProjKey &proj)

void EraseIf(C &cont, const P &pred)

Erase if predicate is true.

const TYPE & Get(const CNamedParameterList *param)

constexpr bool empty(list< Ts... >) noexcept

const struct ncbi::grid::netcache::search::fields::SIZE size

const struct ncbi::grid::netcache::search::fields::KEY key

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)

CProjBulderApp & GetApp(void)

access to App singleton

static size_t s_BuildOrder

void s_CollectDatatoolIds(const CProjectItemsTree &tree, map< string, CProjKey > *datatool_ids)

CProjItem CreateUtilityProjectItem(const string &prj_dir, const string &name)

static void s_CollectAllLeaves(const map< string, set< string > > &source_dep, const map< string, set< string > > &source_flags, const string &branch, set< string > &all_dep, set< string > &all_flags)

const char * s_check_separator

void s_WriteBuildOrder(const string &dir_name, const string &mkname)

static map< string, size_t > s_buildOrder_byname

void s_AnalyzeLibraryOrder(CSymResolver &resolver, const CProjectItemsTree &tree)

string ParentDir(const string &dir_abs)

#define PTB_INFO_EX(file, err_code, msg)

#define PTB_WARNING(file, msg)

#define PTB_ERROR_EX(file, err_code, msg)

@ ePTB_ConfigurationError

#define PTB_WARNING_EX(file, err_code, msg)

#define PTB_TRACE_EX(file, err_code, msg)

string FilterDefine(const string &define)

static bool check_name(const char *name)

static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

bool operator()(const string &lib_id) const

set< string > m_ExcludedLib

PLibExclude(const string &prj_name, const list< string > &excluded_lib_ids)

static CProjKey DoCreate(const string &source_base_dir, const string &proj_name, const string &applib_mfilepath, const TFiles &makeapp, CProjectItemsTree *tree, EMakeFileType maketype)

static void CreateNcbiCToolkitLibs(const CSimpleMakeFileContents &makefile, list< string > *libs_list)

static CProjKey DoCreate(const string &source_base_dir, const string &proj_name, const string &applib_mfilepath, const TFiles &makeapp, const TFiles &makelib, CProjectItemsTree *tree, const SMakeProjectT::SMakeInInfo &makeinfo)

static CProjKey DoCreate(const string &source_base_dir, const string &proj_name, const string &applib_mfilepath, const TFiles &makeapp, const TFiles &makelib, CProjectItemsTree *tree, const SMakeProjectT::SMakeInInfo &makeinfo)

static CProjKey DoCreate(const string &source_base_dir, const string &proj_name, const string &applib_mfilepath, const TFiles &makeapp, const TFiles &makelib, CProjectItemsTree *tree, const SMakeProjectT::SMakeInInfo &makeinfo)

static TAsnType GetAsnProjectType(const string &applib_mfilepath, const TFiles &makeapp, const TFiles &makelib)

static CProjKey DoCreate(const string &source_base_dir, const string &proj_name, const string &applib_mfilepath, const TFiles &makeapp, CProjectItemsTree *tree, EMakeFileType maketype)

static CProjKey DoCreateDataSpec(const string &source_base_dir, const string &proj_name, const string &proj_id, CProjectItemsTree *tree, EMakeFileType maketype)

static CProjKey DoCreate(const string &source_base_dir, const string &proj_name, const string &applib_mfilepath, const TFiles &makeapp, CProjectItemsTree *tree, EMakeFileType maketype)

static bool IsMakeAppFile(const string &name)

static void DoResolveDefs(CSymResolver &resolver, CProjectItemsTree::TFiles &files, const set< string > &keys)

static void VerifyLibDepends(list< CProjKey > &depends_ids, const string &mkname, list< string > &liborder, const set< string > *libs_3party=nullptr, list< string > *expected_3party=nullptr)

static bool IsMakeDllFile(const string &name)

static bool IsConfigurableDefine(const string &define)

static void ConvertLibDepends(const list< string > &depends_libs, list< CProjKey > *depends_ids, const string *mkname=NULL, list< string > *expected_3party=NULL)

static string CreateMakeAppLibFileName(const string &base_dir, const string &projname, SMakeInInfo::TMakeinType type=SMakeInInfo::eUnknown)

static void Create3PartyLibs(const list< string > &libs_flags, const list< string > &expected_flags, list< string > *libs_list, const string *mkname=NULL)

list< SMakeInInfo > TMakeInInfoList

static void CreateIncludeDirs(const list< string > &cpp_flags, const string &source_base_dir, list< string > *include_dirs)

static void CreateDefines(const list< string > &cpp_flags, list< string > *defines)

static void AnalyzeMakeIn(const CSimpleMakeFileContents &makein_contents, TMakeInInfoList *info)

static string ExtractConfigurableDefine(const string &define)

static bool HasConfigurableDefine(const string &define)

static void ConvertLibDependsMacro(const list< string > &depends, list< string > &depends_libs)

static string GetOneIncludeDir(const string &flag, const string &token)

static string StripConfigurableDefine(const string &define)

static bool IsMakeInFile(const string &name)

static bool IsMakeLibFile(const string &name)

static CProjItem::TProjType GetProjType(const string &base_dir, const string &projname, SMakeInInfo::TMakeinType type=SMakeInInfo::eUnknown)

static void CreateFullPathes(const string &dir, const list< string > files, list< string > *full_pathes)

static CProjKey DoCreate(const string &source_base_dir, const string &proj_name, const string &applib_mfilepath, const TFiles &makemsvc, CProjectItemsTree *tree, EMakeFileType maketype)

static wxAcceleratorEntry entries[3]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4