You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a .c or .h file uses #include "foo.h", ocamlbuild has to copy that file in the _build directory but currently it doesn't, making the build fail.
The attached patch (against today's svn) uses cpp to get these dependencies for .c and .h files: .c files are "allowed" to include .c and .h files while .h files can only include .h files.
The reason for this limitation is that the whole list would be: c, cpp, cxx, cp, C, h, hpp, hxx, hxp, H, CPP, HPP, c++, h++, tcc, hh, cc and I took a conservative approach.
The patch also changes Lexers.ocamldep_output to make it work with cpp's output (or ocamldep without -modules).
The text was updated successfully, but these errors were encountered:
I just found out that if there are two files "foo.c" and "foo.h", the .c file will never be picked up (internally, the extension is dropped).
There might be a very simple fix: try to copy both, if "foo.*" is being used, chances are both "foo.h" and "foo.c" are used. Unfortunately, but unfortunately I don't have the time to do it right now since I'm on the leave (for a place without a real internet access).
PR transferred from https://caml.inria.fr/mantis/view.php?id=5107
[original reporter: Camarade_Tux]
When a
.c
or.h
file uses#include "foo.h"
, ocamlbuild has to copy that file in the_build
directory but currently it doesn't, making the build fail.The attached patch (against today's svn) uses cpp to get these dependencies for
.c
and.h
files:.c
files are "allowed" to include.c
and.h
files while.h
files can only include.h
files.The reason for this limitation is that the whole list would be: c, cpp, cxx, cp, C, h, hpp, hxx, hxp, H, CPP, HPP, c++, h++, tcc, hh, cc and I took a conservative approach.
The patch also changes
Lexers.ocamldep_output
to make it work with cpp's output (or ocamldep without-modules
).The text was updated successfully, but these errors were encountered: