On Tue, Jan 22, 2019 at 21:50:14 +0000, Alex Bennée wrote:
> Wire up test/fp-test into the main testing Makefile. Currently we skip
> some of the extF80 and f128 related tests. Once we re-factor and fix
> these tests the plumbing should get simpler.
> 
> Signed-off-by: Alex Bennée <[email protected]>
(snip)
> +# FPU Emulation tests (aka softfloat)
> +#
> +# As we still have some places that need fixing the rules are a little
> +# more complex than they need to be and have to override some of the
> +# generic Makefile expansions. Once we are cleanly passing all
> +# the tests we can simplify the make syntax.
> +
> +FP_TEST_BIN=$(BUILD_DIR)/tests/fp/fp-test
> +
> +# the build dir is created by configure
> +.PHONY: $(FP_TEST_BIN)
> +$(FP_TEST_BIN): $(BUILD_DIR)/tests/fp fpu/softfloat.c

I'd remove the prerequisites here: (1) tests/fp should have been
created by configure, and we're not adding a recipe for it here;
(2) fpu/softfloat.c is unnecessary, because the makefile in tests/fp
will take care of the prerequisites.

> +     $(call quiet-command, \
> +       cd $(BUILD_DIR)/tests/fp && make, \
> +          "BUILD", $<)

I'd rather use $(MAKE) here, e.g. so that "-j" propagates.

With those two changes, the delta wrt the above would be:

 # the build dir is created by configure
 .PHONY: $(FP_TEST_BIN)
-$(FP_TEST_BIN): $(BUILD_DIR)/tests/fp fpu/softfloat.c
+$(FP_TEST_BIN):
        $(call quiet-command, \
-         cd $(BUILD_DIR)/tests/fp && make, \
-          "BUILD", $<)
+         $(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" $(notdir $@), \
+         "BUILD", "$(notdir $@)")

The rest looks good!

Thanks,

                Emilio

Reply via email to