Mercurial > octave
diff configure.ac @ 30580:fdc30b576333
eliminate code duplication in oct-conf-post.in.h and octave-config.h
* oct-conf-post-private.in.h, oct-conf-post-public.in.h: New files,
split form oct-conf-post.in.h.
* Makefile.am (libgnu/libgnu.la): Depend on oct-conf-post-public.h and
oct-conf-post-private.h instead of oct-conf-post.h.
(BUILT_SOURCES): Update.
(nodist_octinclude_HEADERS): Add oct-conf-post-public.h to the list.
* build-aux/module.mk (GEN_CONFIG_INC): Replace oct-conf-post.h with
oct-conf-post-private.h and oct-conf-post-public.h.
* configure.ac: Replace code using oct-conf-post.h with equivalent
actions for oct-conf-post-private.h and oct-conf-post-public.h.
* mk-octave-config-h.sh: Instead of generating code that is also
duplicated in oct-conf-post.h, include the file oct-conf-post-public.h
that is also included in Octave's config.h file.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 31 Dec 2021 09:28:05 -0500 |
parents | 83f9f8bda883 |
children | 2ace5c035cd2 |
line wrap: on
line diff
--- a/configure.ac Fri Sep 24 16:01:39 2021 -0500 +++ b/configure.ac Fri Dec 31 09:28:05 2021 -0500 @@ -2269,7 +2269,7 @@ LIBS="$save_LIBS" fi -dnl Define this way instead of with an #if in oct-conf-post.h so that +dnl Define this way instead of with an #if in oct-conf-post-private.h so that dnl the build features script will get the correct value. dnl dnl The test on the sunlinsol_klu.h header is a bit of a kluge. @@ -2994,7 +2994,8 @@ ### Add footer to config.h -AH_BOTTOM([#include "oct-conf-post.h"]) +AH_BOTTOM([#include "oct-conf-post-private.h"]) +AH_BOTTOM([#include "oct-conf-post-public.h"]) ### Make all AC_DEFINES available to testif feature of test.m function. dnl This must reside at the bottom of configure.ac after all AC_DEFINES @@ -3091,12 +3092,19 @@ liboctave/octave.pc:liboctave/octave.in.pc libinterp/octinterp.pc:libinterp/octinterp.in.pc]) -dnl We use a .in.h file for oct-conf-post.h simply to copy it to the build tree +dnl We use a .in.h file for oct-conf-post-private.h and +dnl oct-conf-post-public.h simply to copy it to the build tree dnl so that we don't have to add the -I${top_srcdir} to any CPPFLAGS variables. -AC_CONFIG_FILES([oct-conf-post.h-tmp:oct-conf-post.in.h]) -AC_CONFIG_COMMANDS([oct-conf-post.h], - [$SHELL $srcdir/build-aux/move-if-change oct-conf-post.h-tmp oct-conf-post.h]) +AC_CONFIG_FILES([ + oct-conf-post-private.h-tmp:oct-conf-post-private.in.h + oct-conf-post-public.h-tmp:oct-conf-post-public.in.h]) + +AC_CONFIG_COMMANDS([oct-conf-post-private.h], + [$SHELL $srcdir/build-aux/move-if-change oct-conf-post-private.h-tmp oct-conf-post-private.h]) + +AC_CONFIG_COMMANDS([oct-conf-post-public.h], + [$SHELL $srcdir/build-aux/move-if-change oct-conf-post-public.h-tmp oct-conf-post-public.h]) OCTAVE_CONFIG_MOVE_IF_CHANGE_FILES([ liboctave/external/mk-f77-def.sh