From dd3e666c5114f81c9518e9f5ba14959ced079ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 14 Dec 2009 23:04:00 +0100 Subject: Add dependencies Makefile generation to erlc(1) and compile(3) This is useful when a project is built with Makefiles and erlc(1) instead of EMakefiles. Tracking dependencies by hand is error-prone and it becomes painful when using external application headers like EUnit's one. A dependencies Makefile will look like this: module.beam: module.erl \ /usr/local/lib/erlang/lib/eunit-2.1.4/include/eunit.hrl \ header.hrl When included in the main Makefile, 'module' will be recompiled only when needed. GCC offers the same feature and new erlc(1) options are compatible with it. More informations at: http://wiki.github.com/dumbbell/otp/dependencies-makefile --- erts/doc/src/erlc.xml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'erts/doc/src') diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml index 1e8960c22c..7e689c418e 100644 --- a/erts/doc/src/erlc.xml +++ b/erts/doc/src/erlc.xml @@ -141,6 +141,50 @@ for compiling native code, which needs to be compiled with the same run-time system that it should be run on.

+ -M + +

Produces a Makefile rule to track headers dependencies. The + rule is sent to stdout. No object file is produced. +

+
+ -MF Makefile + +

Like the option above, except that the + Makefile is written to Makefile. No object + file is produced. +

+
+ -MD + +

Same as .Pbeam]]>. +

+
+ -MT Target + +

In conjunction with or + , change the name of the rule emitted + to Target. +

+
+ -MQ Target + +

Like the option above, except that + characters special to make(1) are quoted. +

+
+ -MP + +

In conjunction with or + , add a phony target for each dependency. +

+
+ -MG + +

In conjunction with or + , consider missing headers as generated + files and add them to the dependencies. +

+
--

Signals that no more options will follow. -- cgit v1.2.3