summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-04-10 19:15:04 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-04-10 19:15:04 +0000
commitf836d3b4d2a565fe513cf9a6f21c96a563e5c244 (patch)
tree0425084a65815d50d1a882e2c22d846c59ff9742
parent1cec688815cf403dfb1ef8b7ac21749ac1a8586e (diff)
downloadATCD-f836d3b4d2a565fe513cf9a6f21c96a563e5c244.tar.gz
ChangeLogTag: Thu Apr 10 14:14:17 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog23
-rw-r--r--bin/MakeProjectCreator/modules/Creator.pm93
-rw-r--r--bin/MakeProjectCreator/modules/ProjectCreator.pm37
-rw-r--r--bin/MakeProjectCreator/modules/WorkspaceCreator.pm87
-rw-r--r--bin/MakeProjectCreator/templates/gnu.mpd5
5 files changed, 173 insertions, 72 deletions
diff --git a/ChangeLog b/ChangeLog
index 694fa3e8cb7..35336e77814 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Apr 10 14:14:17 2003 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/MakeProjectCreator/modules/Creator.pm:
+ * bin/MakeProjectCreator/modules/ProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/WorkspaceCreator.pm:
+
+ Allow assignments that are specific to a particular project type.
+
+ * bin/MakeProjectCreator/templates/gnu.mpd:
+
+ Fixed a bug in the template where 'libs' is not used but
+ 'lit_libs' is. The 'lit_libs' wouldn't show up.
+
Thu Apr 10 15:35:00 2003 Gautam Thaker <gthaker@atl.lmco.com>
* ace/Makefile.ace ace/OS.h ace/SOCK_Connector.cpp:
@@ -11,7 +24,7 @@ Thu Apr 10 15:35:00 2003 Gautam Thaker <gthaker@atl.lmco.com>
* include/makeinclude/wrapper_macros.GNU:
Above files modified.
-
+
* ace/Multihomed_INET_Addr.cpp ace/Multihomed_INET_Addr.h:
* ace/Multihomed_INET_Addr.i ace/SOCK_SEQPACK_Acceptor.cpp:
* ace/SOCK_SEQPACK_Acceptor.i ace/SOCK_SEQPACK_Association.cpp:
@@ -77,12 +90,12 @@ Thu Apr 10 06:52:41 2003 Chad Elliott <elliott_c@ociweb.com>
Thu Apr 10 13:02:42 CEST 2003 Oliver Kellogg <oliver.kellogg@sysde.eads.net>
- * tests/tests.{dsw,icp}: Added Unbounded_Set_Test_Ex.
+ * tests/tests.{dsw,icp}: Added Unbounded_Set_Test_Ex.
- * tests/Unbounded_Set_Test_Ex.{dsp,icc}: New.
+ * tests/Unbounded_Set_Test_Ex.{dsp,icc}: New.
- Please bear with me, these changes were made "blindly", i.e.
- I don't have access to those build environments.
+ Please bear with me, these changes were made "blindly", i.e.
+ I don't have access to those build environments.
Thu Apr 10 09:51:59 2003 Johnny Willemsen <jwillemsen@remedy.nl>
diff --git a/bin/MakeProjectCreator/modules/Creator.pm b/bin/MakeProjectCreator/modules/Creator.pm
index 552f414012a..c1400ddaceb 100644
--- a/bin/MakeProjectCreator/modules/Creator.pm
+++ b/bin/MakeProjectCreator/modules/Creator.pm
@@ -277,6 +277,66 @@ sub parse_known {
}
+sub parse_scope {
+ my($self) = shift;
+ my($fh) = shift;
+ my($name) = shift;
+ my($type) = shift;
+ my($validNames) = shift;
+ my($flags) = shift;
+ my($status) = 0;
+ my($errorString) = "ERROR: Unable to process $name";
+
+ if (!defined $flags) {
+ $flags = {};
+ }
+
+ while(<$fh>) {
+ my($line) = $self->strip_line($_);
+
+ if ($line eq '') {
+ }
+ elsif ($line =~ /^}/) {
+ $status = 1;
+ $errorString = '';
+ $self->handle_scoped_end($type, $flags);
+ last;
+ }
+ else {
+ my(@values) = ();
+ if ($self->parse_assignment($line, \@values)) {
+ if (defined $$validNames{$values[1]}) {
+ if ($values[0] eq 'assignment') {
+ $self->process_assignment($values[1], $values[2], $flags);
+ }
+ elsif ($values[0] eq 'assign_add') {
+ $self->process_assignment_add($values[1], $values[2], $flags);
+ }
+ elsif ($values[0] eq 'assign_sub') {
+ $self->process_assignment_sub($values[1], $values[2], $flags);
+ }
+ }
+ else {
+ $status = 0;
+ $errorString = "ERROR: Invalid assignment name: $values[1]";
+ last;
+ }
+ }
+ else {
+ ($status, $errorString) = $self->handle_scoped_unknown($fh,
+ $type,
+ $flags,
+ $line);
+ if (!$status) {
+ last;
+ }
+ }
+ }
+ }
+ return $status, $errorString;
+}
+
+
sub base_directory {
my($self) = shift;
return basename($self->getcwd());
@@ -419,6 +479,7 @@ sub process_assignment_add {
my($value) = shift;
my($assign) = shift;
my($nval) = $self->get_assignment($name, $assign);
+
if (defined $nval) {
$nval = "$value $nval";
}
@@ -550,10 +611,17 @@ sub get_files_written {
sub get_assignment {
- my($self) = shift;
- my($name) = shift;
- my($tag) = ($self->{'reading_global'} ? 'global_assign' : 'assign');
- return $self->{$tag}->{$name};
+ my($self) = shift;
+ my($name) = shift;
+ my($assign) = shift;
+
+ ## If no hash table was passed in
+ if (!defined $assign) {
+ my($tag) = ($self->{'reading_global'} ? 'global_assign' : 'assign');
+ $assign = $self->{$tag};
+ }
+
+ return $$assign{$name};
}
@@ -578,6 +646,23 @@ sub get_static {
# Virtual Methods To Be Overridden
# ************************************************************
+sub handle_scoped_end {
+ #my($self) = shift;
+ #my($type) = shift;
+ #my($flags) = shift;
+}
+
+
+sub handle_scoped_unknown {
+ my($self) = shift;
+ my($fh) = shift;
+ my($type) = shift;
+ my($flags) = shift;
+ my($line) = shift;
+ return 0, "ERROR: Unrecognized line: $line";
+}
+
+
sub process_duplicate_modification {
#my($self) = shift;
#my($name) = shift;
diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm
index 1af95d62fae..112e6f75fe5 100644
--- a/bin/MakeProjectCreator/modules/ProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm
@@ -128,6 +128,8 @@ sub new {
$self->{'valid_components'} = \%vc;
$self->{'exclude_components'} = \%ec;
$self->{'skeleton_endings'} = [ 'C', 'S' ];
+ $self->{'type_specific_assign'} = {};
+ $self->{'pctype'} = $self->extractType("$self");
## Allow subclasses to override the default extensions
$self->set_component_extensions();
@@ -177,6 +179,14 @@ sub parse_line {
## Fill in all the default values
$self->generate_defaults();
+ ## Fill in type specific assignments
+ my($tsa) = $self->{'type_specific_assign'}->{$self->{'pctype'}};
+ if (defined $tsa) {
+ foreach my $key (keys %$tsa) {
+ $self->process_assignment_add($key, $$tsa{$key});
+ }
+ }
+
## Perform any additions, subtractions
## or overrides for the project values.
my($addproj) = $self->get_addproj();
@@ -209,6 +219,7 @@ sub parse_line {
}
$self->{'assign'} = {};
$self->{'verbatim'} = {};
+ $self->{'type_specific_assign'} = {};
}
}
$self->{$typecheck} = 0;
@@ -349,6 +360,11 @@ sub parse_line {
$status = 0;
}
}
+ elsif ($comp eq 'specific') {
+ ($status, $errorString) = $self->parse_scope(
+ $ih, $values[1], $values[2], \%validNames,
+ $self->{'type_specific_assign'}->{$self->{'pctype'}});
+ }
else {
$errorString = "ERROR: Invalid component name: $comp";
$status = 0;
@@ -517,6 +533,22 @@ sub parse_verbatim {
}
+sub handle_scoped_end {
+ my($self) = shift;
+ my($type) = shift;
+ my($flags) = shift;
+
+ if (defined $self->{'type_specific_assign'}->{$type}) {
+ foreach my $key (keys %$flags) {
+ $self->{'type_specific_assign'}->{$type}->{$key} = $$flags{$key};
+ }
+ }
+ else {
+ $self->{'type_specific_assign'}->{$type} = $flags;
+ }
+}
+
+
sub process_duplicate_modification {
my($self) = shift;
my($name) = shift;
@@ -1284,7 +1316,7 @@ sub need_to_write_project {
}
}
}
-
+
return 0;
}
@@ -1490,9 +1522,8 @@ sub update_project_info {
sub get_verbatim {
my($self) = shift;
my($marker) = shift;
- my($type) = $self->extractType("$self");
my($str) = undef;
- my($thash) = $self->{'verbatim'}->{$type};
+ my($thash) = $self->{'verbatim'}->{$self->{'pctype'}};
if (defined $thash) {
if (defined $thash->{$marker}) {
diff --git a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
index 55e6409bf61..2901fdac8b9 100644
--- a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
@@ -189,7 +189,10 @@ sub parse_line {
}
}
elsif ($values[0] eq 'component') {
- ($status, $errorString) = $self->parse_scope($ih, $values[1]);
+ ($status, $errorString) = $self->parse_scope($ih,
+ $values[1],
+ $values[2],
+ \%validNames);
}
else {
$errorString = "ERROR: Unrecognized line: $line";
@@ -205,68 +208,34 @@ sub parse_line {
}
-sub parse_scope {
- my($self) = shift;
- my($fh) = shift;
- my($name) = shift;
- my($status) = 0;
- my($errorString) = "ERROR: Unable to process $name";
- my(%flags) = ();
-
- while(<$fh>) {
- my($line) = $self->strip_line($_);
-
- if ($line eq '') {
- }
- elsif ($line =~ /^}/) {
- $status = 1;
- $errorString = '';
- last;
+sub handle_scoped_unknown {
+ my($self) = shift;
+ my($fh) = shift;
+ my($type) = shift;
+ my($flags) = shift;
+ my($line) = shift;
+
+ if (-e $line) {
+ if (-d $line) {
+ ## This would be too hard to track which files
+ ## got the scoped assignments, so we ignore these.
+ print "WARNING: Scoped directory " .
+ "assignments will be ignored: $line\n";
}
else {
- my(@values) = ();
- if ($self->parse_assignment($line, \@values)) {
- if (defined $validNames{$values[1]}) {
- if ($values[0] eq 'assignment') {
- $self->process_assignment($values[1], $values[2], \%flags);
- }
- elsif ($values[0] eq 'assign_add') {
- $self->process_assignment_add($values[1], $values[2], \%flags);
- }
- elsif ($values[0] eq 'assign_sub') {
- $self->process_assignment_sub($values[1], $values[2], \%flags);
- }
- }
- else {
- $status = 0;
- $errorString = "ERROR: Invalid assignment name: $values[1]";
- last;
- }
- }
- else {
- if (-e $line) {
- if (-d $line) {
- ## This would be too hard to track which files
- ## got the scoped assignments, so we ignore these.
- print "WARNING: Scoped directory " .
- "assignments will be ignored: $line\n";
- }
- else {
- ## Assignment store
- $self->{'scoped_assign'}->{$line} = \%flags;
- }
- }
- else {
- ## We couldn't determine if it was an mpc file or
- ## a directory, so we ignore these.
- print "WARNING: Scoped file does not " .
- "exist, so assignments will be ignored: $line\n";
- }
- push(@{$self->{'project_files'}}, $line);
- }
+ ## Assignment store
+ $self->{'scoped_assign'}->{$line} = $flags;
}
}
- return $status, $errorString;
+ else {
+ ## We couldn't determine if it was an mpc file or
+ ## a directory, so we ignore these.
+ print "WARNING: Scoped file does not " .
+ "exist, so assignments will be ignored: $line\n";
+ }
+ push(@{$self->{'project_files'}}, $line);
+
+ return 1, '';
}
diff --git a/bin/MakeProjectCreator/templates/gnu.mpd b/bin/MakeProjectCreator/templates/gnu.mpd
index 8894deb93b1..a92d2dc9aa8 100644
--- a/bin/MakeProjectCreator/templates/gnu.mpd
+++ b/bin/MakeProjectCreator/templates/gnu.mpd
@@ -208,7 +208,10 @@ TAO_IDLFLAGS += <%idlflags%>
<%endif%>
<%if(libs)%>
-<%if(exename)%>LDLIBS<%endif%><%if(sharedname)%>ACE_SHLIBS<%endif%> =<%foreach(libs lit_libs)%> -l<%lib%><%endfor%><%if(sharedname)%> $(ACELIB)<%endif%>
+<%if(exename)%>LDLIBS<%endif%><%if(sharedname)%>ACE_SHLIBS<%endif%> =<%foreach(libs)%> -l<%lib%><%endfor%><%if(sharedname)%> $(ACELIB)<%endif%>
+<%endif%>
+<%if(lit_libs)%>
+<%if(exename)%>LDLIBS<%endif%><%if(sharedname)%>ACE_SHLIBS<%endif%> +=<%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%if(sharedname)%> $(ACELIB)<%endif%>
<%endif%>
<%if(ssl)%>
<%if(exename)%>LDLIBS<%endif%><%if(sharedname)%>ACE_SHLIBS<%endif%> +=<%foreach(ssl_libs)%> -l<%ssl_lib%><%endfor%>