# HG changeset patch # User Mike Miller # Date 1468620913 25200 # Node ID 64f82a8b46e130dc2f9822426dd826d9a732b620 # Parent 46ce9eb019a675769015ae21cba39ec5aeac849b config.h: install a stub replacement with a deprecation warning (bug #41027) * Makefile.am (nodist_octinclude_HEADERS): Remove autoconf-generated config.h from the list of header files to install. * deprecated-config.h: New file to replace config.h in the public API. Use a different name to not shadow config.h during the build. * libinterp/module.mk (install-deprecated-config-h, uninstall-deprecated-config-h): New targets to install and uninstall it. diff -r 46ce9eb019a6 -r 64f82a8b46e1 Makefile.am --- a/Makefile.am Thu Apr 21 21:13:24 2016 +0200 +++ b/Makefile.am Fri Jul 15 15:15:13 2016 -0700 @@ -310,7 +310,6 @@ CONFIG_FILES = @ac_config_headers@ @ac_config_files@ nodist_octinclude_HEADERS += \ - config.h \ oct-conf-post.h \ octave-config.h diff -r 46ce9eb019a6 -r 64f82a8b46e1 libinterp/deprecated-config.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libinterp/deprecated-config.h Fri Jul 15 15:15:13 2016 -0700 @@ -0,0 +1,30 @@ +/* + +Copyright (C) 2016 Mike Miller + +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 +. + +*/ + +#if ! defined (octave_config_h) +#define octave_config_h 1 + +#include "octave-config.h" + +#warning "config.h has been deprecated; there is no need to include it directly" + +#endif diff -r 46ce9eb019a6 -r 64f82a8b46e1 libinterp/module.mk --- a/libinterp/module.mk Thu Apr 21 21:13:24 2016 +0200 +++ b/libinterp/module.mk Fri Jul 15 15:15:13 2016 -0700 @@ -288,9 +288,9 @@ DIRSTAMP_FILES += libinterp/$(octave_dirstamp) -install-data-hook: install-oct install-built-in-docstrings +install-data-hook: install-oct install-built-in-docstrings install-deprecated-config-h -uninstall-local: uninstall-oct uninstall-built-in-docstrings +uninstall-local: uninstall-oct uninstall-built-in-docstrings uninstall-deprecated-config-h if AMCOND_ENABLE_DYNAMIC_LINKING install-oct: @@ -333,6 +333,15 @@ rm -f $(DESTDIR)$(octetcdir)/built-in-docstrings .PHONY: uninstall-built-in-docstrings +install-deprecated-config-h: libinterp/deprecated-config.h + $(MKDIR_P) $(DESTDIR)$(octincludedir) + $(INSTALL_DATA) $< $(DESTDIR)$(octincludedir)/config.h +.PHONY: install-deprecated-config-h + +uninstall-deprecated-config-h: + rm -f $(DESTDIR)$(octincludedir)/config.h +.PHONY: uninstall-deprecated-config-h + EXTRA_DIST += $(libinterp_EXTRA_DIST) libinterp_CLEANFILES += \