summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2005-08-11 18:31:07 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2005-08-11 18:31:07 +0000
commitd3ae0d2fe362ecba930f9ba86cb45b6bccc300c9 (patch)
treebb18ddba2bb232ced3a1bd481343914d5eb2891d
parentdf43c1fcf61898c1c5a892078dee3ca77f62d626 (diff)
downloadMPC-d3ae0d2fe362ecba930f9ba86cb45b6bccc300c9.tar.gz
ChangeLogTag: Thu Aug 11 13:30:07 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog7
-rw-r--r--modules/ProjectCreator.pm50
2 files changed, 51 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 425e1bc7..46bdd81c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Aug 11 13:30:07 2005 Chad Elliott <elliott_c@ociweb.com>
+
+ * modules/ProjectCreator.pm:
+
+ Fixed a bug where a directory used as input for a custom file type
+ would not result in any input files when automatic is set to zero.
+
Thu Aug 11 06:42:33 2005 Chad Elliott <elliott_c@ociweb.com>
* README:
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 99a1bfd9..94770ce5 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -2401,6 +2401,24 @@ sub sift_files {
}
+sub sift_default_file_list {
+ my($self) = shift;
+ my($tag) = shift;
+ my($file) = shift;
+ my($built) = shift;
+ my($exts) = shift;
+ my($recurse) = shift;
+ my($pchh) = shift;
+ my($pchc) = shift;
+ my($alldir) = $recurse ||
+ $self->{'flag_overrides'}->{$tag}->{$file}->{'recurse'};
+ my(@gen) = $self->generate_default_file_list($file, [], $alldir);
+
+ $self->sift_files(\@gen, $exts, $pchh, $pchc, $tag, $built, $alldir);
+
+}
+
+
sub generate_default_components {
my($self) = shift;
my($files) = shift;
@@ -2433,12 +2451,8 @@ sub generate_default_components {
my(@built) = ();
foreach my $file (@$array) {
if (-d $file) {
- my($alldir) = $recurse ||
- $self->{'flag_overrides'}->{$tag}->{$file}->{'recurse'};
- my(@gen) = $self->generate_default_file_list(
- $file, [], $alldir);
- $self->sift_files(\@gen, $exts, $pchh,
- $pchc, $tag, \@built, $alldir);
+ $self->sift_default_file_list($tag, $file, \@built,
+ $exts, $recurse, $pchh, $pchc);
}
else {
if (!$self->already_added(\@built, $file)) {
@@ -3382,7 +3396,31 @@ sub get_custom_value {
my($value) = undef;
if ($cmd eq 'input_files') {
+ ## Get the component list for the component type
my(@array) = $self->get_component_list($based);
+
+ ## Check for directories in the component list. If the component
+ ## type is not automatic, we may have directories here and will need
+ ## to get the file list for that type.
+ my($once) = undef;
+ for(my $i = 0; $i <= $#array; ++$i) {
+ if (-d $array[$i]) {
+ if (!defined $once) {
+ $once = {'recurse' => $self->get_assignment('recurse'),
+ 'pchh' => $self->get_assignment('pch_header'),
+ 'pchc' => $self->get_assignment('pch_source'),
+ };
+ }
+ my(@built) = ();
+ $self->sift_default_file_list($based, $array[$i], \@built,
+ $self->{'valid_components'}->{$based},
+ $$once{'recurse'},
+ $$once{'pchh'}, $$once{'pchc'});
+ splice(@array, $i, 1, @built);
+ $i += $#built;
+ }
+ }
+
$value = \@array;
$self->{'custom_output_files'} = {};