summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2004-09-01 17:53:54 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2004-09-01 17:53:54 +0000
commitf2203c2ecc99e39cde4e46cfb3f8fcf5b23ab23c (patch)
tree743427e675650f80744d590b01bac0b5d6b42ed6 /bin
parent66b6391b265057fa4bc7d9d16e717cd1b63f50e9 (diff)
downloadATCD-f2203c2ecc99e39cde4e46cfb3f8fcf5b23ab23c.tar.gz
ChangeLogTag: Wed Sep 1 12:52:40 2004 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'bin')
-rw-r--r--bin/MakeProjectCreator/modules/AutomakeWorkspaceHelper.pm106
1 files changed, 106 insertions, 0 deletions
diff --git a/bin/MakeProjectCreator/modules/AutomakeWorkspaceHelper.pm b/bin/MakeProjectCreator/modules/AutomakeWorkspaceHelper.pm
new file mode 100644
index 00000000000..1d78bd08461
--- /dev/null
+++ b/bin/MakeProjectCreator/modules/AutomakeWorkspaceHelper.pm
@@ -0,0 +1,106 @@
+package AutomakeWorkspaceHelper;
+
+# ************************************************************
+# Description : An Automake Workspace Helper
+# Author : J.T. Conklin
+# Create Date : 9/01/2004
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use FileHandle;
+
+use WorkspaceHelper;
+
+use vars qw(@ISA);
+@ISA = qw(WorkspaceHelper);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub write_settings {
+ my($self) = shift;
+ my($wsc) = shift;
+ my($fh) = shift;
+ my(@locals) = @_;
+ my($status) = 1;
+ my($error) = undef;
+ my($crlf) = $wsc->crlf();
+ my($pfh) = new FileHandle();
+
+ my($seen_ace_root) = 0;
+ my($seen_tao_root) = 0;
+ my($seen_ace_builddir) = 0;
+ my($seen_tao_builddir) = 0;
+ my($seen_tao_idl) = 0;
+
+ foreach my $local (reverse @locals) {
+ if (open($pfh,$local)) {
+ while(<$pfh>) {
+ if (/ACE_ROOT/) {
+ $seen_ace_root = 1;
+ }
+ if (/TAO_ROOT/) {
+ $seen_tao_root = 1;
+ }
+ if (/ACE_BUILDDIR/) {
+ $seen_ace_builddir = 1;
+ }
+ if (/TAO_BUILDDIR/) {
+ $seen_tao_builddir = 1;
+ }
+ if (/TAO_IDL/) {
+ $seen_tao_idl = 1;
+ }
+ }
+
+ close($pfh);
+ }
+ else {
+ $status = 0;
+ $error = "Unable to open $local for reading.";
+ }
+ }
+
+ if ($seen_ace_root || $seen_ace_builddir ||
+ $seen_tao_root || $seen_tao_builddir) {
+
+ if ($seen_ace_root) {
+ if ($seen_tao_root || $seen_tao_builddir) {
+ print $fh "ACE_ROOT = \$(top_srcdir)/..", $crlf;
+ } else {
+ print $fh "ACE_ROOT = \$(top_srcdir)", $crlf;
+ }
+ }
+ if ($seen_ace_builddir) {
+ if ($seen_tao_root || $seen_tao_builddir) {
+ print $fh "ACE_BUILDDIR = \$(top_builddir)/..", $crlf;
+ } else {
+ print $fh "ACE_BUILDDIR = \$(top_builddir)", $crlf;
+ }
+ }
+ if ($seen_tao_root) {
+ print $fh "TAO_ROOT = \$(top_srcdir)", $crlf;
+ }
+ if ($seen_tao_builddir) {
+ print $fh "TAO_BUILDDIR = \$(top_builddir)", $crlf;
+ }
+
+ print $fh $crlf;
+ }
+
+ if ($seen_tao_idl) {
+ print $fh "TAO_IDL = ACE_ROOT=\$(ACE_ROOT) TAO_ROOT=\$(TAO_ROOT) \$(TAO_BUILDDIR)/TAO_IDL/tao_idl", $crlf;
+ print $fh "TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I\$(TAO_ROOT) -I\$(srcdir) -g \$(ACE_BUILDDIR)/apps/gperf/src/gperf", $crlf;
+ print $fh $crlf;
+ }
+
+ return $status, $error;
+}
+
+
+1;