source: ProjectBuilder/devel/pb/lib/pb.pm@ 17

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
RevLine 
[6]1#!/usr/bin/perl -w
2#
3# Project Builder configuration file
4# For project pb ;-)
5#
6# $Id$
7#
8use strict;
9use Exporter();
10use vars qw(@ISA @EXPORT_OK);
11@ISA = qw(Exporter);
12# global vars are here
[17]13@EXPORT_OK = qw(%defpkgdir %extpkgdir %version %param %filteredfiles &pb_init);
[6]14use vars @EXPORT_OK;
[17]15use AppConfig qw(ARGCOUNT_HASH);
[6]16
17sub pb_init {
18
19my $conffile = shift;
[7]20my $ptr;
[6]21
22my $config = AppConfig->new({
23 # Auto Create variables mentioned in Conf file
24 CREATE => 1,
25 DEBUG => 0,
[17]26 GLOBAL => {
27 # Each conf item is a hash
28 ARGCOUNT => AppConfig::ARGCOUNT_HASH
29 }
[6]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
[17]36$ptr = $config->get("param");
37%param = %$ptr;
[6]38
39# List of pkg to build by default
[7]40$ptr = $config->get("defpkgdir") || die "Unable to find defpkgdir in $conffile";
41%defpkgdir = %$ptr;
[6]42
43# List of additional pkg to build when all is called
[7]44$ptr = $config->get("extpkgdir");
45%extpkgdir = %$ptr;
[6]46
47# Valid version names
[7]48$ptr = $config->get("version");
[8]49%version = %$ptr;
[6]50
[15]51# List of files to filter
52$ptr = $config->get("filteredfiles");
[17]53%filteredfiles = %$ptr;
[15]54
[6]55}
561;
Note: See TracBrowser for help on using the repository browser.