ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/TemplateInterface.pm
(Generate patch)

Comparing COMP/SCRAM/src/BuildSystem/TemplateInterface.pm (file contents):
Revision 1.2 by sashby, Fri Dec 10 13:41:37 2004 UTC vs.
Revision 1.4 by sashby, Mon Dec 4 14:21:23 2006 UTC

# Line 105 | Line 105 | sub template_dir()
105     {
106     my $self=shift;
107     my ($templatedir)=@_;
108 <   $templatedir ||= $ENV{LOCALTOP}."/".$ENV{SCRAM_CONFIGDIR};
108 >   my $dir = $ENV{LOCALTOP}."/".$ENV{SCRAM_CONFIGDIR};
109 >   if ((exists $ENV{SCRAM_PROJECT_TEMPLATEDIR}) &&
110 >       ($ENV{SCRAM_PROJECT_TEMPLATEDIR} !~ /^\s*$/)) {
111 >       $dir = $ENV{SCRAM_PROJECT_TEMPLATEDIR};
112 >   }
113 >   $templatedir ||= $dir;
114     $self->{TEMPLATE_DIR} = $templatedir;
115     return $self;
116     }
# Line 113 | Line 118 | sub template_dir()
118   sub template_config()
119     {
120     my $self=shift;
116  
121     # Set up Template opts:
122     $self->{TEMPLATE_CONFIG} =
123        {
124 <      INCLUDE_PATH => $self->{TEMPLATE_DIR},
125 <      PLUGIN_BASE  =>  [ qw(SCRAM::Plugins BuildSystem::Template::Plugins) ],
126 <      EVAL_PERL    => 1
127 <         };
124 >      INCLUDE_PATH => [ "$self->{TEMPLATE_DIR}","$ENV{LOCALTOP}/$ENV{SCRAM_CONFIGDIR}" ],
125 >      PLUGIN_BASE  => [ qw(SCRAM::Plugins BuildSystem::Template::Plugins) ],
126 >      EVAL_PERL    => 1,
127 >      ABSOLUTE     => 1
128 >      };
129    
130     return $self;
131     }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines