|     ||nmakegen - Dependency and Makefile generator for nML|
Generation of .depend files, which is one of the features of nmakegen, is based on Objective Caml' ocamldep.
nmakegen [ -I lib-dir ] [ -r lib-dir ] [ -l linkflags ] [ -f ] [ -d ] [ -cc camlc ] [ -co camlopt ] [ -nc nmlc ] [ -nm nmakegen ] [ -lex nlex ] [ -yacc nyacc ] [ -yf yaccflags ] [ object ]
The nmakegen command does following three things: (1) it collects a set of nML source files (.n, .nl, .ny files) and Objective Caml source files (.ml, .mli files) and outputs their names in .nfiles, (2) scans the files in .nfiles for references to external compilation units and outputs dependency lines in .depend, and (3) outputs Makefile in a format suitable for the make(1) utility. The .depend file ensures that make(1) will compile the source files in the correct order, and recompile those files that need to when a source file is modified.
When there is a lex file foo.nl in the list of directories searched for source files, nmakegen generates a foo.n file from the foo.nl file by nlex and outputs a message of "Warning: nmakegen made foo.n". When there is a yacc file foo.ny in the list of directories searched for source files, nmakegen generates a foo.n file from the foo.ny file by nyacc and outputs a message of "Warning: nmakegen made foo.n". When there is any problem with parsing an nML source file foo.n, nmakegen outputs a message of "Warning: nmakegen fails to deal with foo.n", ignores the file foo.n, and then proceeds. When there are mutually recursive files a.n and b.n in the list of directories searched for source files, nmakegen terminates abnormally and outputs a message of "Error: a.n and b.n are mutually recursive." Finally, when there already exists either .nfiles, .depend, or Makefile in the current working directory, nmakegen does not overwrite the existing file. Instead, nmakegen generates .nfiles.1, .depend.1, or Makefile.1. When there already exists .nfiles.i, .depend.j, or Makefile.k in the directory, nmakegen generates .nfiles.i+1, .depend.j+1, or Makefile.k+1, respectively.
The following command-line options are recognized by nmakegen.
Add the given directory to the list of directories searched for source files. If a source file foo.n mentions an external compilation unit Bar, a dependency on that unit's interface bar.cmi is generated only if the source for bar is found in the current directory or in one of the directories specified with -I. Otherwise, Bar is assumed to be a module from the standard library, and no dependencies are generated. For programs that span multiple directories, it is recommended to pass nmakegen the same -I options that are passed to the compiler.
Same as -I, except that the given directory is searched recursively.
Use the given linkflags in Makefile.
Generate only .nfiles.
Generate only .nfiles and .depend.
Use the given camlc to compile Objective Caml source files in Makefile.
Use the given camlopt to compile Objective Caml source files in Makefile.
Use the given nmlc to compile nML source files in Makefile.
Use the given nmakegen in Makefile.
Use the given nlex to generate .n files from .nl files.
Use the given nyacc to generate .n files from .ny files.
Use the given yaccflags for nyacc.