Last change
on this file since 17 was 17, checked in by Bruno Cornec, 17 years ago |
Still in dev. phase - lots of changes - near the end for cms2build
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/usr/bin/perl -w
|
---|
2 | #
|
---|
3 | # Project Builder configuration file
|
---|
4 | # For project pb ;-)
|
---|
5 | #
|
---|
6 | # $Id$
|
---|
7 | #
|
---|
8 | use strict;
|
---|
9 | use Exporter();
|
---|
10 | use vars qw(@ISA @EXPORT_OK);
|
---|
11 | @ISA = qw(Exporter);
|
---|
12 | # global vars are here
|
---|
13 | @EXPORT_OK = qw(%defpkgdir %extpkgdir %version %param %filteredfiles &pb_init);
|
---|
14 | use vars @EXPORT_OK;
|
---|
15 | use AppConfig qw(ARGCOUNT_HASH);
|
---|
16 |
|
---|
17 | sub pb_init {
|
---|
18 |
|
---|
19 | my $conffile = shift;
|
---|
20 | my $ptr;
|
---|
21 |
|
---|
22 | my $config = AppConfig->new({
|
---|
23 | # Auto Create variables mentioned in Conf file
|
---|
24 | CREATE => 1,
|
---|
25 | DEBUG => 0,
|
---|
26 | GLOBAL => {
|
---|
27 | # Each conf item is a hash
|
---|
28 | ARGCOUNT => AppConfig::ARGCOUNT_HASH
|
---|
29 | }
|
---|
30 | });
|
---|
31 | $config->file($conffile);
|
---|
32 |
|
---|
33 | # Root of the project to build
|
---|
34 | # needs at least 2 levels of dir as in the upper
|
---|
35 | # other dirs will be created and used
|
---|
36 | $ptr = $config->get("param");
|
---|
37 | %param = %$ptr;
|
---|
38 |
|
---|
39 | # List of pkg to build by default
|
---|
40 | $ptr = $config->get("defpkgdir") || die "Unable to find defpkgdir in $conffile";
|
---|
41 | %defpkgdir = %$ptr;
|
---|
42 |
|
---|
43 | # List of additional pkg to build when all is called
|
---|
44 | $ptr = $config->get("extpkgdir");
|
---|
45 | %extpkgdir = %$ptr;
|
---|
46 |
|
---|
47 | # Valid version names
|
---|
48 | $ptr = $config->get("version");
|
---|
49 | %version = %$ptr;
|
---|
50 |
|
---|
51 | # List of files to filter
|
---|
52 | $ptr = $config->get("filteredfiles");
|
---|
53 | %filteredfiles = %$ptr;
|
---|
54 |
|
---|
55 | }
|
---|
56 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.