Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007116OCamlconfigure and build/installpublic2016-01-05 21:102017-10-14 20:31
Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0007116: Allow easy retrieval of Makefile.config's values
DescriptionCurrently the values in Makefile.config are difficult to extract. While looking at ocamlbuild's 0000038 PR on github I tried to get a cleaner way to get them and found out that someone has already done it elegantly and explained it well: [^] .

Basically, adding the following to a Makefile creates a pattern rule than can then be used to print the value of the variable which name is used in the pattern.

          @echo $*=$($*)

For instance, on my machine, "make -f config/Makefile print-MKEXE" will print "MKEXE=gcc". We can also skip the "MKEXE=" part if we want (I think it makes more sense for us actually).

This would greatly simplify changes in various places and avoid having to "include" the config makefile which means overwriting all the corresponding variables. It would help a lot to have it in 4.03.
TagsNo tags attached.
Attached Files

- Relationships
related to 0004957resolved ocamlc -where, camlp4 -where, etc. add \r\n on mingw 

-  Notes
gasche (administrator)
2016-01-05 21:13
edited on: 2016-01-05 21:26

One other approach to do this which I also considered is to make it easier to extract information from $(ocamlc -config) without parsing step. For example, $(ocamlc -config-key ext_obj) would be the string ".o".

I'm fine with adrien's proposal which seems easier to implement (-config exposes more information than Makefile.config, but in practice the information I needed is available in both).

shindere (manager)
2017-02-22 16:11

Isn't ocamlc -config enough? Can you give an example of a place where this would improve the situation?
gasche (administrator)
2017-10-14 20:31

GPR#1430 proposes a -config-var option for 4.07: [^]

- Issue History
Date Modified Username Field Change
2016-01-05 21:10 adrien New Issue
2016-01-05 21:13 gasche Note Added: 0015229
2016-01-05 21:26 gasche Note Edited: 0015229 View Revisions
2017-02-22 16:11 shindere Note Added: 0017396
2017-02-22 16:11 shindere Status new => feedback
2017-02-23 16:38 doligez Category OCaml internal build/install (Makefiles, configure) => configure and build/install
2017-10-12 14:41 dra Relationship added related to 0004957
2017-10-14 20:31 gasche Note Added: 0018566

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker