diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-08-15 18:11:01 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-08-15 18:11:01 +0000 |
commit | a143991b6164d2542032715930561f8a405cf39a (patch) | |
tree | f75818d92e7a3f3a21656a801b43f8896ab02449 /TAO/TAO_IDL | |
parent | 6b44bb0fce4cf915431c3f1474c96b492881e7a8 (diff) | |
download | ATCD-a143991b6164d2542032715930561f8a405cf39a.tar.gz |
ChangeLogTag: Tue Aug 15 17:57:20 UTC 2006 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/driver/drv_preproc.cpp | 75 |
1 files changed, 67 insertions, 8 deletions
diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp index 1c53f961768..bd95dc82e02 100644 --- a/TAO/TAO_IDL/driver/drv_preproc.cpp +++ b/TAO/TAO_IDL/driver/drv_preproc.cpp @@ -463,9 +463,11 @@ DRV_cpp_post_init (void) ACE_OS::strcpy (option4, "-I"); ACE_OS::strcpy (option5, "-I"); - char* TAO_ROOT = ACE_OS::getenv ("TAO_ROOT"); size_t len = 0; + // Add include path for TAO_ROOT/orbsvcs. + char* TAO_ROOT = ACE_OS::getenv ("TAO_ROOT"); + if (TAO_ROOT != 0) { len = ACE_OS::strlen (TAO_ROOT); @@ -477,20 +479,79 @@ DRV_cpp_post_init (void) } ACE_OS::strcat (option3, TAO_ROOT); +#if defined (ACE_WIN32) + ACE_OS::strcat (option3, "\\orbsvcs"); +#else + ACE_OS::strcat (option3, "/orbsvcs"); +#endif + } + else + { + // If TAO_ROOT isn't defined, assume it's under ACE_ROOT. + char* ACE_ROOT = ACE_OS::getenv ("ACE_ROOT"); + + if (ACE_ROOT != 0) + { + len = ACE_OS::strlen (ACE_ROOT); + + // Some compilers choke on "//" separators. + if (ACE_ROOT[len - 1] == '/') + { + ACE_ROOT[len - 1] = '\0'; + } + + ACE_OS::strcat (option3, ACE_ROOT); +#if defined (ACE_WIN32) + ACE_OS::strcat (option3, "\\TAO\\orbsvcs"); +#else + ACE_OS::strcat (option3, "/TAO/orbsvcs"); +#endif + } + else + { + // If ACE_ROOT isn't defined either, there will already + // be a warning from DRV_preproc(). + ACE_OS::strcat (option3, "."); + } + } + + // Add include paths for CIAO_ROOT and CIAO_ROOT/ciao. + char* CIAO_ROOT = ACE_OS::getenv ("CIAO_ROOT"); + + if (CIAO_ROOT != 0) + { + len = ACE_OS::strlen (CIAO_ROOT); + + // Some compilers choke on "//" separators. + if (CIAO_ROOT[len - 1] == '/') + { + CIAO_ROOT[len - 1] = '\0'; + } + + ACE_OS::strcat (option4, CIAO_ROOT); + ACE_OS::strcat (option5, CIAO_ROOT); +#if defined (ACE_WIN32) + ACE_OS::strcat (option5, "\\ciao"); +#else + ACE_OS::strcat (option5, "/ciao"); +#endif + } + else if (TAO_ROOT != 0) + { + // If CIAO_ROOT hasn't been set, maybe it's nested under TAO_ROOT. ACE_OS::strcat (option4, TAO_ROOT); ACE_OS::strcat (option5, TAO_ROOT); #if defined (ACE_WIN32) - ACE_OS::strcat (option3, "\\orbsvcs"); ACE_OS::strcat (option4, "\\CIAO"); ACE_OS::strcat (option5, "\\CIAO\\ciao"); #else - ACE_OS::strcat (option3, "/orbsvcs"); ACE_OS::strcat (option4, "/CIAO"); ACE_OS::strcat (option5, "/CIAO/ciao"); #endif } else { + // If TAO_ROOT hasn't been set, try ACE_ROOT. char* ACE_ROOT = ACE_OS::getenv ("ACE_ROOT"); if (ACE_ROOT != 0) @@ -503,22 +564,20 @@ DRV_cpp_post_init (void) ACE_ROOT[len - 1] = '\0'; } - ACE_OS::strcat (option3, ACE_ROOT); ACE_OS::strcat (option4, ACE_ROOT); ACE_OS::strcat (option5, ACE_ROOT); #if defined (ACE_WIN32) - ACE_OS::strcat (option3, "\\TAO\\orbsvcs"); ACE_OS::strcat (option4, "\\TAO\\CIAO"); ACE_OS::strcat (option5, "\\TAO\\CIAO\\ciao"); #else - ACE_OS::strcat (option3, "/TAO/orbsvcs"); ACE_OS::strcat (option4, "/TAO/CIAO"); ACE_OS::strcat (option5, "/TAO/CIAO/ciao"); #endif } else { - ACE_OS::strcat (option3, "."); + // If ACE_ROOT isn't defined either, there will already + // be a warning from DRV_preproc(). ACE_OS::strcat (option4, "."); ACE_OS::strcat (option5, "."); } @@ -1250,7 +1309,7 @@ DRV_pre_proc (const char *myfile) } #if !defined (ACE_WIN32) || defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0) - + if (ACE_OS::unlink (t_file) == -1) { ACE_ERROR ((LM_ERROR, |