summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2011-09-07 17:29:26 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2011-09-07 17:29:26 +0000
commit57614a21885e304ab6afed3c81b9bf5764ef667b (patch)
treed28eaf49d3cdbae6df8b491c4f76e4a03491d1cb
parenteaf95c025dc9410705104424abcb02b3220ffa6d (diff)
downloadATCD-57614a21885e304ab6afed3c81b9bf5764ef667b.tar.gz
Wed Sep 7 17:27:01 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
* MPC/modules/IDLHelper.pm: * TAO_IDL/be/be_codegen.cpp: * TAO_IDL/be/be_global.cpp: * TAO_IDL/be/be_util.cpp: * TAO_IDL/be_include/be_global.h: Added skel_export_file and stub_export_file to define an explicit filename for these export files that are different than the stub/skel export_include which could be a full path. This fixes bugzilla 3980
-rw-r--r--TAO/ChangeLog11
-rw-r--r--TAO/MPC/modules/IDLHelper.pm16
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp10
-rw-r--r--TAO/TAO_IDL/be/be_global.cpp34
-rw-r--r--TAO/TAO_IDL/be/be_util.cpp22
-rw-r--r--TAO/TAO_IDL/be_include/be_global.h18
6 files changed, 101 insertions, 10 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index ae86766394a..5919a61bb95 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,14 @@
+Wed Sep 7 17:27:01 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * MPC/modules/IDLHelper.pm:
+ * TAO_IDL/be/be_codegen.cpp:
+ * TAO_IDL/be/be_global.cpp:
+ * TAO_IDL/be/be_util.cpp:
+ * TAO_IDL/be_include/be_global.h:
+ Added skel_export_file and stub_export_file to define an explicit
+ filename for these export files that are different than the stub/skel
+ export_include which could be a full path. This fixes bugzilla 3980
+
Tue Sep 6 11:45:16 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
* tao/PortableServer/Servant_Base.h:
diff --git a/TAO/MPC/modules/IDLHelper.pm b/TAO/MPC/modules/IDLHelper.pm
index 21bec3f8ec8..de2ddd8dc3f 100644
--- a/TAO/MPC/modules/IDLHelper.pm
+++ b/TAO/MPC/modules/IDLHelper.pm
@@ -11,11 +11,19 @@ sub get_output {
if ($flags =~ /-Gxhex/ && $flags =~ /-Wb,exec_export_include=(\S*)/) {
push(@out, $1);
}
- if ($flags =~ /-Gxhst/ && $flags =~ /-Wb,stub_export_include=(\S*)/) {
- push(@out, $1);
+ if ($flags =~ /-Gxhst/) {
+ if ($flags =~ /-Wb,stub_export_file=(\S*)/) {
+ push(@out, $1);
+ } elsif ($flags =~ /-Wb,stub_export_include=(\S*)/) {
+ push(@out, $1);
+ }
}
- if ($flags =~ /-Gxhsk/ && $flags =~ /-Wb,skel_export_include=(\S*)/) {
- push(@out, $1);
+ if ($flags =~ /-Gxhsk/) {
+ if ($flags =~ /-Wb,skel_export_file=(\S*)/) {
+ push(@out, $1);
+ } elsif ($flags =~ /-Wb,skel_export_include=(\S*)/) {
+ push(@out, $1);
+ }
}
if ($flags =~ /-Gxhsv/ && $flags =~ /-Wb,svnt_export_include=(\S*)/) {
push(@out, $1);
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index c294d835eb7..b811ca7a72f 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -1976,11 +1976,11 @@ void
TAO_CodeGen::gen_export_files (void)
{
if (be_global->gen_stub_export_hdr_file ()
- && be_global->stub_export_macro () != 0
- && be_global->stub_export_include () != 0)
+ && be_global->stub_export_macro () != 0
+ && (be_global->stub_export_include () != 0 || be_global->stub_export_file () != 0))
{
this->gen_export_file (
- be_global->stub_export_include (),
+ (be_global->stub_export_file () != 0) ? be_global->stub_export_file () : be_global->stub_export_include (),
be_global->stub_export_macro (),
"stub");
}
@@ -1990,7 +1990,7 @@ TAO_CodeGen::gen_export_files (void)
&& be_global->skel_export_include () != 0)
{
this->gen_export_file (
- be_global->skel_export_include (),
+ (be_global->skel_export_file () != 0) ? be_global->skel_export_file () : be_global->skel_export_include (),
be_global->skel_export_macro (),
"skel",
true);
@@ -2335,8 +2335,6 @@ TAO_CodeGen::gen_stub_hdr_includes (void)
this->client_header_
);
- // Conditionally included.
-
// DDS/DCPS zero-copy read sequence type support.
if (idl_global->dcps_support_zero_copy_read ())
{
diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp
index 2234c0eb162..d24446abc8e 100644
--- a/TAO/TAO_IDL/be/be_global.cpp
+++ b/TAO/TAO_IDL/be/be_global.cpp
@@ -39,8 +39,10 @@ BE_GlobalData::BE_GlobalData (void)
: changing_standard_include_files_ (1),
skel_export_macro_ (0),
skel_export_include_ (0),
+ skel_export_file_ (0),
stub_export_macro_ (0),
stub_export_include_ (0),
+ stub_export_file_ (0),
anyop_export_macro_ (0),
anyop_export_include_ (0),
exec_export_macro_ (0),
@@ -787,6 +789,19 @@ BE_GlobalData::skel_export_include (const char *s)
}
const char*
+BE_GlobalData::skel_export_file (void) const
+{
+ return this->skel_export_file_;
+}
+
+void
+BE_GlobalData::skel_export_file (const char *s)
+{
+ ACE::strdelete (this->skel_export_file_);
+ this->skel_export_file_ = ACE::strnew (s);
+}
+
+const char*
BE_GlobalData::stub_export_macro (void) const
{
if (this->stub_export_macro_ == 0)
@@ -818,6 +833,19 @@ BE_GlobalData::stub_export_include (const char *s)
}
const char*
+BE_GlobalData::stub_export_file (void) const
+{
+ return this->stub_export_file_;
+}
+
+void
+BE_GlobalData::stub_export_file (const char *s)
+{
+ ACE::strdelete (this->stub_export_file_);
+ this->stub_export_file_ = ACE::strnew (s);
+}
+
+const char*
BE_GlobalData::anyop_export_macro (void) const
{
if (this->anyop_export_macro_ == 0)
@@ -1857,12 +1885,18 @@ BE_GlobalData::destroy (void)
ACE::strdelete (this->skel_export_include_);
this->skel_export_include_ = 0;
+ ACE::strdelete (this->skel_export_file_);
+ this->skel_export_file_ = 0;
+
ACE::strdelete (this->stub_export_macro_);
this->stub_export_macro_ = 0;
ACE::strdelete (this->stub_export_include_);
this->stub_export_include_ = 0;
+ ACE::strdelete (this->stub_export_file_);
+ this->stub_export_file_ = 0;
+
ACE::strdelete (this->anyop_export_macro_);
this->anyop_export_macro_ = 0;
diff --git a/TAO/TAO_IDL/be/be_util.cpp b/TAO/TAO_IDL/be/be_util.cpp
index 7bce09bc700..a3dd1bf7e12 100644
--- a/TAO/TAO_IDL/be/be_util.cpp
+++ b/TAO/TAO_IDL/be/be_util.cpp
@@ -129,8 +129,10 @@ be_util::prep_be_arg (char *s)
static const char arg_include[] = "export_include=";
static const char skel_arg_macro[] = "skel_export_macro=";
static const char skel_arg_include[] = "skel_export_include=";
+ static const char skel_arg_file[] = "skel_export_file=";
static const char stub_arg_macro[] = "stub_export_macro=";
static const char stub_arg_include[] = "stub_export_include=";
+ static const char stub_arg_file[] = "stub_export_file=";
static const char anyop_arg_macro[] = "anyop_export_macro=";
static const char anyop_arg_include[] = "anyop_export_include=";
static const char exec_arg_macro[] = "exec_export_macro=";
@@ -180,6 +182,11 @@ be_util::prep_be_arg (char *s)
char* val = arg + sizeof (skel_arg_include) - 1;
be_global->skel_export_include (val);
}
+ else if (ACE_OS::strstr (arg, skel_arg_file) == arg)
+ {
+ char* val = arg + sizeof (skel_arg_file) - 1;
+ be_global->skel_export_file (val);
+ }
else if (ACE_OS::strstr (arg, stub_arg_macro) == arg)
{
char* val = arg + sizeof (stub_arg_macro) - 1;
@@ -190,6 +197,11 @@ be_util::prep_be_arg (char *s)
char* val = arg + sizeof (stub_arg_include) - 1;
be_global->stub_export_include (val);
}
+ else if (ACE_OS::strstr (arg, stub_arg_file) == arg)
+ {
+ char* val = arg + sizeof (stub_arg_file) - 1;
+ be_global->stub_export_file (val);
+ }
else if (ACE_OS::strstr (arg, anyop_arg_macro) == arg)
{
char* val = arg + sizeof (anyop_arg_macro) - 1;
@@ -387,6 +399,11 @@ be_util::usage (void)
));
ACE_DEBUG ((
LM_DEBUG,
+ ACE_TEXT (" -Wb,stub_export_file=<filename>\t\tsets export ")
+ ACE_TEXT ("file for client only\n")
+ ));
+ ACE_DEBUG ((
+ LM_DEBUG,
ACE_TEXT (" -Wb,skel_export_macro=<macro name>\t\tsets export ")
ACE_TEXT ("macro for server files only\n")
));
@@ -397,6 +414,11 @@ be_util::usage (void)
));
ACE_DEBUG ((
LM_DEBUG,
+ ACE_TEXT (" -Wb,skel_export_file=<include path>\t\tsets export ")
+ ACE_TEXT ("file for server only\n")
+ ));
+ ACE_DEBUG ((
+ LM_DEBUG,
ACE_TEXT (" -Wb,anyop_export_macro=<macro name>\t\tsets export macro ")
ACE_TEXT ("for typecode/Any operator files only, when -GA option ")
ACE_TEXT ("is used\n")
diff --git a/TAO/TAO_IDL/be_include/be_global.h b/TAO/TAO_IDL/be_include/be_global.h
index a7c0397d4ed..cdb382f7526 100644
--- a/TAO/TAO_IDL/be_include/be_global.h
+++ b/TAO/TAO_IDL/be_include/be_global.h
@@ -255,6 +255,14 @@ public:
//// export macro definition.
void skel_export_include (const char* s);
+ //// Returns the name of the include file that will be generated for the
+ //// server side export macro definition.
+ const char* skel_export_file (void) const;
+
+ //// Set the name of the include file that the will be generated for server
+ //// side export macro definition.
+ void skel_export_file (const char* s);
+
//// Returns the macro name for exporting client side classes in Win32
//// DLL.
const char* stub_export_macro (void) const;
@@ -270,6 +278,14 @@ public:
//// export macro definition.
void stub_export_include (const char* s);
+ //// Returns the name of the include file will be generated for the client
+ //// side export macro definition.
+ const char* stub_export_file (void) const;
+
+ //// Set the name of the include file that will be generated for the client
+ //// side export macro definition.
+ void stub_export_file (const char* s);
+
//// Returns the macro name for exporting *A.h file classes in Win32
//// DLL.
const char* anyop_export_macro (void) const;
@@ -883,8 +899,10 @@ private:
// Macros and includes used to export classes from generated code.
char* skel_export_macro_;
char* skel_export_include_;
+ char* skel_export_file_;
char* stub_export_macro_;
char* stub_export_include_;
+ char* stub_export_file_;
// Macro and include used on ORB .pidl files generating to the
// AnyTypeCode library.