#
# This file describes the actions to be taken when installing a "module".
# See base/system/smlnj/installer/generic-install.sml for how this file
# is to be interpreted.
#
# (C) 2006-2015 The Fellowship of SML/NJ
#
# Each action is on a single line and has one of the following forms:
#
#	<module> lib <a> <r> <d>
#	<module> lib <a> <r> <d> <aa>
#	<module> ulib <a> <r> <d>
#	<module> ulib <a> <r> <d> <aa>
#	<module> anchor <a> <p>
#	<module> libanchor <a> <p>
#	<module> prog ...
#	<module> dprog ...
#	<module> src
#
# Short explanation:
#
# The <module> tag defines the scope of the command.  It should be a name
# used in the config/targets file.
#
# "lib" (library) and "ulib" (library for Unix-like systems only):
#   <a>: "anchor" -- the anchor name currently used by the library
#           to be registered for compilation
#   <aa>: "alternative anchor" -- optional alternative anchor name which is
#           to be used once the library is in its final location
#           (this must be used if "anchor" is already bound
#           and used for other libraries which come from the
#           bootfile bundle),
#   <r>: "relative name" -- path to library's .cm file relative to anchor
#           (standard syntax)
#   <d>: "dir" -- directory name that anchor should be bound to,
#           name is relative to smlnjroot and in standard syntax
#
# "anchor" (assign path name to anchor) and
# "libanchor" (assign path name relative to lib dir to anchor)
#   <a>: "anchor" -- the anchor name to be defined
#   <p>: "path" -- the path name that is the value
#
# "prog" (install "standalone" program, e.g., ml-yacc, etc.) and
# "dprog" (install standalone program, but defer this action until all
#          libraries are installed)
#   These have 0, 1, 2, or 3 arguments:
#     {prog|dprog} <t> <h> <d>
#  <t>: "target" -- name of program; this is the same as the basename
#      of the heap image to be generated as well as the
#      final arc of the source tree's directory name
#      if <t> is not given, it is taken to be identical to the module name
#  <h>: "optional heap directory" -- optional subdirectory where the
#      build command drops the heap image; default is "-", which means
#      no subdirectory is given (i.e., the heap image winds up
#      in the toplevel directory of the respective program's source tree)
#  <d>: "dir" -- directory relative to installation root where source
#     tree for this program resides; by default, this is taken to be
#     identical to the module name
#
# "src" (register a source package that needs to be unpacked but requires
#        no further action)
#

# modules that don't require installer actions other than
# unpacking their respectivesource trees:
runtime	    	src
compiler	src
smlnj-c		src
cm		src
system		src
doc		src

# Backwards compatible views of the SML Basis Library
#
old-basis lib basis-2004.cm basis-2004.cm base/old-basis/2004

# Addional components of the SML/NJ library that are not used by the compiler:
#    (unix-lib.cm is installed only on Unix-like systems)
smlnj-lib ulib unix-lib.cm      unix-lib.cm      smlnj-lib/Unix
smlnj-lib  lib inet-lib.cm      inet-lib.cm      smlnj-lib/INet
smlnj-lib  lib regexp-lib.cm    regexp-lib.cm    smlnj-lib/RegExp
smlnj-lib  lib reactive-lib.cm  reactive-lib.cm  smlnj-lib/Reactive
smlnj-lib  lib hash-cons-lib.cm hash-cons-lib.cm smlnj-lib/HashCons
smlnj-lib  lib json-lib.cm      json-lib.cm      smlnj-lib/JSON
smlnj-lib  lib html4-lib.cm	html4-lib.cm	 smlnj-lib/HTML4
smlnj-lib  lib sexp-lib.cm      sexp-lib.cm      smlnj-lib/SExp
smlnj-lib  lib xml-lib.cm       xml-lib.cm       smlnj-lib/XML

# Concurrent ML:
cml lib cml core-cml.cm     cml/src
cml lib cml cml-internal.cm cml/src
cml lib cml cml.cm          cml/src
cml lib cml basis.cm        cml/src

# Concurrent ML support libraries:
cml-lib  lib cml-lib      trace-cml.cm cml/cml-lib/cm-descr
cml-lib  lib cml-lib      smlnj-lib.cm cml/cml-lib/cm-descr
cml-lib  lib cml          trace-cml.cm cml/src
cml-lib  lib cml          smlnj-lib.cm cml/src
cml-lib  lib cml          inet-lib.cm  cml/src
cml-lib ulib cml          unix-lib.cm  cml/src
cml-lib  lib cml          cml-lib.cm   cml/src

# eXene toolkit:
eXene lib eXene.cm eXene.cm eXene

# C Kit:
ckit lib ckit-lib.cm ckit-lib.cm ckit/src

# NLFFI foreign function interface library
ml-nlffi-lib lib c memory/memory.cm   nlffi/lib
ml-nlffi-lib lib c internals/c-int.cm nlffi/lib
ml-nlffi-lib lib c c.cm               nlffi/lib

# portable dependency graph library:
pgraph-util lib pgraph-util.cm pgraph-util.cm pgraph

# tracing/debugging/profiling:
tdp-util lib smlnj-tdp plugins.cm trace-debug-profile
tdp-util lib smlnj-tdp back-trace.cm trace-debug-profile
tdp-util lib smlnj-tdp coverage.cm trace-debug-profile

# MLRISC libraries (those that are not already included in the compiler):
mlrisc libanchor Control.cm SMLNJ-MLRISC
mlrisc libanchor Lib.cm     SMLNJ-MLRISC
mlrisc libanchor Visual.cm  SMLNJ-MLRISC
mlrisc libanchor MLRISC.cm  SMLNJ-MLRISC
mlrisc libanchor MLTREE.cm  SMLNJ-MLRISC
mlrisc libanchor Graphs.cm  SMLNJ-MLRISC
mlrisc libanchor IA32.cm    SMLNJ-MLRISC
mlrisc libanchor AMD64.cm   SMLNJ-MLRISC
mlrisc libanchor SPARC.cm   SMLNJ-MLRISC

#mlrisc libanchor StagedAlloc.cm SMLNJ-MLRISC
#mlrisc libanchor CCall.cm SMLNJ-MLRISC
#mlrisc libanchor CCall-x86-64.cm SMLNJ-MLRISC
#mlrisc libanchor CCall-x86.cm SMLNJ-MLRISC
#mlrisc libanchor CCall-sparc.cm SMLNJ-MLRISC
#mlrisc libanchor CCall-Vararg.cm SMLNJ-MLRISC
#mlrisc libanchor CCall-VarargCall.cm SMLNJ-MLRISC
#mlrisc libanchor CCall-VarargInterp.cm SMLNJ-MLRISC

mlrisc anchor RA.cm MLRISC/cm
#mlrisc anchor SPARC.cm MLRISC/cm
mlrisc anchor Peephole.cm MLRISC/cm
mlrisc anchor StagedAlloc.cm MLRISC/cm
#mlrisc anchor IA32.cm MLRISC/cm
#mlrisc anchor AMD64.cm MLRISC/cm
mlrisc anchor CCall.cm MLRISC/cm
mlrisc anchor CCall-x86-64.cm MLRISC/cm
mlrisc anchor CCall-x86.cm MLRISC/cm
mlrisc anchor CCall-sparc.cm MLRISC/cm
mlrisc anchor CCall-Vararg.cm MLRISC/cm
mlrisc anchor CCall-VarargCall.cm MLRISC/cm
mlrisc anchor CCall-VarargInterp.cm MLRISC/cm

mlrisc lib OTHER-MLRISC RA.cm             MLRISC/cm SMLNJ-MLRISC
mlrisc lib OTHER-MLRISC Peephole.cm       MLRISC/cm SMLNJ-MLRISC
#mlrisc lib OTHER-MLRISC IA32.cm  MLRISC/cm SMLNJ-MLRISC
mlrisc lib OTHER-MLRISC IA32-Peephole.cm  MLRISC/cm SMLNJ-MLRISC
#mlrisc lib OTHER-MLRISC AMD64.cm MLRISC/cm SMLNJ-MLRISC
mlrisc lib OTHER-MLRISC AMD64-Peephole.cm MLRISC/cm SMLNJ-MLRISC
#mlrisc lib OTHER-MLRISC SPARC.cm          MLRISC/cm SMLNJ-MLRISC
mlrisc lib OTHER-MLRISC StagedAlloc.cm    MLRISC/cm SMLNJ-MLRISC
mlrisc lib OTHER-MLRISC CCall.cm          MLRISC/cm SMLNJ-MLRISC
mlrisc lib OTHER-MLRISC CCall-x86-64.cm          MLRISC/cm SMLNJ-MLRISC
mlrisc lib OTHER-MLRISC CCall-x86.cm          MLRISC/cm SMLNJ-MLRISC
mlrisc lib OTHER-MLRISC CCall-sparc.cm          MLRISC/cm SMLNJ-MLRISC
mlrisc lib OTHER-MLRISC CCall-Vararg.cm          MLRISC/cm SMLNJ-MLRISC

# libraries supporting MLRISC tools:
mlrisc-tools lib mlrisc-tools pp.cm             MLRISC/Tools
mlrisc-tools lib mlrisc-tools source-map.cm     MLRISC/Tools
mlrisc-tools lib mlrisc-tools sml-ast.cm        MLRISC/Tools
mlrisc-tools lib mlrisc-tools prec-parser.cm    MLRISC/Tools
mlrisc-tools lib mlrisc-tools parser.cm         MLRISC/Tools
mlrisc-tools lib mlrisc-tools match-compiler.cm MLRISC/Tools

# old lexer generator:
ml-lex     	   prog
ml-lex-mllex-tool  lib   mllex-tool.cm mllex-tool.cm ml-lex/tool
ml-lex-lex-ext	   lib   lex-ext.cm    lex-ext.cm    ml-lex/tool

# LALR(1) parser generator:
ml-yacc            prog  ml-yacc src
ml-yacc   	   lib   mlyacc-tool.cm mlyacc-tool.cm ml-yacc/tool
ml-yacc-grm-ext    lib   grm-ext.cm     grm-ext.cm     ml-yacc/tool

# new (unicode-capable) lexer generator:
ml-ulex    	   dprog ml-ulex - ml-lpt/ml-ulex
ml-ulex	   	   lib 	 ml-ulex-tool.cm ml-ulex-tool.cm ml-lpt/ml-ulex/tool
ml-ulex-mllex-tool lib 	 mllex-tool.cm   mllex-tool.cm   ml-lpt/ml-ulex/tool
ml-ulex-lex-ext    lib 	 lex-ext.cm      lex-ext.cm      ml-lpt/ml-ulex/tool

# LL(k) parser generator:
ml-antlr           dprog ml-antlr - ml-lpt/ml-antlr
ml-antlr   	   lib 	 ml-antlr-tool.cm ml-antlr-tool.cm ml-lpt/ml-antlr/tool
ml-antlr-grm-ext   lib 	 grm-ext.cm       grm-ext.cm       ml-lpt/ml-antlr/tool

# support library for ml-ulex and ml-antlr:
ml-lpt-lib 	   lib 	 ml-lpt-lib.cm ml-lpt-lib.cm ml-lpt/lib

# bottom-up rewrite code generator generator:
ml-burg    	   prog
ml-burg		   lib	 mlburg-tool.cm mlburg-tool.cm ml-burg/tool
ml-burg		   lib 	 burg-ext.cm    burg-ext.cm    ml-burg/tool

# utility program for use by heap2exec:
heap2asm   prog

# NLFFI foreign function interface generator:
ml-nlffigen dprog ml-nlffigen - nlffi/gen
nowhere     dprog nowhere - MLRISC/Tools/nowhere
