How to check in a Makefile that the compiler supports bin-annot?


#1

I’d like to use the option in case it is supported.
Thanks!


#2

Something like this?

OPTS += $(shell ocamlc --help | grep -q bin-annot && echo "-bin-annot")

all:
	echo "OPTS=$(OPTS)"