view libinterp/build-env.h @ 21398:7e8a410e6124

break generated file dependence on Makefile (bug #46063) * build-aux/mk-mxarray-h.in.sh, build-aux/mk-version-h.in.sh, build-aux/subst-config-vals.in.sh, build-aux/subst-cross-config-vals.in.sh, build-aux/subst-default-vals.in.sh, build-aux/subst-f77-isnan-macro.in.sh, build-aux/subst-script-vals.in.sh: New files with commands extracted from build-aux/common.mk. * build-aux/common.mk (ADDRESS_SANITIZER_OPTIONS, do_subst_config_vals, do_subst_cross_config_vals, do_subst_default_vals, do_subst_script_vals): Eliminate macros that are now in script files. (FONTCONFIG_CPPFLAGS, FT2_CPPFLAGS, LIBEXT): Move definition to configure.ac, use AC_SUBST to put values in subst-config-vals.sh and build-aux/subst-cross-config-vals.sh. (startupfiledir, localstartupfiledir): Move definition to configure.ac, use AC_SUBST to put values in subst-default-vals.sh. (ALL_FFLAGS): Delete unused macro. (simple-filter-rule): New macro. * build-aux/mk-default-qt-settings.in.sh: Rename and adapt from libgui/mk-default-qt-settings.in. * build-aux/mk-f77-def.in.sh: Rename and adapt from liboctave/cruft/mkf77def.in. * Makefile.am (EXTRA_DIST): Include new files in the list. * acinclude.m4 (OCTAVE_CONFIG_MOVE_IF_CHANGE_FILES): Assume file names have the suffix .sh and are generated from .in.sh. * Makefile.am (run-octave): Depend on build-aux/subst-script-vals.sh instead of Makefile. (octave-config.h): Use move-if-change rule. * configure.ac: Use ${X} instead of $(X) for variables in OCTAVE_SET_DEFAULT args. (SHARED_LIBS, STATIC_LIBS): AC_SUBST them. Protect timestamp of oct-conf-post.h with a move-if-change rule. * etc/module.mk (etc/icons/octave.appdata.xml, etc/icons/octave.desktop): Don't depend on Makefile. * libgui/module.mk (libgui/default-qt-settings): Depend on build-aux/mk-default-qt-settings.sh instead of Makefile. * build-env.h, build-env.cc (ALL_CFLAGS, ALL_CXXFLAGS, ALL_FFLAGS, ALL_LDFLAGS, LIBFLAGS): Delete variables. * libinterp/corefcn/module.mk ($(OPT_HANDLERS), $(COREFCN_FT2_DF), libinterp/corefcn/defaults.h, libinterp/corefcn/graphics.h, libinterp/corefcn/graphics-props.cc, libinterp/corefcn/oct-errno.cc, libinterp/corefcn/mxarray.h, libinterp/corefcn/oct-tex-lexer.ll): Depend on timestamp file to ensure destination directory exists. (libinterp/corefcn/graphics.h, libinterp/corefcn/graphics-props.cc, libinterp/corefcn/oct-errno.cc, libinterp/corefcn/oct-tex-lexer.ll, libinterp/corefcn/oct-tex-symbols.cc): Use mv instead of move-if-change. (libinterp/corefcn/mxarray.h): Use script to substitute values. Depend on libinterp/corefcn/mxarray.in.h instead of Makefile * libinterp/corefcn/toplev.cc (octave_config_info): Don't include ALL_CFLAGS, ALL_CXXFLAGS, ALL_FFLAGS, ALL_LDFLAGS, of LIBFLAGS in the list. * libinterp/module.mk ($(SRC_DEF_FILES)): Don't depend on Makefile. (libinterp/build-env.cc, libinterp/build-env-features.cc, libinterp/builtins.cc, libinterp/builtin-defun-decls.h, libinterp/dldfcn/PKG_ADD, libinterp/.DOCSTRINGS): Depend on timestamp file to ensure destination directory exists. (libinterp/build-env.cc): Depend on build-aux/subst-config-vals.sh instead of Makefile. (libinterp/version.h): Use script to substitute values. Depend on build-aux/mk-version-h.sh instead of libinterp/version.in.h. * liboctave/cruft/module.mk (liboctave/cruft/cruft.def): Depend on timestamp file to ensure destination directory exists. (liboctave_DISTCLEANFILES): Remove liboctave/cruft/mkf77def from the list. (liboctave_EXTRA_DIST): Don't add liboctave/cruft/mkf77def.in to the list. * liboctave/cruft/ranlib/module.mk (liboctave/cruft/ranlib/ranlib.def): Depend on timestamp file to ensure destination directory exists. * liboctave/cruft/slatec-fn/module.mk (liboctave/cruft/slatec-fn/erfc.f, liboctave/cruft/slatec-fn/derfc.f): Depend on timestamp file to ensure destination directory exists. Use script to substitute values. Depend on build-aux/subst-f77-isnan-macro.sh instead of Makefile. (do-subst-isnan-macro): Delete macro. * scripts/module.mk (GEN_FCN_FILES_TEMPLATE): Use simple-filter-rule to execute build-aux/subst-config-vals.sh. Depend on build-aux/subst-config-vals.sh instead of Makefile. (scripts/.DOCSTRINGS): Don't depend on Makefile. Do depend on timestamp file to ensure destination directory exists. * src/module.mk (src/$(host_triplet)-mkoctfile.cc, src/$(host_triplet)-octave-config.cc): Depend on build-aux/subst-cross-config-vals.sh instead of Makefile. (src/octave-config.cc, src/mkoctfile.cc, src/main.cc): Depend on build-aux/subst-default-vals.sh instead of Makefile.
author John W. Eaton <jwe@octave.org>
date Fri, 04 Mar 2016 12:51:00 -0500
parents 1473547f50f5
children fdb9adcc02f9
line wrap: on
line source

/*

Copyright (C) 1996-2015 John W. Eaton

This file is part of Octave.

Octave is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

Octave is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with Octave; see the file COPYING.  If not, see
<http://www.gnu.org/licenses/>.

*/

#if ! defined (octave_build_env_h)
#define octave_build_env_h 1

#include "octave-config.h"

#include "oct-map.h"

namespace octave
{
  namespace build_env
  {
    extern OCTAVE_API octave_scalar_map features (void);

    extern const char *AMD_CPPFLAGS;
    extern const char *AMD_LDFLAGS;
    extern const char *AMD_LIBS;
    extern const char *ARFLAGS;
    extern const char *AR;
    extern const char *ARPACK_CPPFLAGS;
    extern const char *ARPACK_LDFLAGS;
    extern const char *ARPACK_LIBS;
    extern const char *BLAS_LIBS;
    extern const char *CAMD_CPPFLAGS;
    extern const char *CAMD_LDFLAGS;
    extern const char *CAMD_LIBS;
    extern const char *CARBON_LIBS;
    extern const char *CC;
    extern const char *CCOLAMD_CPPFLAGS;
    extern const char *CCOLAMD_LDFLAGS;
    extern const char *CCOLAMD_LIBS;
    extern const char *CFLAGS;
    extern const char *CHOLMOD_CPPFLAGS;
    extern const char *CHOLMOD_LDFLAGS;
    extern const char *CHOLMOD_LIBS;
    extern const char *COLAMD_CPPFLAGS;
    extern const char *COLAMD_LDFLAGS;
    extern const char *COLAMD_LIBS;
    extern const char *CPICFLAG;
    extern const char *CPPFLAGS;
    extern const char *CURL_CPPFLAGS;
    extern const char *CURL_LDFLAGS;
    extern const char *CURL_LIBS;
    extern const char *CXSPARSE_CPPFLAGS;
    extern const char *CXSPARSE_LDFLAGS;
    extern const char *CXSPARSE_LIBS;
    extern const char *CXXCPP;
    extern const char *CXXFLAGS;
    extern const char *CXXPICFLAG;
    extern const char *CXX;
    extern const char *DEFAULT_PAGER;
    extern const char *DEFS;
    extern const char *DL_LD;
    extern const char *DL_LDFLAGS;
    extern const char *DL_LIBS;
    extern const char *EXEEXT;
    extern const char *GCC_VERSION;
    extern const char *GXX_VERSION;
    extern const char *F77;
    extern const char *F77_FLOAT_STORE_FLAG;
    extern const char *F77_INTEGER_8_FLAG;
    extern const char *FFLAGS;
    extern const char *FFTW3_CPPFLAGS;
    extern const char *FFTW3_LDFLAGS;
    extern const char *FFTW3_LIBS;
    extern const char *FFTW3F_CPPFLAGS;
    extern const char *FFTW3F_LDFLAGS;
    extern const char *FFTW3F_LIBS;
    extern const char *FLIBS;
    extern const char *FLTK_CPPFLAGS;
    extern const char *FLTK_LDFLAGS;
    extern const char *FLTK_LIBS;
    extern const char *FONTCONFIG_CPPFLAGS;
    extern const char *FONTCONFIG_LIBS;
    extern const char *FPICFLAG;
    extern const char *FT2_CPPFLAGS;
    extern const char *FT2_LIBS;
    extern const char *GLPK_CPPFLAGS;
    extern const char *GLPK_LDFLAGS;
    extern const char *GLPK_LIBS;
    extern const char *GNUPLOT;
    extern const char *HDF5_CPPFLAGS;
    extern const char *HDF5_LDFLAGS;
    extern const char *HDF5_LIBS;
    extern const char *INCLUDEDIR;
    extern const char *LAPACK_LIBS;
    extern const char *LDFLAGS;
    extern const char *LD_CXX;
    extern const char *LD_STATIC_FLAG;
    extern const char *LEXLIB;
    extern const char *LEX;
    extern const char *LFLAGS;
    extern const char *LIBEXT;
    extern const char *LIBOCTAVE;
    extern const char *LIBOCTINTERP;
    extern const char *LIBS;
    extern const char *LN_S;
    extern const char *MAGICK_CPPFLAGS;
    extern const char *MAGICK_LDFLAGS;
    extern const char *MAGICK_LIBS;
    extern const char *LLVM_CPPFLAGS;
    extern const char *LLVM_LDFLAGS;
    extern const char *LLVM_LIBS;
    extern const char *MKOCTFILE_DL_LDFLAGS;
    extern const char *OCTAVE_LINK_DEPS;
    extern const char *OCTAVE_LINK_OPTS;
    extern const char *OCTINCLUDEDIR;
    extern const char *OCTLIBDIR;
    extern const char *OCT_LINK_DEPS;
    extern const char *OCT_LINK_OPTS;
    extern const char *OPENGL_LIBS;
    extern const char *OSMESA_CPPFLAGS;
    extern const char *OSMESA_LDFLAGS;
    extern const char *OSMESA_LIBS;
    extern const char *PCRE_CPPFLAGS;
    extern const char *PCRE_LIBS;
    extern const char *PREFIX;
    extern const char *PTHREAD_CFLAGS;
    extern const char *PTHREAD_LIBS;
    extern const char *QHULL_CPPFLAGS;
    extern const char *QHULL_LDFLAGS;
    extern const char *QHULL_LIBS;
    extern const char *QRUPDATE_CPPFLAGS;
    extern const char *QRUPDATE_LDFLAGS;
    extern const char *QRUPDATE_LIBS;
    extern const char *QT_CPPFLAGS;
    extern const char *QT_LDFLAGS;
    extern const char *QT_LIBS;
    extern const char *RANLIB;
    extern const char *RDYNAMIC_FLAG;
    extern const char *READLINE_LIBS;
    extern const char *SED;
    extern const char *SHARED_LIBS;
    extern const char *SHLEXT;
    extern const char *SHLEXT_VER;
    extern const char *SH_LD;
    extern const char *SH_LDFLAGS;
    extern const char *SONAME_FLAGS;
    extern const char *STATIC_LIBS;
    extern const char *TERM_LIBS;
    extern const char *UMFPACK_CPPFLAGS;
    extern const char *UMFPACK_LDFLAGS;
    extern const char *UMFPACK_LIBS;
    extern const char *WARN_CFLAGS;
    extern const char *WARN_CXXFLAGS;
    extern const char *X11_INCFLAGS;
    extern const char *X11_LIBS;
    extern const char *XTRA_CFLAGS;
    extern const char *XTRA_CXXFLAGS;
    extern const char *YACC;
    extern const char *YFLAGS;
    extern const char *Z_CPPFLAGS;
    extern const char *Z_LDFLAGS;
    extern const char *Z_LIBS;
    extern const char *config_opts;
  };
};

#endif