Mercurial > octave
view test/mex/module.mk @ 25493:3b5db971e091
ensure test/mex directory exists when compiling mex test files
* test/mex/module.mk (%.mex : %.c): Limit pattern rule to
$(MEX_TEST_FUNCTIONS) files. Depend on %reldir%/$(octave_dirstamp) as
an order-only prerequisite.
(DIRSTAMP_FILES): Add %reldir%/$(octave_dirstamp) to the list.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 25 Jun 2018 11:31:41 -0400 |
parents | e255f09dc70e |
children | 1188addabaad b12ff2cea46a |
line wrap: on
line source
mex_TEST_FILES = \ %reldir%/bug-54096.tst \ %reldir%/bug-51725.tst \ $(MEX_TEST_SRC) MEX_TEST_SRC = \ %reldir%/bug_54096.c \ %reldir%/bug_51725.c MEX_TEST_FUNCTIONS = $(MEX_TEST_SRC:%.c=%.mex) ## Since these definitions for MKOCTFILE and MKMEXFILE are only used ## here, defining them in this file is probably OK. If there are ever ## used elsewhre, maybe then they could be moved to build-aux/module.mk ## or the main Makefile.am file. The MKOCTFILE variables are included ## for completeness, in case we someday want to test building .oct ## files as well. AM_V_mkmexfile = $(am__v_mkmexfile_@AM_V@) am__v_mkmexfile_ = $(am__v_mkmexfile_@AM_DEFAULT_V@) am__v_mkmexfile_0 = @echo " MKMEXFILE " $@; am__v_mkmexfile_1 = AM_VOPT_mkmexfile = $(am__vopt_mkmexfile_@AM_V@) am__vopt_mkmexfile_ = $(am__vopt_mkmexfile_@AM_DEFAULT_V@) am__vopt_mkmexfile_0 = am__vopt_mkmexfile_1 = -v ## And probably many others... MKOCTFILECPPFLAGS = \ -I$(top_srcdir)/libinterp/corefcn \ -Ilibinterp/corefcn MKOCTFILE = $(top_builddir)/src/mkoctfile $(MKOCTFILECPPFLAGS) MKMEXFILECPPFLAGS = \ -I$(top_srcdir)/libinterp/corefcn \ -Ilibinterp/corefcn MKMEXFILE = $(top_builddir)/src/mkoctfile --mex $(MKMEXFILECPPFLAGS) $(MEX_TEST_FUNCTIONS) : %.mex : %.c | %reldir%/$(octave_dirstamp) $(AM_V_mkmexfile)$(MKMEXFILE) $(AM_VOPT_mkmexfile) $< -o $@ || rm -f $@ DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) ## Until we decide how to handle installing the executable MEX files, ## don't install them or the associated test files. noinst_TEST_FILES += $(mex_TEST_FILES)