Changeset 7 in ProjectBuilder for devel/pb


Ignore:
Timestamp:
Jul 29, 2007, 1:55:14 AM (17 years ago)
Author:
Bruno Cornec
Message:

Begin to compile and execute

Location:
devel/pb
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/common.pm

    r6 r7  
    4040
    4141# Set temp directory
    42 if (undef $ENV{'TMPDIR'}) {
     42if (not defined $ENV{'TMPDIR'}) {
    4343    $ENV{'TMPDIR'}="/tmp";
    4444}
  • devel/pb/lib/pb.pm

    r6 r7  
    1313@EXPORT_OK = qw(%defpkgdir %extpkgdir @version &pb_init);
    1414use vars @EXPORT_OK;
    15 use AppConfig;
     15use AppConfig qw(ARGCOUNT_ONE ARGCOUNT_HASH ARGCOUNT_LIST EXPAND_ALL);
    1616
    1717sub pb_init {
    1818
    1919my $conffile = shift;
     20my $ptr;
    2021
    2122my $config = AppConfig->new({
     
    2324                            CREATE => 1,
    2425                            DEBUG => 0,
    25                             GLOBAL => {
    26                             # Each conf item has one single parameter
    27                             ARGCOUNT => AppConfig::ARGCOUNT_ONE
    28                             }
    2926                        });
     27$config->define("pbroot" => { ARGCOUNT => ARGCOUNT_ONE, EXPAND => EXPAND_ALL });
     28$config->define("cvsroot" => { ARGCOUNT => ARGCOUNT_ONE });
     29$config->define("defpkgdir" => { ARGCOUNT => ARGCOUNT_HASH });
     30$config->define("extpkgdir" => { ARGCOUNT => ARGCOUNT_HASH });
     31$config->define("version" => { ARGCOUNT => ARGCOUNT_LIST });
     32
    3033$config->file($conffile);
    3134
     
    3336# needs at least 2 levels of dir as in the upper
    3437# other dirs will be created and used
    35 $ENV{'PBROOT'} = $config->get("pbproj");
     38$ENV{'PBROOT'} = $config->get("pbroot") || die "Unable to find pbroot in $conffile";
    3639
    3740# If CVS, gives the way to login
     
    3942
    4043# List of pkg to build by default
    41 %defpkgdir = $config->get("defpkgdir");
     44$ptr = $config->get("defpkgdir") || die "Unable to find defpkgdir in $conffile";
     45%defpkgdir = %$ptr;
    4246
    4347# List of additional pkg to build when all is called
    44 %extpkgdir = $config->get("extpkgdir");
     48$ptr = $config->get("extpkgdir");
     49%extpkgdir = %$ptr;
    4550
    4651# Valid version names
    47 @version = $config->get("version");
     52$ptr = $config->get("version");
     53@version = @$ptr;
    4854
    4955}
Note: See TracChangeset for help on using the changeset viewer.