# HG changeset patch # User Rik # Date 1668622423 28800 # Node ID a96f68a48e9e24319361bc5e28de3c137aa97f02 # Parent 48c0379d86f2d29fbc1cd852df6452da43f293cb maint: Remove more deprecated code from Octave 9. * NEWS.9.md: Update file with more removals of deprecated code. * libinterp/module.mk: Remove obsolete macro expansions from Octave 3.12. * oct-norm.cc: Remove "octave::" namespace qualifier on xcolnorms and xrownorms. * oct-norm.h: Remove unnecessary #includes. * mkoctfile.in.cc: Remove all references to LFLAGS. diff -r 48c0379d86f2 -r a96f68a48e9e etc/NEWS.9.md --- a/etc/NEWS.9.md Wed Nov 16 09:21:35 2022 -0800 +++ b/etc/NEWS.9.md Wed Nov 16 10:13:43 2022 -0800 @@ -19,31 +19,35 @@ - Functions - Function | Replacement - -----------------------|------------------ + Function | Replacement + -----------------------|------------------ - Properties The following property names are discouraged, but there is no fixed date for their removal. - Object | Property | Replacement - -----------------|-------------|------------ + Object | Property | Replacement + -----------------|-------------|------------ -The following functions were deprecated in Octave 7 and have been removed +The following features were deprecated in Octave 7 and have been removed from Octave 9. - Functions - Function | Replacement - -----------------------------|------------------ - `disable_diagonal_matrix` | `optimize_diagonal_matrix` - `disable_permutation_matrix` | `optimize_permutation_matrix` - `disable_range` | `optimize_range` + Function | Replacement + ---------------------------|------------------ + disable_diagonal_matrix | optimize_diagonal_matrix + disable_permutation_matrix | optimize_permutation_matrix + disable_range | optimize_range - For plot functions, the use of numbers to select line colors in +- For plot functions, the use of numbers to select line colors in shorthand formats was an undocumented feature was removed from Octave 9. +- The environment variable used by `mkoctfile` for linker flags is now + `LDFLAGS` rather than `LFLAGS`. `LFLAGS` was deprecated in Octave 6 + and has been removed. + ### Old release news - [Octave 8.x](etc/NEWS.8) diff -r 48c0379d86f2 -r a96f68a48e9e libinterp/module.mk --- a/libinterp/module.mk Wed Nov 16 09:21:35 2022 -0800 +++ b/libinterp/module.mk Wed Nov 16 10:13:43 2022 -0800 @@ -176,11 +176,6 @@ LIBINTERP_DEFUN_FILES += \ $(BUILT_IN_DEFUN_FILES) -## FIXME: The following two variables are deprecated and should be removed -## in Octave version 3.12. -DLL_CDEFS = @OCTINTERP_DLL_DEFS@ -DLL_CXXDEFS = @OCTINTERP_DLL_DEFS@ - ## Rules to build test files LIBINTERP_TST_FILES_SRC := $(shell $(SHELL) $(srcdir)/build-aux/find-files-with-tests.sh "$(srcdir)" $(ULT_DIST_SRC) $(DLDFCN_SRC)) diff -r 48c0379d86f2 -r a96f68a48e9e liboctave/numeric/oct-norm.cc --- a/liboctave/numeric/oct-norm.cc Wed Nov 16 09:21:35 2022 -0800 +++ b/liboctave/numeric/oct-norm.cc Wed Nov 16 10:13:43 2022 -0800 @@ -511,10 +511,6 @@ template R svd_matrix_norm (const MatrixT& m, R p, VectorT) { - // NOTE: The octave:: namespace tags are needed for the following - // function calls until the deprecated inline functions are removed - // from oct-norm.h. - R res = 0; if (p == 2) { @@ -522,9 +518,9 @@ res = fact.singular_values () (0, 0); } else if (p == 1) - res = octave::xcolnorms (m, static_cast (1)).max (); + res = xcolnorms (m, static_cast (1)).max (); else if (lo_ieee_isinf (p) && p > 1) - res = octave::xrownorms (m, static_cast (1)).max (); + res = xrownorms (m, static_cast (1)).max (); else if (p > 1) { VectorT x; @@ -541,15 +537,11 @@ template R matrix_norm (const MatrixT& m, R p, VectorT) { - // NOTE: The octave:: namespace tags are needed for the following - // function calls until the deprecated inline functions are removed - // from oct-norm.h. - R res = 0; if (p == 1) - res = octave::xcolnorms (m, static_cast (1)).max (); + res = xcolnorms (m, static_cast (1)).max (); else if (lo_ieee_isinf (p) && p > 1) - res = octave::xrownorms (m, static_cast (1)).max (); + res = xrownorms (m, static_cast (1)).max (); else if (p > 1) { VectorT x; diff -r 48c0379d86f2 -r a96f68a48e9e liboctave/numeric/oct-norm.h --- a/liboctave/numeric/oct-norm.h Wed Nov 16 09:21:35 2022 -0800 +++ b/liboctave/numeric/oct-norm.h Wed Nov 16 10:13:43 2022 -0800 @@ -32,14 +32,6 @@ #include "oct-cmplx.h" -// The remaining includes can be removed when the deprecated functions -// at the end of this file are removed. - -#include "dColVector.h" -#include "dRowVector.h" -#include "fColVector.h" -#include "fRowVector.h" - namespace octave { extern OCTAVE_API double xnorm (const ColumnVector&, double p = 2); diff -r 48c0379d86f2 -r a96f68a48e9e src/mkoctfile.in.cc --- a/src/mkoctfile.in.cc Wed Nov 16 09:21:35 2022 -0800 +++ b/src/mkoctfile.in.cc Wed Nov 16 10:13:43 2022 -0800 @@ -356,11 +356,6 @@ vars["LD_STATIC_FLAG"] = get_variable ("LD_STATIC_FLAG", %OCTAVE_CONF_LD_STATIC_FLAG%); - // FIXME: Remove LFLAGS in Octave 9 - vars["LFLAGS"] = get_variable ("LFLAGS", DEFAULT_LDFLAGS); - if (vars["LFLAGS"] != DEFAULT_LDFLAGS) - std::cerr << "mkoctfile: warning: LFLAGS is deprecated and will be removed in a future version of Octave, use LDFLAGS instead" << std::endl; - vars["F77_INTEGER8_FLAG"] = get_variable ("F77_INTEGER8_FLAG", %OCTAVE_CONF_F77_INTEGER_8_FLAG%); vars["ALL_FFLAGS"] = vars["FFLAGS"] + ' ' + vars["F77_INTEGER8_FLAG"]; @@ -888,10 +883,6 @@ { ++i; - // FIXME: Remove LFLAGS checking in Octave 9 - if (argv[i] == "LFLAGS") - std::cerr << "mkoctfile: warning: LFLAGS is deprecated and will be removed in a future version of Octave, use LDFLAGS instead" << std::endl; - if (! var_to_print.empty ()) std::cerr << "mkoctfile: warning: only one '" << arg << "' option will be processed" << std::endl; @@ -1317,13 +1308,12 @@ octave_libs = "-L" + quote_path (vars["OCTLIBDIR"]) + ' ' + vars["OCTAVE_LIBS"]; - // FIXME: Remove LFLAGS in Octave 9 std::string cmd = (vars["CXXLD"] + ' ' + vars["CPPFLAGS"] + ' ' + vars["ALL_CXXFLAGS"] + ' ' + vars["RDYNAMIC_FLAG"] + ' ' + pass_on_options + ' ' + output_option + ' ' + objfiles + ' ' + libfiles + ' ' + ldflags + ' ' + vars["ALL_LDFLAGS"] + ' ' - + vars["LFLAGS"] + ' ' + octave_libs + ' ' + + octave_libs + ' ' + vars["OCTAVE_LINK_OPTS"] + ' ' + vars["OCTAVE_LINK_DEPS"]); int status = run_command (cmd, verbose, printonly); @@ -1348,12 +1338,11 @@ + ' ' + vars["OCTAVE_LIBS"]; #endif - // FIXME: Remove LFLAGS in Octave 9 std::string cmd = (vars["CXXLD"] + ' ' + vars["ALL_CXXFLAGS"] + ' ' + pass_on_options + " -o " + octfile + ' ' + objfiles + ' ' + libfiles + ' ' + ldflags + ' ' + vars["DL_LDFLAGS"] + ' ' - + vars["LDFLAGS"] + ' ' + vars["LFLAGS"] + ' ' + octave_libs + ' ' + + vars["LDFLAGS"] + ' ' + octave_libs + ' ' + vars["OCT_LINK_OPTS"] + ' ' + vars["OCT_LINK_DEPS"]); #if defined (OCTAVE_USE_WINDOWS_API) || defined(CROSS)