diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2004-09-29 14:41:58 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2004-09-29 14:41:58 +0000 |
commit | 397b6b1b51b20b88fdf57590cd08670a44547aa8 (patch) | |
tree | 50504a29d77b1772f96e11eceb4b2ee93d0a9d8d /bin | |
parent | ce392baf309edb4f2583db3f8508a2191df7e258 (diff) | |
download | ATCD-397b6b1b51b20b88fdf57590cd08670a44547aa8.tar.gz |
ChangeLogTag: Wed Sep 29 09:41:02 2004 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/MakeProjectCreator/modules/AutomakeWorkspaceHelper.pm | 83 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm | 11 |
2 files changed, 42 insertions, 52 deletions
diff --git a/bin/MakeProjectCreator/modules/AutomakeWorkspaceHelper.pm b/bin/MakeProjectCreator/modules/AutomakeWorkspaceHelper.pm index 1d78bd08461..e84e4939bd4 100644 --- a/bin/MakeProjectCreator/modules/AutomakeWorkspaceHelper.pm +++ b/bin/MakeProjectCreator/modules/AutomakeWorkspaceHelper.pm @@ -2,7 +2,7 @@ package AutomakeWorkspaceHelper; # ************************************************************ # Description : An Automake Workspace Helper -# Author : J.T. Conklin +# Author : Chad Elliott # Create Date : 9/01/2004 # ************************************************************ @@ -19,6 +19,23 @@ use vars qw(@ISA); @ISA = qw(WorkspaceHelper); # ************************************************************ +# Data Section +# ************************************************************ + +my(%vals) = ('ACE_ROOT' => '$(top_srcdir)', + 'TAO_ROOT' => '$(top_srcdir)', + 'ACE_BUILDDIR' => '$(top_builddir)', + 'TAO_BUILDDIR' => '$(top_builddir)', + 'TAO_IDL' => '$(ACE_ROOT) TAO_ROOT=$(TAO_ROOT) $(TAO_BUILDDIR)/TAO_IDL/tao_idl' . "\n" . + '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', + ); +my(%addon) = ('ACE_ROOT' => {'TAO_ROOT' => '/..', + 'TAO_BUILDDIR' => '/..'}, + 'ACE_BUILDDIR' => {'TAO_ROOT' => '/..', + 'TAO_BUILDDIR' => '/..'}, + ); + +# ************************************************************ # Subroutine Section # ************************************************************ @@ -31,33 +48,17 @@ sub write_settings { 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; + my(%seen) = (); foreach my $local (reverse @locals) { - if (open($pfh,$local)) { + 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; + foreach my $key (keys %vals) { + if (/$key/) { + $seen{$key} = $vals{$key}; + } } } - close($pfh); } else { @@ -66,38 +67,20 @@ sub write_settings { } } - 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; + foreach my $key (sort keys %seen) { + print $fh "$key = $seen{$key}"; + if (defined $addon{$key}) { + foreach my $add (keys %{$addon{$key}}) { + if ($seen{$add}) { + print $fh $addon{$key}->{$add}; + last; + } } } - 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; - } + print $fh $crlf; return $status, $error; } diff --git a/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm index a2c19cf6d14..586dc8aa9a7 100644 --- a/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm +++ b/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm @@ -20,6 +20,12 @@ use vars qw(@ISA); @ISA = qw(WorkspaceCreator); # ************************************************************ +# Data Section +# ************************************************************ + +my($base) = 'GNUmakefile'; + +# ************************************************************ # Subroutine Section # ************************************************************ @@ -31,7 +37,7 @@ sub generate_implicit_project_dependencies { sub workspace_file_name { my($self) = shift; - return $self->get_modified_workspace_name('GNUmakefile', ''); + return $self->get_modified_workspace_name($base, ''); } @@ -59,7 +65,8 @@ sub pre_workspace { "# $0 @ARGV", $crlf, '#', $crlf, '#-------------------------------------------------------------------------', $crlf, - 'MAKEFILE = ', $self->get_current_output_name(), $crlf; + 'MAKEFILE = ', $self->get_modified_workspace_name($base, '', 1), + $crlf; } |