Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
227 dpurdie 1
#! perl
2
########################################################################
3
# Copyright ( C ) 2004 ERG Limited, All rights reserved
4
#
5
# Module name   : jats.sh
6
# Module type   : Makefile system
7
# Compiler(s)   : n/a
8
# Environment(s): jats
9
#
10
# Description   : Rewrite a build.pl file
11
#                 Use an external configuration file to provide a common
12
#                 source of configuration information
13
#
14
# Usage:
15
#
16
# Version   Who      Date        Description
17
#
18
#......................................................................#
19
 
20
require 5.6.1;
21
use strict;
22
use warnings;
23
 
24
use JatsError;
25
use BuildName;
26
use Getopt::Long;
27
use Pod::Usage;                             # required for help support
28
 
29
 
30
################################################################################
31
#   Option variables
32
#
33
 
34
my $VERSION = "1.2.4";                      # Update this
35
my $opt_verbose = 0;
36
my $opt_datafile = "";
37
my $opt_ofile  = "auto.pl";
38
my $opt_infile = "build.pl";
39
my $opt_help = 0;
40
my $opt_manual;
41
my $opt_errors = 0;
42
my $opt_xml;
43
my $opt_oldproject;
44
my $opt_newproject;
45
 
46
#
47
#   Globals
48
#
49
my %component =  ();
50
my %component_use =  ();
51
my $not_use_count = 0;
52
my $suffix_count = 0;
53
 
54
 
55
my $result = GetOptions (
56
                "help+"     => \$opt_help,          # flag, multiple use allowed
57
                "manual"    => \$opt_manual,        # flag
58
                "verbose+"  => \$opt_verbose,       # flag
59
                "config=s"  => \$opt_datafile,      # string
60
                "outfile=s" => \$opt_ofile,         # string
61
                "infile=s"  => \$opt_infile,        # string
62
                "errors"    => \$opt_errors,        # flag
63
                "xml!"       => \$opt_xml,          # flag
64
                "oldproject=s"  => \$opt_oldproject,
65
                "newproject=s"  => \$opt_newproject,
66
                );
67
 
68
#
69
#   Process help and manual options
70
#
71
pod2usage(-verbose => 0, -message => "Version: $VERSION")  if ($opt_help == 1  || ! $result);
72
pod2usage(-verbose => 1)  if ($opt_help == 2 );
73
pod2usage(-verbose => 2)  if ($opt_manual || ($opt_help > 2));
74
 
75
#
76
#   Configure the error reporting process now that we have the user options
77
#
78
ErrorConfig( 'name'    =>'REWRITE',
79
             'verbose' => $opt_verbose );
80
 
81
Error ("Must specify both Old and New project tags")
82
    if ( $opt_newproject xor $opt_oldproject );
83
 
84
Error ("No configuration file specified")
85
    unless ( $opt_datafile || $opt_newproject  );
86
 
87
Error ("Input and output file are the same" )
88
    if ( $opt_infile eq $opt_ofile );
89
 
90
#
91
#   Auto detect XML files
92
#
93
$opt_xml = 1
94
    if ( $opt_infile =~ m~\.xml$~i );
95
 
96
#
97
#   Process config and input files
98
#
99
read_config_file()          if $opt_datafile;
100
process_build_file()        unless( $opt_xml);
101
process_xml_build_file()    if ( $opt_xml);
102
 
103
Verbose ("Number of project extensions changed: $suffix_count")
104
    if ( $ opt_newproject );
105
 
106
Warning("No project extensions changed")
107
    if ( !$suffix_count && $opt_newproject);
108
 
109
Error("Unused packages found: $not_use_count")
110
    if ( $opt_errors && $not_use_count && $opt_datafile);
111
 
112
 
113
exit 0;
114
 
115
#-------------------------------------------------------------------------------
116
# Function        : read_config_file
117
#
118
# Description     : Read and store config file information
119
#
120
# Inputs          :
121
#
122
# Returns         :
123
#
124
 
125
sub read_config_file
126
{
127
    open ( FILE, "<$opt_datafile" ) or Error ("Config file ($opt_datafile) not found" );
128
    while ( <FILE> )
129
    {
130
        #
131
        #   Clean up lines
132
        #   Skip comments and blank lines
133
        #   Remove leading and training white space
134
        #
135
        chomp;
136
        s~^\s*~~;
137
        s~#.*$~~;
138
        s~\s*$~~;
139
        next if ( length( $_) <= 0 );
140
 
141
#        Verbose ($_);
142
 
143
        #
144
        #   Process LinkPkgArchive and BuildPkgArchive statements
145
        #   These allow simple updating of the config file from Release manager
146
        #
147
        if ( m/LinkPkgArchive/ or m/BuildPkgArchive/ )
148
        {
149
            m/'(.*)'[^']*'(.*)'/;
150
 
151
            my $comp = $1;
152
            my $ver = $2;
153
 
154
#print "Got Archive stuff: $_ : $comp, $ver\n";
155
 
156
            Error "Version not specified for: $comp" unless ( $ver );
157
            Warning "Suspect version format for: $comp ($ver)" unless ( $ver =~ m~^\w+\.\w+\.\w+.\w+$~ || $ver =~ m~^\w+\.\w+\.\w+$~ );
158
 
159
            save_package( $comp, $ver );
160
            next;
161
        }
162
 
163
 
164
 
165
        #
166
        #   Process line as
167
        #       component version
168
        #
169
        my ( $comp, $ver, $opt ) = split( /[\s,]+/, $_, 3);
170
        Error "Version not specified for: $comp" unless ( $ver );
171
        Warning "Suspect version format for: $comp ($ver)" unless ( $ver =~ m~^\w+\.\w+\.\w+.\w+$~ || $ver =~ m~^\w+\.\w+\.\w+$~ );
172
        save_package( $comp, $ver );
173
    }
174
    close FILE;
175
 
176
#    DebugDumpData ("component", \%component );
177
}
178
 
179
#-------------------------------------------------------------------------------
180
# Function        : print_update
181
#
182
# Description     : Generate a display line tracking the changes made
183
#
184
# Inputs          :
185
#                   $title          - Update Type
186
#                   $name           - Package name
187
#                   $version        - Original version of package
188
#                   $new_version    - New version
189
#
190
# Returns         :
191
#
192
sub print_update
193
{
194
    my ($title, $name, $version, $new_version ) = @_;
195
    my $diff = ( $version ne $new_version ) ? '*' : '';
196
 
197
    #
198
    #   Always display diffs
199
    #   Display all if verbose
200
    #
201
    if ( $diff || $opt_verbose  )
202
    {
203
        $title = 'Package' unless ( $title );
204
        Message( sprintf("%-8s: %-35s, Version: %-15s %1.1s-> %-15s\n", $title, $name ,$version, $diff, $new_version));
205
    }
206
}
207
 
208
#-------------------------------------------------------------------------------
209
# Function        : process_build_file
210
#
211
# Description     : Rewrite one file
212
#                   build.pl -> build-new.pl
213
#
214
# Inputs          :
215
#
216
# Returns         :
217
#
218
sub process_build_file
219
{
220
    Verbose ("Processing build file: $opt_infile");
221
 
222
    #
223
    #   Unlink any OLD output file
224
    #
225
    unlink $opt_ofile;
226
 
227
    #
228
    #   Open the input and output files
229
    #
230
    open ( INFILE, "<$opt_infile" ) || Error( "Cannot open $opt_infile" );
231
    open ( OUTFILE, ">$opt_ofile" ) || Error( "Cannot create $opt_ofile" );
232
 
233
    my $build_info;
234
 
235
    my $release_name;
236
    my $release_version;
237
 
238
    while ( <INFILE> )
239
    {
240
        next if ( m~^\s*#~ );            # Skip comments
241
        #
242
        #   Process BuildName
243
        #
244
        if ( m~\s*BuildName[\s\(]~ )
245
        {
246
            #   Build names come in many flavours
247
            #   Must support a number of different formats
248
            #       "name nn.nn.nn prj"
249
            #       "name nn.nn.nn.prj"
250
            #
251
            #       "name nn.nn.nn prj", "nn.nn.nn"
252
            #       "name nn.nn.nn.prj", "nn.nn.nn"
253
            #
254
            #       "name", "nn.nn.nn.prj"
255
            #
256
            m~\(\s*(.*?)\s*\)~;
257
            my @args = split /\s*,\s*/, $1;
258
            $build_info = parseBuildName( @args );
259
 
260
            my $new_ver = get_package ( $build_info->{BUILDNAME_PACKAGE}, $build_info->{BUILDVERSION} );
261
            my $build_args = genBuildName( $build_info, $new_ver );
262
 
263
            #
264
            #   Rewrite the body of the directive
265
            #
266
            s~\(\s*(.*?)\s*\)~( $build_args )~;
267
            print_update( '', $build_info->{BUILDNAME_PACKAGE}, $build_info->{BUILDVERSION}, $new_ver );
268
 
269
        }
270
 
271
        #
272
        #   Process BuildPreviousVersion
273
        #   Save the current version information in this directive
274
        #
275
        if ( m/^\s*BuildPreviousVersion/ )
276
        {
277
            Error ("BuildPreviousVersion directive before BuildName") unless ( $build_info );
278
            m/['"](.*?)['"]/;
279
            my $prev = $1;
280
 
281
            s/['"](.*?)['"]/'$build_info->{BUILDVERSION}'/;
282
            print_update( 'PrevVer', '', $prev, $build_info->{BUILDVERSION} );
283
        }
284
 
285
        #
286
        #   Process BuildPkgArchive and LinkPkgArchive
287
        if ( m/^\s*LinkPkgArchive/ or m/^\s*BuildPkgArchive/ )
288
        {
289
            m/['"](.*?)['"][^'"]*['"](.*?)['"]/;
290
 
291
            my $comp = $1;
292
            my $ver = $2;
293
            my $new_ver = get_package ( $comp, $ver );
294
            s/['"](.*?)['"]([^'"]*)['"](.*?)['"]/'$comp'$2'$new_ver'/;
295
            print_update ('', $comp ,$ver, $new_ver );
296
        }
297
 
298
 
299
    } continue
300
    {
301
        #
302
        #   Always output the resultant line
303
        #
304
        print OUTFILE $_;
305
    }
306
 
307
    #
308
    #   Cleanup
309
    #
310
    close INFILE;
311
    close OUTFILE;
312
    display_unused();
313
}
314
 
315
#-------------------------------------------------------------------------------
316
# Function        : process_xml_build_file
317
#
318
# Description     : Rewrite one depends.xml file
319
#                   depends.xml -> auto.xml
320
#
321
#                   A very cheap and nasty XML (not)parser
322
#                   It assumes that entries are all on one line so that we can
323
#                   do trivial substitutions
324
#
325
#                   Processes
326
#                       <using ... >
327
#                       <property name="packagename" ...>
328
#                       <import file=...>
329
#
330
#
331
# Inputs          :
332
#
333
# Returns         :
334
#
335
sub process_xml_build_file
336
{
337
    Verbose ("$opt_infile");
338
 
339
    #
340
    #   Unlink any OLD output file
341
    #
342
    unlink $opt_ofile;
343
 
344
    #
345
    #   Open the input and output files
346
    #
347
    open ( INFILE, "<$opt_infile" ) || Error( "Cannot open $opt_infile" );
348
    open ( OUTFILE, ">$opt_ofile" ) || Error( "Cannot create $opt_ofile" );
349
 
350
    my $release_name;
351
    my $release_version;
352
 
353
    while ( <INFILE> )
354
    {
355
        #
356
        #   Process "project" statement
357
        #
358
        if ( m~<project~ )
359
        {
360
            #   Extract the package name
361
            #   this to determine the required version of the package
362
            #
363
            m~name=\"([^"]*)"~;
364
            $release_name = $1;
365
            Error ("Name attribute not found in 'project'") unless ( $release_name );
366
            Verbose2 ("Project: $release_name");
367
        }
368
 
369
        #
370
        #   Process "property" statements
371
        #
372
        elsif ( m~<property~ )
373
        {
374
            #
375
            #   Extract the package name and version
376
            #   and use this to determine the required version of the package
377
            #
378
            m~name=\"([^"]*)"~;
379
            my $name = $1;
380
            Error ("Name attribute not found in 'property'") unless ( $name );
381
            Verbose2 ("Property: $name");
382
 
383
            #
384
            #   Update the package name
385
            #   The real package name is held in the value attribute
386
            #
387
            if ( $name eq 'packagename' )
388
            {
389
                m~value=\"([^"]*)"~;
390
                $release_name = $1;
391
                Error ("Value attribute not found in packagename 'property'") unless ( $release_name );
392
            }
393
 
394
            elsif ( $name eq 'packageversion' )
395
            {
396
                m~value=\"([^"]*)"~;
397
                $release_version = $1;
398
                Error ("Value attribute not found in packageversion 'property'") unless ( $release_version );
399
 
400
                #
401
                #   Ensure that we already have the package name
402
                #
403
                Error ("packageversion before packagename") unless ( $release_name );
404
 
405
                my $new_ver = get_package ( $release_name, $release_version );
406
                s~(.*)value=\"([^"]*)"~$1value=\"$new_ver\"~;
407
                print_update( '', $release_name ,$release_version, $new_ver );
408
            }
409
 
410
            elsif ( $name eq 'env' )
411
            {
412
                #
413
                #   'env' is special
414
                #   Its not a package. Skip it
415
                #
416
            }
417
 
418
            else
419
            {
420
                m~value=\"([^"]*)"~;
421
                $release_version = $1;
422
                Error ("Value attribute not found in package 'property' : $name") unless ( $release_version );
423
 
424
                my $new_ver = get_package ( $name, $release_version );
425
                s~(.*)value=\"([^"]*)"~$1value=\"$new_ver\"~;
426
                print_update( '', $name ,$release_version, $new_ver );
427
            }
428
        }
429
 
430
        #
431
        #   Process "using" statements
432
        #
433
        elsif ( m~<using~ )
434
        {
435
            #
436
            #   Extract the package name and version
437
            #   and use this to determine the required version of the package
438
            #
439
            m~name=\"([^"]*)"~;
440
            my $name = $1;
441
            Error ("Name attribute not found in 'using'") unless ( $name );
442
            Verbose2 ("Using: $name");
443
 
444
            #
445
            #   Extract the version
446
            #
447
            m~version=\"([^"]*)"~;
448
            $release_version = $1;
449
            Error ("Version attribute not found in package 'using' : $name") unless ( $release_version );
450
 
451
            my $new_ver = get_package ( $name, $release_version );
452
            s~(.*)version=\"([^"]*)"~$1version=\"$new_ver\"~;
453
            print_update( '', $name ,$release_version, $new_ver );
454
        }
455
 
456
        #
457
        #   Import File
458
        #   Only used to imprt ant-using
459
        #
460
        elsif ( m~<import~ )
461
        {
462
            #
463
            #   Extract the file
464
            #
465
            m~file=\"([^"]*)"~;
466
            my $file = $1;
467
            Error ("File attribute not found in 'import'") unless ( $file );
468
 
469
            #
470
            #   Extract the package name and version from the file
471
            #   Will be of the form /package/version/filename
472
            #
473
            $file =~ m~(.*?)/([^/]+)/([^/]+)/([^/]+)$~;
474
            my $prefix = $1;
475
            my $pname = $2;
476
            my $pver = $3;
477
            my $fname = $4;
478
            Error ("Package details not found in import file") unless ( $fname );
479
 
480
            my $new_ver = get_package ( $pname, $pver );
481
 
482
            #
483
            #   Rewrite the body of the directive
484
            #
485
            s~(.*)file=\"([^"]*)"~$1file=\"$prefix/$pname/$new_ver/$fname\"~;
486
            print_update( '', $pname ,$pver, $new_ver );
487
        }
488
 
489
    } continue
490
    {
491
        #
492
        #   Always output the resultant line
493
        #
494
        print OUTFILE $_;
495
    }
496
 
497
    #
498
    #   Cleanup
499
    #
500
    close INFILE;
501
    close OUTFILE;
502
    display_unused();
503
}
504
 
505
#-------------------------------------------------------------------------------
506
# Function        : display_unused
507
#
508
# Description     : Generate warnings about config items that were not used
509
#
510
# Inputs          :
511
#
512
# Returns         :
513
#
514
sub display_unused
515
{
516
    foreach my $comp ( sort keys %component_use )
517
    {
518
        foreach my $suf ( keys %{$component_use{$comp}} )
519
        {
520
            my $ver = get_version( $comp, $suf );
521
            Warning("Unused package: ${comp}_${ver}");
522
            $not_use_count++;
523
        }
524
    }
525
}
526
 
527
 
528
#-------------------------------------------------------------------------------
529
# Function        : save_package
530
#
531
# Description     : Save the package name and version
532
#
533
# Inputs          : $package
534
#                   $version
535
#
536
# Returns         : Nothing
537
#
538
sub save_package
539
{
540
    my ($package, $version) = @_;
541
 
542
    #
543
    #   Split the suffix off the version
544
    #
545
    my ($rel, $suf ) = extract_version( $package, $version);
546
 
547
    Error ("Multiple definitions for $package $version" )
548
        if ( $component{$package}{$suf} );
549
 
550
    $component{$package}{$suf} = $rel;
551
    $component_use{$package}{$suf} = $rel;
552
 
553
    Verbose2 ("Package: $package, $version, $rel, $suf");
554
 
555
}
556
 
557
#-------------------------------------------------------------------------------
558
# Function        : get_package
559
#
560
# Description     : get the package version
561
#
562
# Inputs          : $package
563
#                   $version ( suffix is used only )
564
#
565
# Returns         : Replacement version
566
#
567
 
568
sub get_package
569
{
570
    my ($package, $version) = @_;
571
 
572
    #
573
    #   Split the suffix off the version
574
    #       Suffixes are not numeric
575
    #   Must allow for
576
    #       9.9.9
577
    #       9.9.cots
578
    #       9.9.9.cots
579
    #
580
    my ($rel, $suf ) = extract_version( $package, $version);
581
 
582
    Verbose2 ("Get Package: $package, $version, $rel, $suf");
583
 
584
    #
585
    #   If the CFG file has 'new' project extensions then we
586
    #   must transform them before attempting to look up the versions
587
    #
588
    if ( $opt_oldproject && $suf eq $opt_oldproject )
589
    {
590
        $suf = $opt_newproject;
591
        $suffix_count++;
592
    }
593
 
594
    #
595
    #   If a datafile was provided, then the packages MUST be present
596
    #
597
    if ( $opt_datafile )
598
    {
599
        Error ("No definitions for the package '$package'" )
600
            unless ( exists $component{$package} );
601
 
602
    #    print Data::Dumper->Dump ( [\%component], ["Component" ]);
603
 
604
        Error ("No definitions for '$package' '$version' '$suf'" )
605
            unless ( exists $component{$package}{$suf} );
606
    }
607
 
608
    #
609
    #   remove used packages from the "use" hash
610
    #
611
    delete $component_use{$package}{$suf};
612
    delete $component_use{$package} unless ( keys %{$component_use{$package}} );
613
 
614
    #
615
    #   Was the suffix real
616
    #
617
    return get_version( $package, $suf, $rel );
618
}
619
 
620
#-------------------------------------------------------------------------------
621
# Function        : extract_version
622
#
623
# Description     : Extracts a version and project suffix from a string
624
#
625
# Inputs          : $1  - Package name
626
#                   $2  - Package Version Input string
627
#
628
# Returns         : $1  - Vesrion part
629
#                   $2  - Suffix (project) part
630
#
631
sub extract_version
632
{
633
    my ($package, $version) = @_;
634
 
635
    my $rel;
636
    my $suf;
637
 
638
    if ( $version =~ m~^(.*?)([\.\s]([^0-9]+))$~ )
639
    {
640
        $rel = $1;
641
        $suf = $3;
642
        $suf = '' unless ( $suf );
643
    }
644
    else
645
    {
646
        $rel = $version;
647
        $suf = '';
648
    }
649
 
650
    return ( $rel, $suf );
651
}
652
 
653
#-------------------------------------------------------------------------------
654
# Function        : get_version
655
#
656
# Description     : Create a nice package version
657
#
658
# Inputs          : $package
659
#                   $suf
660
#
661
# Returns         :
662
#
663
sub get_version
664
{
665
    my ($package,$suf, $version) = @_;
666
 
667
    if ( exists( $component{$package}{$suf} ) )
668
    {
669
        $version = $component{$package}{$suf};
670
    }
671
 
672
    if ( $opt_oldproject && $suf eq $opt_oldproject )
673
    {
674
        $suf = $opt_newproject;
675
        $suffix_count++;
676
    }
677
 
678
    $version .= '.' . $suf if ( length( $suf) );
679
    return  $version;
680
 
681
}
682
 
683
#-------------------------------------------------------------------------------
684
# Function        : genBuildName
685
#
686
# Description     : Generate a BuildName argument string
687
#
688
# Inputs          : build_info      - Hash of buildname arguments
689
#                   new_ver         - New version
690
#
691
# Returns         : A string of quoted BuildName arguemnts
692
#
693
sub genBuildName
694
{
695
    my ( $build_info, $new_ver ) = @_;
696
    my @args;
697
 
698
    #
699
    #   Remove the project part from the new version name
700
    #
701
    my $prj = $build_info->{BUILDNAME_PROJECT};
702
 
703
    $prj = $opt_newproject
704
        if ( $opt_oldproject && $prj eq $opt_oldproject );
705
 
706
    $new_ver =~ s~\.$prj$~~ if ( $prj );
707
 
708
    #
709
    #   Determine the format of the BuildName
710
    #
711
    if ( $build_info->{RELAXED_VERSION} )
712
    {
713
        #
714
        #   Relaxed format
715
        #
716
        push @args, $build_info->{BUILDNAME_PACKAGE};
717
        push @args, $new_ver;
718
        push @args, $prj if ( $prj );
719
        push @args, '--RelaxedVersion';
720
    }
721
    else
722
    {
723
        #
724
        #   Generate two field version as some of the deployment scripts
725
        #   need this format.
726
        #
727
        push @args, "$build_info->{BUILDNAME_PACKAGE} $new_ver $prj";
728
        push @args, "$new_ver";
729
    }
730
 
731
    #
732
    #   Common arguments
733
    #
734
    push @args, "--PatchNum=$build_info->{DEPLOY_PATCH}"
735
        if ( $build_info->{DEPLOY_PATCH} );
736
 
737
    push @args, @{$build_info->{EXTRA_ARGS}} if exists ($build_info->{EXTRA_ARGS});
738
 
739
 
740
    #
741
    #   Format the arguments
742
    #
743
    return join ", ", map { "'$_'" } @args;
744
}
745
 
746
#-------------------------------------------------------------------------------
747
#   Documentation
748
#
749
 
750
=pod
751
 
752
=head1 NAME
753
 
754
jats_rewrite - Rewrite a build.pl file
755
 
756
=head1 SYNOPSIS
757
 
758
  jats etool jats_rewrite [options]
759
 
760
 Options:
761
    -help               - brief help message
762
    -help -help         - Detailed help message
763
    -man                - Full documentation
764
    -verbose            - Verbose operation
765
    -config xxx         - Configuration file. Full file name
766
    -oldproject         - Old project extension (optional)
767
    -newproject         - New project extension (optional)
768
    -infile xxx         - Input file (build.pl)
769
    -outfile xxx        - Output file (auto.pl)
770
    -errors             - Generate errors for unused config items
771
    -xml                - Process a build.xml file
772
 
773
=head1 OPTIONS
774
 
775
=over 8
776
 
777
=item B<-help>
778
 
779
Print a brief help message and exits.
780
 
781
=item B<-help -help>
782
 
783
Print a detailed help message with an explanation for each option.
784
 
785
=item B<-man>
786
 
787
Prints the manual page and exits.
788
 
789
=item B<-verbose>
790
 
791
Increases program output. This option may be specified mutiple times
792
 
793
=item B<-config=xxx>
794
 
795
This option specifies the name of a configuration file that will provide the
796
transformation between of version numbers. The format of the config file is
797
described later.
798
 
799
The option is not required if -newproject and -oldproject are specified
800
 
801
=item B<-oldproject=xxx>
802
 
803
This option, in conjunction with B<-oldproject=xxx> allows the project
804
extensions to be modified. ie: .syd projects can eb converted into .bej
805
projects.
806
 
807
If this option is present thenthe config data file is not required, although
808
it will be sued if it is present.
809
 
810
=item B<-newproject=xxx>
811
 
812
See B<-oldproject=xxx>
813
 
814
 
815
=item B<-infile=xxx>
816
 
817
The name of the input file. The default file is build.pl
818
 
819
=item B<-outfile=xxx>
820
 
821
The name of the output file. The default is auto.pl, even if an XML file is
822
being processed.
823
 
824
=item B<-errors>
825
 
826
This option will force the program to generate an error message if there are
827
packages in the config file that were not used by the re-write process.
828
 
829
=item B<-xml>
830
 
831
Process a build.xml file instead of a build.pl file.
832
This option will be set internally if the infile extesnion is '.xml'
833
 
834
=back
835
 
836
=head1 DESCRIPTION
837
 
838
=head2 CONFIG FILE FORMAT
839
 
840
The format of the configuration file is defined below.
841
 
842
Comments begin with a # and go the end of the line
843
 
844
  There are two types of config line
845
      package version
846
          Specifies the version of a package to use 
847
          The version may be of the form:
848
              nn.nn.nn.aaa
849
              nn.nn.nn
850
              other
851
 
852
    Standard LinkPkgArchive or BuildPkgArchive statements
853
 
854
=cut
855