summaryrefslogtreecommitdiff
path: root/vms/mod_dep.com
blob: bbc6d2d7429e6a343a69cc78d91b47cb8955988c (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
$!                                              3 March 2005.  SMS.
$!
$! Info-ZIP VMS accessory procedure.
$!
$!    Modify a dependencies file (P1), changing the object file name to
$!    P2.
$!    P3 = output file specification.
$!
$!
$ prefix = f$edit( p3, "COLLAPSE")
$!
$! Strip any device:[directory] from P2.
$!
$ obj_name = f$parse( P2, , , "NAME", "SYNTAX_ONLY")+ -
   f$parse( P2, , , "TYPE", "SYNTAX_ONLY")
$!
$ open /read /error = end_main deps_in 'p1'
$ open /write /error = end_main deps_out 'p3'
$ on error then goto loop_main_end
$ loop_main_top:
$     read /error = loop_main_end deps_in line
$     line_reduced = f$edit( line, "COMPRESS, TRIM")
$     colon = f$locate( " : ", line_reduced)
$     line = obj_name+ f$extract( colon, 2000, line)
$     write deps_out "''line'"
$ goto loop_main_top
$!
$ loop_main_end:
$ close deps_in
$ close deps_out
$!
$ end_main:
$!