Lines 1-78
Link Here
|
1 |
--- build.scm.orig Fri Jan 25 10:19:37 2002 |
1 |
--- build.scm.orig Wed Nov 27 10:44:43 2002 |
2 |
+++ build.scm Sun Apr 7 17:20:38 2002 |
2 |
+++ build.scm Sat Nov 30 13:16:28 2002 |
3 |
@@ -585,6 +585,7 @@ |
3 |
@@ -1438,7 +1438,7 @@ |
4 |
(curses darwin "" "" #f () ()) |
|
|
5 |
(regex darwin "" "" #f () ()) |
6 |
|
7 |
+ (c freebsd "" "" #f () ()) |
8 |
(m freebsd "" "-lm" #f () ()) |
9 |
(curses freebsd "" "-lncurses" "/usr/lib/libncurses.a" () ()) |
10 |
(regex freebsd "" "-lgnuregex" "" () ()) |
11 |
@@ -1362,7 +1363,7 @@ |
12 |
(lambda (files parms) |
4 |
(lambda (files parms) |
13 |
(and (batch:try-chopped-command |
5 |
(and (batch:try-chopped-command |
14 |
parms |
6 |
parms |
15 |
- "cc" "-O" "-c" |
7 |
- "cc" "-O3 -pipe " "-c" |
16 |
+ "%%CC%%" "%%CFLAGS%%" "-c" |
8 |
+ "%%CC%%" "%%CFLAGS%%" "-c" |
17 |
(c-includes parms) |
9 |
(c-includes parms) |
18 |
(c-flags parms) |
10 |
(c-flags parms) |
19 |
files) |
11 |
files) |
20 |
@@ -1372,7 +1373,7 @@ |
12 |
@@ -1459,7 +1459,7 @@ |
21 |
(batch:rename-file parms |
|
|
22 |
oname (string-append oname "~")) |
23 |
(and (batch:try-command parms |
24 |
- "cc" "-o" oname |
25 |
+ "%%CC%%" "-o" oname "-export-dynamic" |
26 |
(must-be-first |
27 |
'("-nostartfiles" |
28 |
"pre-crt0.o" "crt0.o" |
29 |
@@ -1381,29 +1382,31 @@ |
30 |
oname))) |
31 |
(defcommand compile-dll-c-files freebsd |
32 |
(lambda (files parms) |
13 |
(lambda (files parms) |
33 |
- (and (batch:try-chopped-command |
14 |
(and (batch:try-chopped-command |
34 |
- parms |
15 |
parms |
35 |
- "cc" "-O" "-fpic" "-c" |
16 |
- "cc" "-O3 -pipe " |
36 |
- (string-append |
17 |
+ "%%CC%%" "%%CFLAGS%%" |
37 |
- "-I" (parameter-list-ref parms 'scm-srcdir)) |
18 |
"-fPIC" "-c" (c-includes parms) |
38 |
- (c-includes parms) |
19 |
(c-flags parms) |
39 |
- (c-flags parms) |
20 |
files) |
40 |
- files) |
21 |
@@ -1468,10 +1468,10 @@ |
41 |
- (let ((objs (map c->o files))) |
22 |
(lambda (fname) |
42 |
- (every |
23 |
(and (batch:try-command |
43 |
- (lambda (f) |
24 |
parms |
44 |
- (and (batch:try-command |
25 |
- "cc" "-shared" |
45 |
- parms "ld" "-Bshareable" f) |
26 |
+ "%%CC%%" "-shared" |
46 |
- (batch:try-command |
27 |
(cond |
47 |
- parms "mv" "a.out" f))) |
28 |
((equal? fname "edline") "-lreadline") |
48 |
- objs) |
29 |
- ((equal? fname "x") "-L/usr/X11R6/lib -lSM -lICE -lXext -lX11 -lxpg4") |
49 |
- objs)))) |
30 |
+ ((equal? fname "x") "-L%%X11BASE%%/lib -lSM -lICE -lXext -lX11") |
50 |
- |
31 |
(else "")) |
51 |
+ (and |
32 |
"-o" |
52 |
+ (batch:try-chopped-command |
33 |
(string-append fname ".so") |
53 |
+ parms |
34 |
@@ -1485,7 +1485,7 @@ |
54 |
+ "%%CC%%" "%%CFLAGS%%" |
|
|
55 |
+ "-fPIC" "-c" (c-includes parms) |
56 |
+ (c-flags parms) |
57 |
+ files) |
58 |
+ (let* ((results |
59 |
+ (map |
60 |
+ (lambda (fname) |
61 |
+ (and (batch:try-command |
62 |
+ parms |
63 |
+ "%%CC%%" "-shared" "-o" |
64 |
+ (string-append fname ".so") |
65 |
+ (string-append fname ".o")) |
66 |
+ (batch:delete-file |
67 |
+ parms (string-append fname ".o")) |
68 |
+ (string-append fname ".so"))) |
69 |
+ (truncate-up-to (map c-> files) #\/)))) |
70 |
+ (and (apply and? results) results))))) |
71 |
(defcommand make-dll-archive freebsd |
72 |
(lambda (oname objects libs parms) |
35 |
(lambda (oname objects libs parms) |
73 |
(and (batch:try-command |
36 |
(and (batch:try-command |
74 |
parms |
37 |
parms |
75 |
- "ld" "-Bshareable" "-o" |
38 |
- "cc" "-shared" "-o" |
76 |
+ "%%CC%%" "-shared" "-o" |
39 |
+ "%%CC%%" "-shared" "-o" |
77 |
(string-append |
40 |
(string-append |
78 |
(car (parameter-list-ref parms 'implvic)) |
41 |
(car (parameter-list-ref parms 'implvic)) |