OCaml Forge

Detail: [#990] Problem with generated C headers

Bugs: Browse | Download .csv | Monitor

[#990] Problem with generated C headers

Date:
2011-06-07 12:12
Priority:
3
State:
Open
Submitted by:
Alexis Bernadet (axiles)
Assigned to:
Sylvain Le Gall (gildor-admin)
Product:
OASIS
Due in version:
None
Resolution:
None
Severity:
normal
Version:
0.2.0
Component:
Plugin OCamlbuild
Operating System:
All
 
URL:
Summary:
Problem with generated C headers

Detailed description
In my project I need to generate C header files with an internal tool that uses C stub
To illustrate this problem/bug/feature request I have made a simple example :

The _oasis file describes a project as follow :

There are two executables :

Executable gen_header
Path: .
MainIs: gen_header.ml
Install: false
Custom: true
CSources: add.c
Executable test_header
Path: .
MainIs: test_header.ml
BuildTools: gen_header
Custom: true
CSources: myconst.c, generated_header.h

generated_header.h is produced by the executable gen_header. So I naturally add a rule in myocamlbuild.ml.

The problem is that for building gen_header, it tries to build gen_header.h : so we naturally have an error message.

/bin/sh: ./gen_header: not found

We can notice that if we work with generated_header.c instead of generated header.h there is no problem.

The only solution I have found to go around this problem is to :

- remove generated_header.h in the _oasis file

- add
dep ["file:myconst.c"] ["generated_header.h"]
in the myocamlbuild.ml file


Followup

No Followups Have Been Posted

Attached Files:

Attachments:
oasis_generated_header.tar.gz

Changes:

Field Old Value Date By
assigned_tonone2012-03-12 22:14gildor-admin
File Added130: oasis_generated_header.tar.gz2011-06-07 12:12axiles