3 // Author: Phil Mesnier
5 // theory of operation:
6 // 1. Build a complete set of applications
7 // 2. apply "nm" to each of the .o files that make up the libraries to subset
8 // filter the results into two files for each, one with exported names, the
9 // other with imported names.
10 // 3. apply "nm" to all of the elements which use ace & tao. build a list of
12 // 4. Repeat the following steps until no entries remain in the list of
14 // 4.1 Take a name from the list of imports, locate the module containing the
15 // export of that name
16 // 4.2 Add the exporting module to the list of required modules, add its list
17 // of exports to the list of resolved exports, add its imported names to
18 // the list of imports.
19 // 4.4 Traverse the list of imported names to eliminate any found in the list
22 // 5. construct a new makefile for all required modules.
24 // Currently works only with GNU nm
26 #include <ace/Log_Msg.h>
31 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
35 ACE_DEBUG ((LM_DEBUG
, "discovering libraries\n"));
37 for (int i
= 1; i
< argc
; group
.add_executable (argv
[i
++]))
42 ACE_DEBUG ((LM_DEBUG
, "loading object modules\n"));
43 group
.load_modules ();
46 ACE_DEBUG ((LM_DEBUG
, "Starting analysis\n"));
49 ACE_DEBUG ((LM_DEBUG
, "Writing results\n"));
50 group
.write_results ();
52 ACE_DEBUG ((LM_DEBUG
, "Done.\n"));