diff scripts/module.mk @ 31899:c01849481834

avoid problems with $(shell ...) execution in Makefile The $(shell ...) variable in GNU Make is expanded early before Makefile variables are defined or exported. This feature causes trouble for some of Octave's build system shell scripts that may need environment variables and that also need to be executed early to generate lists of dependencies. To work around this problem we can use configure to substitute the needed variables instead of relying on the Make environment. See also the discussion here: https://octave.discourse.group/t/egrep-warning-egrep-is-obsolescent-using-ggrep-e/3484/37 * find-defun-files.in.sh: Rename from find-defun-files.sh. * find-files-with-tests.in.sh: Rename from find-files-with-tests.sh. * build-aux/module.mk: Update. * configure.ac (AC_CONFIG_FILES): Include find-defun-files.sh and find-files-with-tests.sh in the list of output files. * libinterp/module.mk, liboctave/module.mk, scripts/module.mk: Remove "$(srcdir)/" prefix from invocations or find-defun-files.sh and find-files-with-tests.sh.
author John W. Eaton <jwe@octave.org>
date Wed, 08 Mar 2023 15:06:45 -0500
parents 02b97abbc6fc
children 25e8f63da459
line wrap: on
line diff
--- a/scripts/module.mk	Wed Mar 08 09:28:28 2023 -0800
+++ b/scripts/module.mk	Wed Mar 08 15:06:45 2023 -0500
@@ -94,7 +94,7 @@
   $(GEN_FCN_FILES) \
   $(PKG_ADD_FILES)
 
-FCN_FILES_WITH_TESTS = $(shell $(SHELL) $(srcdir)/build-aux/find-files-with-tests.sh "$(srcdir)" $(FCN_FILES) $(GEN_FCN_FILES_IN))
+FCN_FILES_WITH_TESTS = $(shell $(SHELL) build-aux/find-files-with-tests.sh "$(srcdir)" $(FCN_FILES) $(GEN_FCN_FILES_IN))
 
 define PKG_ADD_FILE_TEMPLATE
 $(1)/PKG_ADD: $$($(2)_FCN_FILES) $$($(2)_GEN_FCN_FILES) $(1)/$(octave_dirstamp) %reldir%/mk-pkg-add.sh