-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathcontarg
More file actions
executable file
·90 lines (70 loc) · 2.2 KB
/
contarg
File metadata and controls
executable file
·90 lines (70 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# converts an s4 target to a build xml target
gawk '
$1 ~ /:/ {
targetName = $1;
gsub(/:/, "", targetName);
next;
}
$1 ~ /-D/ {
split($0, a, "=");
name = a[1];
value = a[2];
gsub(/-D/, "", name);
gsub(/\t/, "", name);
gsub(/\\/, "", value);
gsub(/ /, "", name);
gsub(/ /, "", value);
sysprops[name] = value;
next;
}
$1 ~ /JAVA_CMD/ {
next;
}
NF > 0 {
for (i = 2; i <= NF; i++) {
args[i] = $i;
gsub(/ /, "", args[i]);
gsub(/\t/, "", args[i]);
}
}
END {
print " <!-- ********************************************************** --> ";
print " <!-- * * --> ";
print " <!-- * " targetName pad(55 - length(targetName)) "* --> ";
print " <!-- * * --> ";
print " <!-- ********************************************************** --> ";
print " <target name=\"" targetName "\"";
print " description=\"Write me!\">";
print " <java classpath=\"${classes_dir}\"";
print " classname=\"${batch_main}\"";
print " fork=\"true\">";
dumpVMprops();
dumpProps();
dumpArgs();
print " </java>";
print " </target>";
}
function dumpProps() {
sysprops["java.util.logging.config.file"] = "${logger_props}";
sysprops["edu.cmu.sphinx.decoder.BatchDecoder.skip"] = "${skip}";
for (i in sysprops) {
print " <sysproperty key=\"" i "\"";
print " value=\"" sysprops[i] "\"/>";
}
}
function dumpArgs() {
for (i in args) {
print " <arg value=\"" args[i] "\"/>";
}
}
function dumpVMprops() {
print " <jvmarg value=\"-ea\"/>";
print " <jvmarg value=\"-${jit}\"/> ";
print " <jvmarg value=\"-ms${initial_heap_size}\"/>";
print " <jvmarg value=\"-mx${maximum_heap_size}\"/> ";
print " <jvmarg value=\"-Xloggc:${gc_log_file}\"/>";
}
function pad(size) {
return substr(" ", 1, size);
}
' $*