blob: 4d09cefb1bd979d341c5712a9b10f4d7006c172a (
plain)
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
|
proc DBC_Copy:AdmFileType {} {
return "dbadmfile";
}
proc DBC_Copy:OutputDirTypeName {} {
return "dbtmpfile";
}
proc DBC_Copy:HandleInputFile { ID } {
scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
switch $name {
DBC_BaseArray.hxx {return 1;}
default {
return 0;
}
}
}
proc DBC_Copy:Execute { unit args } {
msgprint -i -c "DBC_Copy:Execute" "Copy of DBC_BaseArray include"
foreach file $args {
scan $file "%\[^:\]:%\[^:\]:%\[^:\]" Unit type name
if { $name == "DBC_BaseArray.hxx" } {
set source [woklocate -p DBC:source:DBC_BaseArray_objs.hxx [wokinfo -N $unit]]
} else {
set source [woklocate -p DBC:source:$name [wokinfo -N $unit]]
}
set vistarget [woklocate -p DBC:pubinclude:$name [wokinfo -N $unit]]
set target [wokinfo -p pubinclude:$name $unit]
if { [catch {eval exec "cmp $source $vistarget"} ] } {
msgprint -i -c "DBC_Copy:Execute" "Copy $source to $target"
eval exec "cp -p $source $target"
} else {
msgprint -i -c "DBC_Copy:Execute" "No change in $source"
}
}
return 0;
}
|