#************************************************************************** #* * #* OCaml * #* * #* David Allsopp, Tarides * #* * #* Copyright 2024 David Allsopp Ltd. * #* * #* All rights reserved. This file is distributed under the terms of * #* the GNU Lesser General Public License version 2.1, with the * #* special exception on linking described in the file LICENSE. * #* * #************************************************************************** ROOTDIR = ../.. include $(ROOTDIR)/Makefile.common ifeq "$(NATIVE_COMPILER)" "true" DRIVER = ../tools/test_in_prefix.opt$(EXE) else DRIVER = ../tools/test_in_prefix$(EXE) endif DRIVER_ARGS = \ $(VERBOSE_FLAG) --bindir "$(BINDIR)" --libdir "$(LIBDIR)" \ $(call bool_to_with, ocamlnat, $(INSTALL_OCAMLNAT)) \ $(call bool_to_with, ocamlopt, $(NATIVE_COMPILER)) \ $(OTHERLIBRARIES) --pwd "$(SRCDIR_ABS)/testsuite/in_prefix" default: $(DRIVER) @$(info In order to execute the test itself, run $(MAKE) test-in-prefix) @$< $(DRIVER_ARGS) --summary ifeq "$(origin VERBOSE)" "command line" VERBOSE_FLAG = --verbose else VERBOSE_FLAG = endif test-in-prefix: $(DRIVER) ../tools/main_in_c.$(O) @$< $(DRIVER_ARGS) SCRUB_ENV = \ CAML_LD_LIBRARY_PATH OCAMLLIB CAMLLIB OCAMLPARAM OCAMLRUNPARAM CAMLRUNPARAM # Generates --without-$(1) if $(2) = false or --with-$(1) otherwise bool_to_with = --with$(if $(filter false,$(2)),out)-$(strip $(1)) ../tools/test_in_prefix$(EXE) \ ../tools/test_in_prefix.opt$(EXE): $(wildcard ../tools/*.ml*) ../tools/%: $(MAKE) -C $(ROOTDIR) testsuite/tools/$*