* [Caml-list] A useful Makefile collection for OCaml projects
@ 2013-10-29 21:45 Michael Grünewald
[not found] ` <52706214.8090504@riken.jp>
0 siblings, 1 reply; 2+ messages in thread
From: Michael Grünewald @ 2013-10-29 21:45 UTC (permalink / raw)
To: caml-list
Dear Ocamllers!
I use a moderately sophisticated collection of Makefile to build my
OCaml-based projects. I recently decided to polish its organisation and
documentation, because it might be useful to someone else. If you are
interested in trying it, check your backups and visit
https://bitbucket.org/michipili/bsdmakepscripts
Installation instructions are found on this page and an example for a
simple ocaml program.
Of course, your feedback would be much appreciated and I would try to
answer questions that you may have!
It is usable with BSD Make and some variants. On FreeBSD it is `make`,
on other BSDs it is probably `make` as well, on Mac OS X it is `bsdmake`
and on Debian it is `pmake`. If you do not have any of these programs,
you may install bmake, see
https://bitbucket.org/michipili/bsdmakepscripts/wiki/BMake.
FEATURES OVERVIEW
- It is written for make(1) and it is thus easy to extend or to
integrate in a typical unixish workflow.
- It supports OBJDIRPREFIX, which means you can separate sources and
object files and implement “compilation profiles” having products stored
in different directories.
- It supports parallel build at the “directory granularity level”.
- It supports ocamlfind, ocamldoc, ocamldepends, ocamllex and ocamlyacc.
- It supports the production of GPG-signed distfile tarballs.
Aside from compiling OCaml programs, it can do many more useful things
(typeset with TeX, weave and tangle with noweb).
EXAMPLES & DOCUMENTATION
There are examples in the `test/ocaml' subdirectory, each subdirectory
is a toy product demonstrating some features. The `miniproj-3' displays
use of the most advanced features.
Recipes for building OCaml based products are found in the Wiki:
https://bitbucket.org/michipili/bsdmakepscripts/wiki/DevelopOCamlSoftware
HEY, I THOUGHT MAKEFILES WERE OBSOLETE!
Makefile-based build systems might have limitations and shortcomings[*],
but:
- Writing Makefiles is a *generic* competence useful to all *NIX users,
so these build systems rely on something you more or less already know
or want to learn.
- Since Makefile are *generic* you can also build non-OCaml pieces of
your system with them, so these build systems rely on a single tool.
- There are ambitious build systems relying exclusively on makefiles, as
FreeBSD's (and other BSD's I guess), so these build systems have a
proved ability to scale to very large projects.
[*] It requires a suitable architecture and organisation to support
dependencies across directories.
OCAMLBUILD
Since I started my education at the university of Montpellier where I
met Berke Durak, one of the authors of `ocamlbuild`, I feel appropriate
to stress that ***this is not a concurrent project to ocamlbuild***! :-)
Have fun with these make macros!
--
Michael
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-30 6:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-29 21:45 [Caml-list] A useful Makefile collection for OCaml projects Michael Grünewald
[not found] ` <52706214.8090504@riken.jp>
2013-10-30 6:55 ` Michael
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox