Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / apps / soreduce / soreduce.cpp
blobfbcc50d86fc1bd0830f168c2a49aae38f581698d
1 // File: soreduce.cpp
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
11 // imported names
12 // 4. Repeat the following steps until no entries remain in the list of
13 // imports
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
20 // of exported names.
21 // 4.5 go to step 4.1
22 // 5. construct a new makefile for all required modules.
24 // Currently works only with GNU nm
26 #include <ace/Log_Msg.h>
28 #include "SO_Group.h"
30 int
31 ACE_TMAIN (int argc, ACE_TCHAR *argv[])
33 SO_Group group;
35 ACE_DEBUG ((LM_DEBUG, "discovering libraries\n"));
37 for (int i = 1; i < argc; group.add_executable (argv[i++]))
39 // No action.
42 ACE_DEBUG ((LM_DEBUG, "loading object modules\n"));
43 group.load_modules ();
44 group.list_libs ();
46 ACE_DEBUG ((LM_DEBUG, "Starting analysis\n"));
47 group.analize ();
49 ACE_DEBUG ((LM_DEBUG, "Writing results\n"));
50 group.write_results ();
52 ACE_DEBUG ((LM_DEBUG, "Done.\n"));
53 return 0;