+# this should be sligtly better, since should work with 'make all opt'
+ifneq (,$(findstring all,$(MAKECMDGOALS)))
+ # if we 'make all opt' the deps for 'all' should be fine also for opt
+ # if we 'make opt all' it should not work...
+ TO_INCLUDE+=.depend
+ TO_DEPEND_ON=$(LIB_DEPS)
+else ifneq (,$(findstring opt,$(MAKECMDGOALS)))
+ TO_INCLUDE+=.depend.opt
+ TO_DEPEND_ON=$(LIBX_DEPS)
+else ifneq (,$(findstring world,$(MAKECMDGOALS)))
+ ifeq ($(HAVE_OCAMLOPT),yes)
+ TO_INCLUDE+=.depend.opt
+ TO_DEPEND_ON=$(LIBX_DEPS)
+ else
+ TO_INCLUDE+=.depend
+ TO_DEPEND_ON=$(LIB_DEPS)
+ endif
+else
+ TO_INCLUDE+=.depend
+ TO_DEPEND_ON=$(LIB_DEPS)