Troubles with my Makefile
===

I downloaded [this](http://caml.inria.fr/pub/docs/u3-ocaml/make/Makefile.ocaml) `Makefile` and I'm having a hard time understanding how it works.

I am programming in `Ocaml` and for some module, I implemented an `interface` (.mli). Strangely, even when I add the `.mli` file before the corresponding `.ml` file, the Makefile seems to skip it; so I'm getting the error

    could not find the X.cmi for the module X.

Worse, I added some file without the required `.mli` and strangely again the Makefile automatically added them to the list of sources.<br/>
I'm saying **strangely** but perhaps its perfectly normal to Makefiles expert.

I'm not an expert when it comes to Makefile, can anyone help me understanding how this Makefile works?

The compilation works fine, when I replace the line

    $(EXEC): $(OBJS) 
	$(CAMLC) $(CUSTOM) -o $(EXEC) $(LIBS) $(OBJS)

With

    $(EXEC): $(SOURCES) 
	$(CAMLC) $(CUSTOM) -o $(EXEC) $(LIBS) $(SOURCES)

and add the required .mli