History

20060303

Charles.Forsyth committed 19 years ago

Commit 64418801 parent eea662d1386 files · +530669 −-6Browse files

Showing the changes to utils/awk/mac.code (1 of 1386 files). Show all

Unified · Split

utils/awk/mac.code+65−0
@@ -0,0 +1,65 @@
1+This file contains a make shell script and a version
2+of the file missing95.c for the Mac, courtesy of
3+Dan Allen.
4+
5+make shell script:
6+
7+# MPW Shell script to build Awk using Apple's MRC compiler.
8+# 22 Jan 1999 - Created by Dan Allen.
9+# 25 Mar 1999 - Updated for newer Awk.
10+#
11+# Porting notes for the Mac:
12+#
13+# 1. main in main.c needs to have its prototype changed to:
14+#
15+# int main(int argc, char *argv[], char *environ[])
16+#
17+# 2. popen and pclose in missing95.c need to have as their body the
18+# older style
19+#
20+# return NULL;
21+#
22+# as parallel pipes are not supported by MPW.
23+#
24+# 3. To make your Mac more responsive while long awk scripts run,
25+# you may want to add some SpinCursor calls to support cooperative multitasking.
26+#
27+# All of these minor changes can be put under "#ifdef powerc" for portability's sake.
28+#
29+#
30+
31+If {1} == "clean"
32+ Delete -i awk maketab maketab.c.o ytab.c.o b.c.o main.c.o parse.c.o proctab.c proctab.c.o tran.c.o lib.c.o run.c.o lex.c.o missing95.c.o
33+Else
34+ MRC ytab.c -w off -opt speed
35+ MRC b.c -w off -opt speed
36+ MRC main.c -w off -opt speed
37+ MRC parse.c -w off -opt speed
38+ MRC maketab.c -w off -opt speed
39+ PPCLink -o maketab maketab.c.o "{PPCLibraries}InterfaceLib" "{PPCLibraries}MathLib" "{PPCLibraries}StdCLib" "{PPCLibraries}StdCRuntime.o" "{PPCLibraries}PPCCRuntime.o" "{PPCLibraries}PPCToolLibs.o" -t MPST -c 'MPS '
40+ maketab > proctab.c
41+ MRC proctab.c -w off -opt speed
42+ MRC tran.c -w off -opt speed
43+ MRC lib.c -w off -opt speed
44+ MRC run.c -w off -opt speed
45+ MRC lex.c -w off -opt speed
46+ MRC missing95.c -w off -opt speed
47+ PPCLink -o awk ytab.c.o b.c.o main.c.o parse.c.o proctab.c.o tran.c.o lib.c.o run.c.o lex.c.o missing95.c.o "{PPCLibraries}InterfaceLib" "{PPCLibraries}MathLib" "{PPCLibraries}StdCLib" "{PPCLibraries}StdCRuntime.o" "{PPCLibraries}PPCCRuntime.o" "{PPCLibraries}PPCToolLibs.o" -d
48+ SetFile awk -d . -m . -t MPST -c 'MPS '
49+End
50+
51+
52+missing95.c for the Mac:
53+
54+/* popen and pclose are not available on the Mac. */
55+
56+#include <stdio.h>
57+
58+FILE *popen(char *s, char *m) {
59+ return NULL;
60+}
61+
62+int pclose(FILE *f) {
63+ return NULL;
64+}
65+