comparison Makefile.am @ 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 4392386b5ecb
comparison
equal deleted inserted replaced
30579:35efc47720bd 30580:fdc30b576333
231 # Add the library to BUILT_SOURCES so it is created early in the build process 231 # Add the library to BUILT_SOURCES so it is created early in the build process
232 # This is only a partial solution which works when 'make all' is used. 232 # This is only a partial solution which works when 'make all' is used.
233 # See bug #45578. 233 # See bug #45578.
234 BUILT_SOURCES += libgnu/libgnu.la 234 BUILT_SOURCES += libgnu/libgnu.la
235 235
236 libgnu/libgnu.la: oct-conf-post.h 236 libgnu/libgnu.la: oct-conf-post-private.h oct-conf-post-public.h
237 cd libgnu && $(MAKE) $(AM_MAKEFLAGS) all 237 cd libgnu && $(MAKE) $(AM_MAKEFLAGS) all
238 238
239 include liboctave/module.mk 239 include liboctave/module.mk
240 include libinterp/module.mk 240 include libinterp/module.mk
241 include libgui/module.mk 241 include libgui/module.mk
297 icons-dist-hook: 297 icons-dist-hook:
298 @echo "Packaging distribution requires icotool and rsvg-convert." ; exit 1; 298 @echo "Packaging distribution requires icotool and rsvg-convert." ; exit 1;
299 endif 299 endif
300 300
301 BUILT_SOURCES += \ 301 BUILT_SOURCES += \
302 oct-conf-post.h \ 302 oct-conf-post-private.h \
303 oct-conf-post-public.h \
303 octave-config.h \ 304 octave-config.h \
304 run-octave \ 305 run-octave \
305 $(DIRSTAMP_FILES) 306 $(DIRSTAMP_FILES)
306 307
307 if AMCOND_HAVE_BROKEN_STL_ALGO_H 308 if AMCOND_HAVE_BROKEN_STL_ALGO_H
329 $(BUILT_DISTFILES) 330 $(BUILT_DISTFILES)
330 331
331 CONFIG_FILES = @ac_config_headers@ @ac_config_files@ 332 CONFIG_FILES = @ac_config_headers@ @ac_config_files@
332 333
333 nodist_octinclude_HEADERS += \ 334 nodist_octinclude_HEADERS += \
335 oct-conf-post-public.h \
334 octave-config.h 336 octave-config.h
335 337
336 OCTAVE_INTERPRETER_TARGETS += \ 338 OCTAVE_INTERPRETER_TARGETS += \
337 $(OCT_FILE_PKG_ADD_FILES) 339 $(OCT_FILE_PKG_ADD_FILES)
338 340