bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking application of dependencies from make rules without recipes


From: Paul Smith
Subject: Re: Checking application of dependencies from make rules without recipes
Date: Sun, 18 Jun 2017 14:06:01 -0400

On Sun, 2017-06-18 at 19:45 +0200, SF Markus Elfring wrote:
> i_compilation?=echo
> o_compilation?=echo
> a_generation?=$(o_compilation) 'Checked modules: '
> 
> parsing_c.cma: ast_c.cmo token_annot.cmo
>         $(a_generation) '$<' > $@
> 
> %.cmi: %.mli
>         $(i_compilation) '$<' > $@
> 
> %.cmo: %.ml %.cmi
>         $(o_compilation) '$<' > $@
> 
> includes.cmi: ast_c.cmo
> 
> 
> > LANG=C make --no-builtin-rules -f parsing-rule-check1.make
> make: *** No rule to make target 'ast_c.cmo', needed by 'parsing_c.cma'.  
> Stop.

I feel like this is the same question you've already asked, and Philip
already answered, before.

That means ast_c.cmo doesn't exist, and make can't come up with a way to
build it.  If you showed a listing of the files that exist in the
directory then we could tell you precisely what make is doing.

In order to build ast_c.cmo, make could create it (based on your second
pattern rule) if it can find a way to create ast_c.ml AND ast_c.cmi.  At
least one of these files doesn't exist, so it can't just use this rule. 
If it's the ast_c.ml file that doesn't exist, make gives up immediately
since it doesn't know any way to create that file.

If it's the ast_c.cmi file that doesn't exist, make will see if it can
be created by using your first pattern rule; that means it needs a file
ast_c.mli.  If that file doesn't exist and make doesn't know how to
build it, so make gives up, and says it can't build ast_c.cmo because
there are no valid rules that would build it.

To know which of these situations is the case you can either look at the
contents of your directory, or run make with the "-d" option and see
which file is not able to be built.  If you'd like slightly less verbose
(but still pretty verbose) output you can use the --debug=i option to
show only implicit rule search information.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]