summaryrefslogtreecommitdiff
path: root/lib/sbin/CreateConfigurationBindings.pl
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-04-07 23:50:56 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-04-07 23:50:56 +0000
commit41e53d9f4f39960c1f4ab59d5e960e516f0b6557 (patch)
tree717f2e68fd8aa68fd6338cc295dca5d8be7728e4 /lib/sbin/CreateConfigurationBindings.pl
parentbfeb83e554f3ff076992c68982d27353529110d7 (diff)
Latest changes from Yaakoub.
Error code of thorn-provided script is checked. LIBS and LIBDIRS should end up in correct places on link line. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@3650 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CreateConfigurationBindings.pl')
-rw-r--r--lib/sbin/CreateConfigurationBindings.pl43
1 files changed, 24 insertions, 19 deletions
diff --git a/lib/sbin/CreateConfigurationBindings.pl b/lib/sbin/CreateConfigurationBindings.pl
index b7fdda8a..886cbd03 100644
--- a/lib/sbin/CreateConfigurationBindings.pl
+++ b/lib/sbin/CreateConfigurationBindings.pl
@@ -57,16 +57,16 @@ sub CreateConfigurationBindings
{
if ($cfg->{"\U$thorn\E REQUIRES"} || $cfg->{"\U$thorn\E OPTIONAL"})
{
- if(! -d "$bindings_dir/Configuration/$thorn")
- {
- mkdir("$bindings_dir/Configuration/$thorn", 0755) || die "Unable to create Thorn $thorn Configuration directory";
- }
+ if(! -d "$bindings_dir/Configuration/$thorn")
+ {
+ mkdir("$bindings_dir/Configuration/$thorn", 0755) || die "Unable to create Thorn $thorn Configuration directory";
+ }
}
}
# this string goes into the cactus executable directly
- $linkerflagdirs = 'LDFLAGS +=';
- $linkerflaglibs = '';
+ my $linkerflagdirs = '';
+ my $linkerflaglibs = '';
# here we put all the PROVIDES to where they belong
foreach $thorn (sort keys %thorns)
@@ -78,13 +78,13 @@ sub CreateConfigurationBindings
# separate
if ($cfg->{"\U$thorn\E PROVIDES"})
{
- $codedef = '';
- $codedep = '';
- $incdir = '';
- $lib = '';
- $libdir = '';
- $thornDefnFile = '';
- $thornDepsFile = '';
+ my $codedef = '';
+ my $codedep = '';
+ my $incdir = '';
+ my $lib = '';
+ my $libdir = '';
+ my $thornDefnFile = '';
+ my $thornDepsFile = '';
foreach $providedcap (split (' ', $cfg->{"\U$thorn\E PROVIDES"}))
{
@@ -96,7 +96,7 @@ sub CreateConfigurationBindings
if ( $cfg->{"\U$thorn $providedcap\E DEFINITION"} )
{
$codedef = $cfg->{"\U$thorn $providedcap\E DEFINITION"};
- &WriteFile("$bindings_dir/Configuration/make.$\Uprovidedcap\E.defn",\$cfg->{"\U$thorn $providedcap\E DEFINITION"});
+ &WriteFile("$bindings_dir/Configuration/make.\U$providedcap\E.defn",\$cfg->{"\U$thorn $providedcap\E DEFINITION"});
}
if ( $cfg->{"\U$thorn $providedcap\E DEPENDENCY"} )
{
@@ -109,10 +109,12 @@ sub CreateConfigurationBindings
}
if ( $cfg->{"\U$thorn $providedcap\E LIBRARY"} )
{
+# print "\nlibs\n";
$lib = $cfg->{"\U$thorn $providedcap\E LIBRARY"};
}
if ( $cfg->{"\U$thorn $providedcap\E LIBRARY_DIRECTORY"} )
{
+# print "\ndirs\n";
$libdir = $cfg->{"\U$thorn $providedcap\E LIBRARY_DIRECTORY"};
}
@@ -183,14 +185,17 @@ sub CreateConfigurationBindings
&WriteFile("$bindings_dir/Configuration/$temp/make.configuration.deps",\$thornDepsFile);
}
}
-
-
- }
+ }
}
-
}
}
- $linkerflagdirs .= $linkerflaglibs;
+
+
+ $linkerflagdirs = "LIBDIRS += " . $linkerflagdirs;
+ $linkerflaglibs = "LIBS += " . $linkerflaglibs;
+
+ $linkerflagdirs = $linkerflagdirs . "\n" . $linkerflaglibs;
+
&WriteFile("$bindings_dir/Configuration/make.link",\$linkerflagdirs);
}