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