summaryrefslogtreecommitdiff
path: root/mbld/mbld.1
blob: 3efbeba321de9e9b801f263ee9882f554e850b40 (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
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
144
145
146
147
.TH MBLD 1
.SH NAME
mbld
.SH SYNOPSIS
.B mbld
.I [all | clean | install | uninstall | test]
.I -[?csSfr]
.I [-b bin]
.I [-l lib]
.I [-R src]
.I [-I inc]
.I [-B base]
.I [-r runtime]
.I [file... | targets...]
.br
.SH DESCRIPTION
.PP
The 'mbld' tool takes as input a list of Myrddin or assembly sources,
and compiles them in the correct dependency order into either a library or
an executable. 

.PP
By default, it reads from an input file called 'bld.proj', but if given the
option '-b' or '-l', it will build a binary or library, respectively, from
the arguments specified on the command lines.

.PP
Myrbuild will default to building for the current architecture and operating
system.

.PP
The myrbuild options are:

.TP
.B -[h|?]
Print a summary of the available options.

.TP
.B -b \fIbinname\fP
Compile source into a binary named 'name'. If neither this option nor
the '-l' option are given, myrbuild will create a binary called 'a.out'.

.TP
.B -I \fIpath\fP
Add 'path' to the search path for unquoted use statments. This option
does not affect the search path for local usefiles, which are always
searched relative to the compiler's current working directory. Without
any options, the search path defaults to /usr/include/myr.

.TP
.B -l
.I libname
Compile source given into a library called 'lib\fIname\fP.a' (or the equivalent
for the target platform), and a matching usefile called 'name'. Only static
libraries are currently supported. Ignores the contents of \fIbld.proj\fP
and \fIbld.sub\fP if they exist.

.TP
.B -R
.I src
Compile source given into a binary in temporary storage, and then execute it
with the command line arguments passed in.

.TP
.B -S
Tell the toolchain to generate assembly for the code being compiled as well
as the .o files, as though '-S' was passed to 6m.

.TP
\fB-r \fIruntime
Compile a binary using the runtime 'rt'. If the runtime name given
is 'none', then no runtime will be linked. If this option is not provided,
then the default runtime in '$INSTALL_ROOT/myr/lib/_myrrt.o' will be
used.

.SH ENVIRONMENT VARIABLES

.TP
.B DESTDIR
prepends $DESTDIR to the path to install to. For example, if the installgg
prefix is /usr, the binary path is bin/, then binaries will get copied
to $DESTDIR/usr/bin on 
.B mbld install

.TP
.B MYR_MC
Compiles the binaries with '$MYR_MC' instead of the default value of
6m.

.TP
.B MYR_MUSE
Merges usefiles with '$MYR_MUSE' instead of hte default value of
muse.

.TP
.B MYR_RT
Links with the runtime $MYR_RT instead of the default of
prefix/lib/myr/_myrrt.o. 

.SH FILES

.TP
.I bld.proj
The root project file. All paths in bldfiles are relative
to the most recent one in the directory heirarchy.

.TP
.I bld.sub
A sub build. This contains targets, and may specify dependencies
on other targets within the same project.

.SH EXAMPLE
.EX
    mbld
.EE

.PP
The command above will load bld.proj and all associated sub builds,
and run the commands to incrementally rebuild the code.

.EX
    mbld -l foo bar.myr baz.myr
.EE

.PP
The command above will ignore bld.proj and produce a library
named \fIlibfoo.a\fP, consisting of the files \fIbar.myr\fP
and \fIbaz.myr\fP



.SH FILES
The source for muse is available from
.B git://git.eigenstate.org/git/ori/mc.git
and lives in the
.I myrbuild/
directory within the source tree.

.SH SEE ALSO
.IR 6m(1)
.IR muse(1)
.IR ld(1)
.IR as(1)

.SH BUGS
.PP
None known.