summaryrefslogtreecommitdiffstats
path: root/bin/pkgscrpts/makeOuter1816README.pl
blob: 0c03a4e9d30a7c1686d610d18e6ab1fbf574e08e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#!/usr/bin/perl
# makeOuterREADME.pl
use warnings;
use strict;

my $indirectory = ".";
$indirectory = shift;

my $outdirectory = ".";
$outdirectory = shift;

my $outsubdir = shift;

my $version;

my $outfile = "$outdirectory/$outsubdir/README";
open OUTFILE, ">$outfile";
my $hostname="";
my $cmd = "grep \"HDF5 Version\" $indirectory-static/lib/libhdf5.settings";
$_ = `$cmd`;
#print OUTFILE $_, "\n";
s/HDF5 Version://;
s/^\s+//;
chomp;
$version = $_;
#print OUTFILE $_, "\n";
my $versionstring=  "This directory contains the precompiled HDF5 $version binary distribution\n(include files, libraries, utilities) for";

$cmd = "grep \"Uname information:\" $indirectory-static/lib/libhdf5.settings";
$_ = `$cmd`;
s/Uname information://;
s/^\s+//;
chomp;
print "String to work with is $_\n";
my $platformstring = "";
my $hostnamestring = $_;
my @hostnamestring = split / /, $hostnamestring;
$platformstring = "$hostnamestring[0] ";
if ($indirectory =~ /jam/ || $indirectory =~ /koala/) {
   $hostnamestring = $hostnamestring[2];
   my $pos = index $hostnamestring, "-";
   if ($pos > 0) {
      $platformstring .=  substr $hostnamestring, 0, $pos;
   } else {
      $platformstring .= $hostnamestring[2];
   }
   $platformstring .= " ".$hostnamestring[-3];
} elsif ($indirectory =~ /linew/) {
   $platformstring .= "$hostnamestring[2] $hostnamestring[-2]";
} else {
   $platformstring .= "$hostnamestring[2] $hostnamestring[-1]";
}

print OUTFILE $versionstring." ".$platformstring.":\n\n";
my $line1;
my $line3;
my $line5;
my $compilerstring="";

print $indirectory, "\n";
 
if ($indirectory =~ /loyalty/) {
#   $line1 = "  5-$version-$outsubdir-16API.tar.gz   - Includes C and C++ APIs (using\n";
   $line3 = "  5-$version-$outsubdir-static.tar.gz  - Includes C APIs (using\n";
   $line5 = "  5-$version-$outsubdir-shared.tar.gz  - Includes C APIs (using\n";
   $compilerstring = "                                        gcc, g++, and gfortran 4.6.1)\n";
}
elsif ($indirectory =~ /freedom/) {
#   $line1 = "  5-$version-$outsubdir-16API.tar.gz - Includes C and C++ APIs (using\n";
   $line3 = "  5-$version-$outsubdir-static.tar.gz  - Includes C APIs (using\n";
   $line5 = "  5-$version-$outsubdir-shared.tar.gz  - Includes C APIs (using\n";
   $compilerstring = "                                        gcc, g++, and gfortran 4.6.1)\n";
}
elsif ($indirectory =~ /ostrich/) {
#   $line1 = "  5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
   $line3 = "  5-$version-$outsubdir-static.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $line5 = "  5-$version-$outsubdir-shared.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $compilerstring = "                                        gcc, g++, and gfortran 4.4.7)\n";
}
elsif ($indirectory =~ /platypus/) {
#   $line1 = "  5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
   $line3 = "  5-$version-$outsubdir-static.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $line5 = "  5-$version-$outsubdir-shared.tar.gz  - Includes C, C++, F90 APIs (using\n";
   if ($indirectory =~ /gcc482/) {
      my $cs1 = "                                        gcc, g++, and gfortran 4.8.2)\n";
      my $cs2 = "\tWarning!";
      my $cs3 = "\tIf the 4.8.2 version is not the system default, the scripts listed provided for compiling";
      my $cs4 = "\tapplications (h5cc, hf5c, etc.) will not work unless either the environment is modified";
      my $cs5 = "\tor the full path to the 4.8.2 compiler versions is added to the scripts.\n\n";
      $compilerstring = join "\n", $cs1, $cs2, $cs3, $cs4, $cs5;
   } else {    
      $compilerstring = "                                        gcc, g++, and gfortran 4.4.7)\n";
   }
}
elsif ($indirectory =~ /moohan/) {
#   $line1 = "  5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
   $line3 = "  5-$version-$outsubdir-static.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $line5 = "  5-$version-$outsubdir-shared.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $compilerstring = "                                        gcc, g++, and gfortran 4.8.3)\n";
   }
} 
elsif ($indirectory =~ /emu/) {
#   $line1 = "  5-$version-$outsubdir-16API.tar.gz - Includes C, C++, F90 APIs (using\n";
   $line3 = "  5-$version-$outsubdir-static.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $line5 = "  5-$version-$outsubdir-shared.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $compilerstring = "                                        Sun C and C++ 5.12, Sun Fortran 95 8.6)\n";
}
elsif ($indirectory =~ /kite/) {
   $line3 = "  5-$version-$outsubdir-static.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $line5 = "  5-$version-$outsubdir-shared.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $compilerstring = "                                        Apple clang/clang++ 5.1 from Xcode 5.1,
                                                              gfortran 4.8.2)\n";
}
elsif ($indirectory =~ /quail/) {
   $line3 = "  5-$version-$outsubdir-static.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $line5 = "  5-$version-$outsubdir-shared.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $compilerstring = "                                        Apple clang/clang++ 6.0 from Xcode 6.2,
                                                              gfortran 4.9.2)\n";
}
elsif ($indirectory =~ /osx1010test/) {
   $line3 = "  5-$version-$outsubdir-static.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $line5 = "  5-$version-$outsubdir-shared.tar.gz  - Includes C, C++, F90 APIs (using\n";
   $compilerstring = "                                        Apple clang/clang++ 6.0 from Xcode 7.0,
                                                              gfortran 4.9.2)\n";
}

    print OUTFILE $line3;
    print OUTFILE $compilerstring."\n";
if ($line5 ne "") {
    print OUTFILE $line5;
    print OUTFILE $compilerstring."\n";
}
#elsif ($indirectory =~ /-16API/) {
#    print OUTFILE $line1;
#    print OUTFILE $compilerstring;
#    print OUTFILE "                               USES THE VERSION 1.6 DEFAULT API\n";
#    print OUTFILE "                               MAPPING.\n\n";
#}

print OUTFILE "  utilities/ - Directory containing the compiled HDF5 utilities.\n";
print OUTFILE "               These utilities are STATICALLY linked and will run as is.\n\n";
#print OUTFILE "             The tools can be downloaded separately, or ALL in one\n";
#print OUTFILE "             compressed file (5-$version-$outsubdir-static-util.tar.gz).\n\n";
print OUTFILE "\n";
print OUTFILE "To obtain the HDF5 distribution, 'unzip' and 'untar' the distribution\n";
print OUTFILE "file:\n\n";
print OUTFILE "  gzip -cd <gz file from above> | tar xvf -\n";


#$cmd = "grep \"Configured by:\" $indirectory/$key-static/lib/libhdf5.settings";
#$_ = `$cmd`;
#s/Configured by://;
#s/^\s+//;
#print OUTFILE $_;
#chomp;
#my $hostnamestring = $_;
#s/(^\w+)(\s)(\S+)/$1/;
#s/(^.*)(-)(.*)(200[7-8])(.*)(\s)(\S+)/$1 $5/;
#my $platformstring = $_ . ":\n\n";
#my @hostnamestring = split /@/, $hostnamestring;
#print "Size of hostnamestring is ", scalar @hostnamestring, "\n";
#print $hostnamestring[0] . "\t" . $hostnamestring[2]."\t".$hostnamestring[19]."\n";
#my $platformstring = $hostnamestring[1].":\n\n";
#$hostnamestring = $hostnamestring[1];
#my $pos = index $hostnamestring, ".";
#if ($pos > 0) {
#   @hostnamestring = split /\./, $hostnamestring;
#   $platformstring = $hostnamestring[0].":\n\n";
#}