summaryrefslogtreecommitdiff
path: root/modules/AutomakeWorkspaceCreator.pm
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2007-08-08 12:28:39 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2007-08-08 12:28:39 +0000
commit46be9c835ce86888abbca16257926d3fdd57ce00 (patch)
treeeb6f842eefd46c16ee36d6f1929d750c24875cfd /modules/AutomakeWorkspaceCreator.pm
parentf1991238d096225271aca7912f8a8276482cdffc (diff)
downloadMPC-46be9c835ce86888abbca16257926d3fdd57ce00.tar.gz
ChangeLogTag: Wed Aug 8 12:29:46 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/AutomakeWorkspaceCreator.pm')
-rw-r--r--modules/AutomakeWorkspaceCreator.pm25
1 files changed, 20 insertions, 5 deletions
diff --git a/modules/AutomakeWorkspaceCreator.pm b/modules/AutomakeWorkspaceCreator.pm
index 3ff5af98..3580c4d9 100644
--- a/modules/AutomakeWorkspaceCreator.pm
+++ b/modules/AutomakeWorkspaceCreator.pm
@@ -85,7 +85,7 @@ sub write_comps {
my($acfh) = new FileHandle();
if (open($acfh, ">$outdir/$acfile")) {
print $acfh "AC_INIT(", $self->get_workspace_name(), ", 1.0)$crlf",
- "AM_INIT_AUTOMAKE([1.9])$crlf",
+ "AM_INIT_AUTOMAKE([1.9.6])$crlf",
$crlf,
"AC_PROG_CXX$crlf",
"AC_PROG_CXXCPP$crlf",
@@ -296,23 +296,38 @@ sub write_comps {
}
}
- ## If there are local projects, insert "." as the first SUBDIR entry.
+ ## Create the SUBDIRS setting. If there are associated projects, then
+ ## we will also set up conditionals for it as well.
if ($have_subdirs == 1) {
my($assoc) = $self->get_associated_projects();
my(@aorder) = ();
my(%afiles) = ();
+ my($cond) = '--';
+ my($entry) = " \\$crlf ";
print $fh 'SUBDIRS =';
foreach my $dir (reverse @dirs) {
my($found) = undef;
foreach my $akey (keys %$assoc) {
if (defined $$assoc{$akey}->{$dir}) {
- push(@aorder, $akey);
- push(@{$afiles{$akey}}, $dir);
+ if ($akey eq $cond) {
+ print $fh $entry, '@', $dir, '@';
+ }
+ else {
+ push(@aorder, $akey);
+ push(@{$afiles{$akey}}, $dir);
+ }
$found = 1;
last;
}
+ elsif (defined $$assoc{$akey}->{uc($dir)}) {
+ if ($akey eq $cond) {
+ print $fh $entry, '@', uc($dir), '@';
+ $found = 1;
+ last;
+ }
+ }
}
- print $fh " \\$crlf $dir" if (!$found);
+ print $fh $entry, $dir if (!$found);
}
print $fh $crlf;
my($second) = 1;