Dear William and list members, On 01/22/2014 08:43 AM, William R wrote: > could you explain differences with OCamlMakefile This is a fair question, since Markus' work has been around for quite a while, but I am afraid that I never used it. Nevertheless, I went through the documentation and the source code and here are the main differences I can see at the moment (my apologies to Markus if I am mistaken): OCamlMakefile vs my Makefile * User specifies SOURCES and RESULT vs optional OBJ and BIN * Order of linking must be specified vs optional * Builds library and toplevels vs none * Supports -pack/-for-pack and profiling vs none * Preprocessors in special comments, no command-line options per source file vs one tag file per source file + global options * Generates documentation vs none * Subprojects vs mono-project * Support for ocamlfind vs none * Included in another Makefile vs includes another Makefile * One native code compilation vs two * 1300 lines vs 830 lines * Plethora of phony targets vs two * Short documentation vs long OCamlMakefile supports more features than I do, although I use tag files à la ocamlbuild. This is not surprising, as my makefile was not developed to cover many use-cases, just mine and those of beginners. Accordingly, I put an extreme emphasis on different issues, like having the laziest makefile possible: it works a lot in order to compile as little as possible and requires the programmer to configure as little as possible. The output on the terminal is entirely generated by the Makefile, not by the tools it calls, and, if available, it leverages the --output-sync option of GNU Make 4.0 to keep everything readable while using parallelism. Also, there is an impact analysis in case of errors, so there are no redundant error messages (one error implying another in another module) and no useless recompilations (bound to fail). Another feature is that my makefile keeps track of source deletions, which are a major source of inconsistencies, while updating compilation dependencies locally, and, generally speaking, the main design principle is that you should *never* have to do [make clean] if you don't really want to (the only case where you should is compiling to native code when maximising cross-module optimisations and inlining). > why not contribute to this project if you introduced compatible > clever ideas ? OCamlMakefile and my Makefile address different crowds, but these can actually benefit from each other, you are right. I will keep that in mind, but before I add more features à la OCamlMakefile, or the other way around, I would like to have bug reports. You can simply try my makefile by putting it in a single-directory project and setting BIN to the main module's basename in Makefile.cfg. (Each file requiring camlp4 or special options for certain tools require a tag file. See Makefile.man) Best regards, Christian PS I did not know about obuild. I will have a look at it.