diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-03-18 13:26:56 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-03-18 13:26:56 +0000 |
commit | e4168f4c8bfc4aa99c3114638f1cdd5888a7ce9b (patch) | |
tree | f01fdc2a1f5b3dd80634a3c3633c8118d05eb789 | |
parent | 0d81e863fd4a77c92ad5dde9f879baecf86a30a6 (diff) | |
download | ATCD-e4168f4c8bfc4aa99c3114638f1cdd5888a7ce9b.tar.gz |
ChangeLogTag: Tue Mar 18 07:24:26 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/ProjectCreator.pm | 34 |
2 files changed, 43 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index babb12704a9..209c316318d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Tue Mar 18 07:24:26 2003 Chad Elliott <elliott_c@ociweb.com> + + * bin/MakeProjectCreator/modules/ProjectCreator.pm: + + If files are listed in "Template_Files" and "Source_Files" is + omitted, then "Source_Files" could have duplicated values from + "Template_Files". A new method has been added to correct this + situation. + Mon Mar 17 17:38:05 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> * include/makeinclude/platform_linux_icc.GNU: The GNU file can now diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm index 9b09f1db52c..87b092d863e 100644 --- a/bin/MakeProjectCreator/modules/ProjectCreator.pm +++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm @@ -996,6 +996,36 @@ sub generate_default_components { } +sub remove_duplicated_files { + my($self) = shift; + my($dest) = shift; + my($source) = shift; + my($names) = $self->{$dest}; + my(@slist) = $self->get_component_list($source); + + ## Find out which source files are listed + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + foreach my $key (keys %$comps) { + my($array) = $$comps{$key}; + my($count) = scalar(@$array); + for(my $i = 0; $i < $count; ++$i) { + foreach my $sfile (@slist) { + ## Is the source file is in the component array? + if ($$array[$i] eq $sfile) { + ## Remove the element and fix the index and count + splice(@$array, $i, 1); + --$count; + --$i; + last; + } + } + } + } + } +} + + sub generated_source_extensions { my($self) = shift; my($tag) = shift; @@ -1182,6 +1212,10 @@ sub generate_defaults { ## are skipped in the initial default components generation $self->generate_default_components(\@files); + ## Remove source files that are also listed in the template files + ## If we do not do this, then generated projects can be invalid. + $self->remove_duplicated_files('source_files', 'template_files'); + ## Generate the default idl generated list of source files ## only if we defaulted the idl file list $self->generate_default_idl_generated(['source_files']); |