add base mlt.conf file that should go in /etc/mlt.conf
[bpt/mlt.git] / BUILDING
CommitLineData
c0a3b488
AC
1===================
2System requirements
3===================
4
5Compiling the mlt tool requires a "working version" of SML/NJ. I've
6tested it with 110.42. You'll need to get the SML/NJ source code
7package and modify some of the included .cm files to make a few
8additional internal structures visible. The necessary changes to make
9are described below, with paths given relative to your base SML/NJ
10directory. The lines listed for each file should be added right before
11the "is" keyword at the end of the exports list for a library. The
12"is" is on the first non-indented line after the initial "Library"
13line in each of these files.
14
15The following lines to src/compiler/core.cm:
16 structure Types
17 structure EntityEnv
18 structure Modules
19 structure Stamps
20 structure Bindings
21 structure TypesUtil
22 structure VarCon
23 structure ModuleUtil
24 structure II
25 structure BasicTypes
26 structure PPType
27 structure Access
28
29The following lines to both src/system/smlnj/compiler/current.cm
30and src/system/smlnj/compiler/x86.cm:
31 structure Types
32 structure EntityEnv
33 structure Modules
34 structure Stamps
35 structure Bindings
36 structure TypesUtil
37 structure VarCon
38 structure ModuleUtil
39 structure II
40 structure BasicTypes
41 structure PPType
42 structure Access
43 structure Unify
44
45The following line to src/compiler/Elaborator/elaborate.cm:
46 structure Unify
47
48Finally, add the following line somewhere _below_ the "is" in
49src/system/smlnj/compiler/x86.cm:
50 $smlnj/viscomp/elaborate.cm
51
52After making these changes, you can rebuild and install the compiler
53with the following sequence of commands:
54
55cd $smlnjdir/src/system
56sml
57CM.autoload "$smlnj/cmb.cm";
58CMB.make ();
59<exit from sml by typing the end-of-file sequence>
60./makeml
61./installml
62
63
64=============
65Configuration
66=============
67
68If it is possible for you to modify a file /etc/mlt.conf, then you
69can edit this file to set various options related to locations of
70important files on your file system. In particular, you may want to
71set the 'compiler', 'lib', and 'sml' options (documented in the
72manual) if you have SML/NJ installed somewhere besides /usr/local/sml
73or the mlt src directory somewhere besides /usr/local/share/mlt/src.
74If you can't modify /etc/mlt.conf, then you can change the first
75variable definition in src/config.sml to a different path, or you can
76leave it as is and provide all configuration in the local mlt.conf
77file for each project.
78
79You should also edit the paths in the simple install script in this
80directory if you want to install system-wide binaries and scripts to
81somewhere besides /usr/local/bin.
82
83These changes may be made for you by a fancy configuration program in
84a future release.
85
86
87========
88Building
89========
90
91All sources may be built by running the build script in this
92directory. It does a clean re-build of all source files and stabilizes
93all libraries produced. The build script is not appropriate for use
94during development. Use the standard SML/NJ CM mechanisms if you are
95changing the code and don't want to recompile everything each time.
96
97[There is probably a better way to do this, but I haven't figured one
98out yet.]