File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ use vars qw(@ISA);
25
25
# Data Section
26
26
# ************************************************************
27
27
28
+ my %templates = (' ghs' => ' .gpj' ,
29
+ ' ghscmd' => ' .cmd' );
30
+ my @tkeys = sort keys %templates ;
31
+ my $default_template = ' ghs' ;
32
+
28
33
my $startre ;
29
34
30
35
# ************************************************************
@@ -67,6 +72,7 @@ sub post_file_creation {
67
72
return undef ;
68
73
}
69
74
75
+
70
76
sub compare_output {
71
77
# my $self = shift;
72
78
return 1;
@@ -79,6 +85,26 @@ sub project_file_extension {
79
85
}
80
86
81
87
88
+ sub get_template {
89
+ return @tkeys ;
90
+ }
91
+
92
+
93
+ sub file_visible { # (self, template)
94
+ return $_ [1] eq $default_template ;
95
+ }
96
+
97
+
98
+ sub project_file_name {
99
+ my ($self , $name , $template ) = @_ ;
100
+ my $project_file_name = $self -> SUPER::project_file_name($name , $template );
101
+ if (!$self -> file_visible($template )) {
102
+ $project_file_name =~ s /\. gpj$/ .cmd/ ;
103
+ }
104
+ return $project_file_name ;
105
+ }
106
+
107
+
82
108
sub fill_value {
83
109
my ($self , $name ) = @_ ;
84
110
my $value ;
Original file line number Diff line number Diff line change
1
+ pushd <%convert_slashes(reltop)%>
2
+ <%foreach(custom_types)%>
3
+ <%foreach(custom_type->input_files)%>
4
+ <%if(flag_overrides(custom_type->input_file, gendir))%>
5
+ <%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%><%postmkdir%>
6
+ <%endif%>
7
+ <%translate_vars(custom_type->command, win32)%> ^
8
+ <%if(flag_overrides(custom_type->input_file, commandflags))%>
9
+ <%translate_vars(flag_overrides(custom_type->input_file, commandflags), win32)%> ^
10
+ <%else%>
11
+ <%translate_vars(custom_type->commandflags, win32)%> ^
12
+ <%endif%>
13
+ <%if(custom_type->output_option)%>
14
+ <%custom_type->input_file%> <%custom_type->output_option%> <%custom_type->input_file->output_file%>
15
+ <%else%>
16
+ <%custom_type->input_file%>
17
+ <%endif%>
18
+ <%endfor%>
19
+ <%endfor%>
20
+ popd
You can’t perform that action at this time.
0 commit comments