I decided to switch my compilation environment from a Makefile and a configure file to Oasis.
In my configure
file I had this command :
EXTERNALLIB=""
if test "$USEOCAMLFIND" = yes; then
EXTERNALLIB=$(ocamlfind query -i-format External)
fi
and in my Makefile
:
externalwrapper.ml: externalwrapper_actual.ml externalwrapper_fake.ml config.status
@rm -f externalwrapper.ml
@if [ -z "$(EXTERNALLIB)" ]; then \
cat externalwrapper_fake.ml >> externalwrapper.ml;\
else \
cat externalwrapper_actual.ml >> externalwrapper.ml;\
fi;\
chmod -w externalwrapper.ml
which allowed me to compile an actual Externalwrapper
module if the library existed in my computer and a fake one if it didn't.
Now, I try to do it in Oasis but I don't know if it's possible and, if yes, how should I do it ?