-
Notifications
You must be signed in to change notification settings - Fork 15
/
mkfile
143 lines (114 loc) · 2.68 KB
/
mkfile
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Directories common to all architectures.
# Build in order:
# - critical libraries used by the limbo compiler
# - the limbo compiler (used to build some subsequent libraries)
# - the remaining libraries
# - commands
# - utilities
EMUDIRS=\
lib9\
libbio\
libmp\
libsec\
libmath\
utils/iyacc\
limbo\
libinterp\
libkeyring\
libdraw\
libmemdraw\
libmemlayer\
utils/data2c\
utils/ndate\
emu\
KERNEL_DIRS=\
# mkconfig is included at this point to allow it to override
#the preceding declarations (particularly KERNEL_DIRS) if need be
<mkconfig
DIRS=\
$EMUDIRS\
appl\
foo:QV:
echo mk all, clean, install, installall or nuke
all:V: all-$HOSTMODEL
clean:V: clean-$HOSTMODEL
install:V: install-$HOSTMODEL
installall:V: installall-$HOSTMODEL
emu:V: emu/all-$HOSTMODEL
emuinstall:V: emu/install-$HOSTMODEL
emuclean:V: emu/clean-$HOSTMODEL
emunuke:V: emu/nuke-$HOSTMODEL
nuke:V: nuke-$HOSTMODEL
cleandist:V: clean
rm -f $ROOT/$OBJDIR/lib/lib*.a
nukedist:V: nuke
rm -f $ROOT/$OBJDIR/bin/*.exe
rm -f $ROOT/$OBJDIR/lib/lib*.a
&-Posix:QV:
for j in $DIRS utils
do
echo "(cd $j; mk $MKFLAGS $stem)"
(cd $j; mk $MKFLAGS $stem) || exit 1
done
&-Nt:QV:
for (j in $DIRS utils )
{
echo '@{builtin cd' $j '; mk $MKFLAGS $stem}'
@{builtin cd $j; mk.exe $MKFLAGS $stem }
}
&-Inferno:QV:
for (j in $DIRS utils)
{
echo '@{builtin cd' $j '; mk $MKFLAGS $stem}'
@{builtin cd $j; mk $MKFLAGS $stem }
}
&-Plan9:QV:
for (j in $DIRS utils)
{
echo '@{builtin cd' $j '; mk $MKFLAGS $stem}'
@{builtin cd $j; mk $MKFLAGS $stem }
}
emu/&-Posix:QV:
for j in $EMUDIRS
do
echo "(cd $j; mk $MKFLAGS $stem)"
(cd $j; mk $MKFLAGS $stem) || exit 1
done
emu/&-Nt:QV:
for (j in $EMUDIRS)
{
echo '@{builtin cd' $j '; mk $MKFLAGS $stem}'
@{builtin cd $j; mk $MKFLAGS $stem }
}
emu/&-Plan9:QV:
for (j in $EMUDIRS)
{
echo '@{builtin cd' $j '; mk $MKFLAGS $stem}'
@{builtin cd $j; mk $MKFLAGS $stem }
}
# Convenience targets
Inferno-% inferno-% Inferno-386-% inferno-386-%:V:
mk 'SYSHOST=Inferno' 'OBJTYPE=386' $stem
Inferno-arm-% inferno-arm-%:V:
mk 'SYSHOST=Inferno' 'OBJTYPE=arm' $stem
Plan9-% plan9-%:V:
mk 'SYSHOST=Plan9' 'OBJTYPE=386' $stem
Irix-% irix-%:V:
mk 'SYSHOST=Irix' 'OBJTYPE=mips' $stem
Linux-% linux-%:V:
mk 'SYSHOST=Linux' 'OBJTYPE=386' $stem
NetBSD-% netbsd-%:V:
mk 'SYSHOST=NetBSD' 'OBJTYPE=386' $stem
Nt-% nt-% Win95-% win95-%:V:
mk 'SYSHOST=Nt' 'OBJTYPE=386' $stem
Solaris-% solaris-%:V:
mk 'SYSHOST=Solaris' 'OBJTYPE=sparc' $stem
mkdirs:V: mkdirs-$SHELLTYPE
mkdirs-rc:V:
mkdir -p `{cat lib/emptydirs}
chmod 555 mnt/* n/client/* n/*
mkdirs-sh:V:
mkdir -p `cat lib/emptydirs`
chmod 555 mnt/* n/client/* n/*
mkdirs-nt:V:
mkdir -p `{cmd /c type lib\emptydirs}