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
|
--- mercury-compiler-0.12.2.orig/compiler/modules.m 2006-01-18 18:37:38.000000000 +1300
+++ mercury-compiler-0.12.2/compiler/modules.m 2006-11-23 20:26:45.000000000 +1300
@@ -3326,27 +3326,32 @@
ForeignImportedModules = [_ | _],
(
Target = il,
- ForeignImportTarget = DllFileName,
+ ForeignImportTargets = [DllFileName],
ForeignImportExt = ".dll"
;
Target = java,
- ForeignImportTarget = ClassFileName,
+ ForeignImportTargets = [ClassFileName],
ForeignImportExt = ".java"
;
Target = c,
- ForeignImportTarget = ObjFileName,
+ ForeignImportTargets = [ObjFileName, PicObjFileName],
ForeignImportExt = ".mh"
;
Target = asm,
- ForeignImportTarget = ObjFileName,
+ ForeignImportTargets = [ObjFileName, PicObjFileName],
ForeignImportExt = ".mh"
),
- io__write_string(DepStream, "\n\n", !IO),
- io__write_string(DepStream, ForeignImportTarget, !IO),
- io__write_string(DepStream, " : ", !IO),
- write_dependencies_list(ForeignImportedModules, ForeignImportExt,
- DepStream, !IO),
- io__write_string(DepStream, "\n\n", !IO)
+ WriteForeignImportTarget = (pred(ForeignImportTarget::in,
+ !.IO::di, !:IO::uo) is det :-
+ io__write_string(DepStream, "\n\n", !IO),
+ io__write_string(DepStream, ForeignImportTarget, !IO),
+ io__write_string(DepStream, " : ", !IO),
+ write_dependencies_list(ForeignImportedModules,
+ ForeignImportExt, DepStream, !IO),
+ io__write_string(DepStream, "\n\n", !IO)
+ ),
+ list.foldl(WriteForeignImportTarget, ForeignImportTargets,
+ !IO)
),
(
|