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.3 by sashby, Tue Nov 14 17:43:14 2006 UTC

# Line 104 | Line 104 | sub template_object()
104   sub template_dir()
105     {
106     my $self=shift;
107 <   my ($templatedir)=@_;
108 <   $templatedir ||= $ENV{LOCALTOP}."/".$ENV{SCRAM_CONFIGDIR};
107 >   # Default template dir:
108 >   my $templatedir = $ENV{LOCALTOP}."/".$ENV{SCRAM_CONFIGDIR};
109 >   # Allow projects to override the template dir (subdir of config):
110 >   if (exists ($ENV{SCRAM_PROJECT_TEMPLATEDIR})) {
111 >       $templatedir.="/".$ENV{SCRAM_PROJECT_TEMPLATEDIR};
112 >   }
113     $self->{TEMPLATE_DIR} = $templatedir;
114     return $self;
115     }
# Line 113 | Line 117 | sub template_dir()
117   sub template_config()
118     {
119     my $self=shift;
116  
120     # Set up Template opts:
121     $self->{TEMPLATE_CONFIG} =
122        {
123 <      INCLUDE_PATH => $self->{TEMPLATE_DIR},
123 >      INCLUDE_PATH => [ "$self->{TEMPLATE_DIR}","$ENV{LOCALTOP}/$ENV{SCRAM_CONFIGDIR}" ],
124        PLUGIN_BASE  =>  [ qw(SCRAM::Plugins BuildSystem::Template::Plugins) ],
125        EVAL_PERL    => 1
126           };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines