abagchi     99/11/22 17:18:37

  Modified:    c/scripts packageBinaries.pl packageSources.pl
  Log:
  Removed redundant variables and fixed tar file paths
  
  Revision  Changes    Path
  1.6       +6 -18     xml-xerces/c/scripts/packageBinaries.pl
  
  Index: packageBinaries.pl
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/scripts/packageBinaries.pl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- packageBinaries.pl        1999/11/22 20:54:06     1.5
  +++ packageBinaries.pl        1999/11/23 01:18:34     1.6
  @@ -11,12 +11,6 @@
   &Getopt('sopcxmntr');
   $XERCESCROOT = $opt_s;
   $targetdir = $opt_o;
  -$ccompiler = $opt_c;
  -$cppcompiler = $opt_x;
  -$msgloader = $opt_m;
  -$netaccessor = $opt_n;
  -$transcoder = $opt_t;
  -$thread = $opt_r;
   
   # Check for the environment variables and exit if error
   if (!length($XERCESCROOT) || !length($targetdir) || (length($opt_h) > 0) ) {
  @@ -65,16 +59,14 @@
   open(PLATFORM, "uname -s|");
   $platform = <PLATFORM>;
   chomp($platform);
  -#$platform =~ m/(^\w*)\s/;
  -#$platform = $1;
   close (PLATFORM);
   
   print "Packaging binaries for \`" . $platform . "\` in " . $targetdir . " 
...\n";
   
   #Construct the name of the zip file by extracting the last directory name
  -$zipfiles = $targetdir . "/*";
  -# $zipfiles =~ m/\/(\w*$)/;
  -# $zipfiles = $1 . "/*";
  +$zipfiles = $targetdir;
  +$zipfiles =~ s/.*\/([\w|-]*)$/$1/g;
  +$zipfiles = $zipfiles . "/*";
   
   $buildmode = "Release";    # Universally, why do you want to package Debug 
builds anyway?
   
  @@ -281,7 +273,7 @@
              $icuCompileFlags = 'CXX="xlC_r -L/usr/lpp/xlC/lib" CC="xlc_r 
-L/usr/lpp/xlC/lib" C_FLAGS="-w -O" CXX_FLAGS="-w -O"'; 
           }
           if ($platform eq 'HP-UX') {
  -            if ($ccompiler eq 'CC') {
  +            if ($opt_c eq 'CC') {
                   $icuCompileFlags = 'CC=cc CXX=CC CXXFLAGS="+eh +DAportable 
-w -O" CFLAGS="+DAportable -w -O"'; 
               }
               else {
  @@ -303,9 +295,6 @@
                   exit(1);
           }
   
  -        $srczipfiles = $srctargetdir . "/*";
  -
  -        $srctargetdir = $OUTPUTDIR . $srctargetdir;
           if (-e $srctargetdir.".tar") {
                   print ("Error: The target file \'$srctargetdir.tar\' already 
exists.\n");
                   print ("       You must delete the file 
\'$srctargetdir.tar\' to package your product.\n");
  @@ -377,7 +366,7 @@
                        system ("gmake");
                        # For the antiquated CC compiler under HPUX, we need to 
invoke
                        # gmake one extra time to generate the .cnv files.
  -                     if ( ($platform eq 'HP-UX') && ($compiler eq 'CC') ) {
  +                     if ( ($platform eq 'HP-UX') && ($opt_c eq 'CC') ) {
                                system ("gmake");
                        }
                }
  @@ -487,9 +476,8 @@
           chdir ("$targetdir/..");
           $zipname = $targetdir . ".tar";
           $platformzipname = $zipname;
  -        $platformzipname =~ s/\.tar/$platformextension\.tar/g;
   
  -        print ("tar -cvf $platfromzipname $zipfiles\n");
  +        print ("tar -cvf $platformzipname $zipfiles\n");
           system ("tar -cvf $platformzipname $zipfiles");
   
           # Finally compress the files
  
  
  
  1.6       +4 -6      xml-xerces/c/scripts/packageSources.pl
  
  Index: packageSources.pl
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/scripts/packageSources.pl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- packageSources.pl 1999/11/22 20:54:07     1.5
  +++ packageSources.pl 1999/11/23 01:18:35     1.6
  @@ -50,15 +50,11 @@
      if ($fileline =~ /gXML4CFullVersionStr = \"(.*)\"/) {
        $binarytargetdir = $1;  # We found the version string inside this file
      }
  -   if ($fileline =~ /gXML4CVersionStr = \"(.*)\"/) {
  -      $libraryversion = $1;
  -   }
   }
   close(VERSIONFILE);
   
   $binarytargetdir =~ s/\./_/g;    # Substitute the dots
   $binarytargetdir =~ s/\s/_/g;    # Substitute the blanks
  -$binarydirectoryname = "xerces-c_" . $binarytargetdir;  # Is the name of the 
binary directory
   $binarytargetdir =~ s/\\/\//g;   # Fix the backslashes, if they exist, 
probably doesn't
   
   # Now check if the target directory exists, exit if it does
  @@ -68,8 +64,10 @@
           exit(1);
   }
   
  -
  -$srczipfiles = $OUTPUTDIR . "/*";
  +#Construct the name of the zip file by extracting the last directory name
  +$srczipfiles = $OUTPUTDIR;
  +$srczipfiles =~ s/.*\/([\w|-]*)$/$1/g;
  +$srczipfiles = $srczipfiles . "/*";
   $srctargetdir = $OUTPUTDIR;
   
   # Find out the platform from 'uname -a'
  
  
  

Reply via email to