[vlc-devel] [PATCH v2] configure: don't put the CONFIGURE_LINE in config.h

Rémi Denis-Courmont remi at remlab.net
Wed Jan 29 12:46:11 CET 2020


No. It's done on purpose. Sure, compilation would be faster if each and every definition was in its own file. But the build system is supposed to be optimised for maintainability, not for building on under-powered systems. We don't *want* to have to care and maintain sma hundred separate files instead of config.h and then maintain references to all those files where they're used.

Le 29 janvier 2020 12:58:47 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>On 2020-01-29 11:40, Rémi Denis-Courmont wrote:
>> You could make the same argument with any preprocessor definition in
>any 
>> header. That's exactly what ccache is for, and it is both less 
>> constrained and much easier to set up than moving each and every 
>> definition in a dedicated source module.
>
>I agree there's potentially more things in config.h that should not be 
>in there. That's not an excuse not to start cleaning it.
>
>> And neither your manual nor the systematic ccache approaches really
>work 
>> once LTO is taken into use anyway, because you can't prevent
>relinking. 
>> So it's doubly pointless kludge at this point.
>> 
>> Le 29 janvier 2020 11:31:03 GMT+02:00, Steve Lhomme
><robux4 at ycbcr.xyz> a 
>> écrit :
>> 
>>     On 2020-01-29 10:26, Rémi Denis-Courmont wrote:
>> 
>>         You can ask the TC to bring you better hardware. I'm pretty
>sure
>>         we'll
>>         say it's not the TC's problem.
>> 
>>         The community is not responsible for maintaining your hacks
>for
>>         your
>>         choice of under-provisioned hardwared.
>> 
>>         Meanwhile this patch neither solves the problem that you need
>to
>>         recompile when config.h changes, unlike ccache.
>> 
>> 
>>     You misunderstood the issue. When config.h changes the code is
>rebuilt
>>     just like before. The point is that is doesn't change
>unnecessarily if
>>     the configure line changed but the actual code configuration
>didn't change.
>> 
>>         Le 29 janvier 2020 11:21:54 GMT+02:00, Steve Lhomme
>>         <robux4 at ycbcr.xyz> a
>>         écrit :
>> 
>>         On 2020-01-29 10:13, Rémi Denis-Courmont wrote:
>> 
>>         Use ccache.
>> 
>> 
>>         Buy me more storage.
>>         (is as useful an answer)
>> 
>>         -1
>> 
>>         Le 29 janvier 2020 09:42:51 GMT+02:00, Steve Lhomme
>>         <robux4 at ycbcr.xyz> a
>>         écrit :
>> 
>>         If the configure call changed but the built files are the
>same
>>         and the rest
>>         of the config.h file has not changed, no need to rebuild
>everything.
>>        
>------------------------------------------------------------------------
>>         configure.ac | 3 ++-
>>         src/Makefile.am | 2 ++
>>         src/misc/gen_messages.c.in | 46
>>         ++++++++++++++++++++++++++++++++++++++
>>         src/misc/messages.c | 9 +-------
>>         4 files changed, 51 insertions(+), 9 deletions(-)
>>         create mode 100644 src/misc/gen_messages.c.in
>> 
>>         diff --git a/configure.ac b/configure.ac
>>         index ad2c55aeeb0..390721866b0 100644
>>         --- a/configure.ac
>>         +++ b/configure.ac
>>         @@ -4505,7 +4505,6 @@ COPYRIGHT_MESSAGE="Copyright ©
>>         ${COPYRIGHT_YEARS} the VideoLAN team"
>>         AC_DEFINE_UNQUOTED([VERSION_MESSAGE], "${VERSION_MESSAGE}",
>>         [Simple version string])
>>         AC_DEFINE_UNQUOTED([COPYRIGHT_MESSAGE],
>"${COPYRIGHT_MESSAGE}",
>>         [Copyright string])
>>         AC_DEFINE_UNQUOTED([COPYRIGHT_YEARS], "${COPYRIGHT_YEARS}",
>[The
>>         copyright years])
>>         -AC_DEFINE_UNQUOTED([CONFIGURE_LINE], "${CONFIGURE_LINE}",
>[The
>>         ./configure command line])
>>         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],${VERSION_MAJOR},
>>         [version major number])
>>         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],${VERSION_MINOR},
>>         [version minor number])
>>        
>AC_DEFINE_UNQUOTED([PACKAGE_VERSION_REVISION],${VERSION_REVISION},
>>         [version revision number])
>>         @@ -4513,6 +4512,7 @@
>>         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_EXTRA],${VERSION_EXTRA},
>>         [version extra numb
>>         AC_DEFINE_UNQUOTED([PACKAGE_VERSION_DEV],"${VERSION_DEV}",
>>         [version development string])
>>         AC_SUBST([COPYRIGHT_MESSAGE])
>>         AC_SUBST([VERSION_MESSAGE])
>>         +AC_SUBST([CONFIGURE_LINE])
>>         AC_SUBST([VERSION_MAJOR])
>>         AC_SUBST([VERSION_MINOR])
>>         AC_SUBST([VERSION_REVISION])
>>         @@ -4558,6 +4558,7 @@ AC_CONFIG_FILES([
>>         test/Makefile
>>         modules/hw/mmal/Makefile
>>         share/vlc.appdata.xml.in
>>         + src/misc/gen_messages.c
>>         ])
>> 
>>         AM_COND_IF([HAVE_WIN32], [
>>         diff --git a/src/Makefile.am b/src/Makefile.am
>>         index b6c59968370..2fd69aeb989 100644
>>         --- a/src/Makefile.am
>>         +++ b/src/Makefile.am
>>         @@ -390,6 +390,8 @@ libvlccore_la_SOURCES = \
>>         misc/subpicture.h \
>>         misc/medialibrary.c \
>>         misc/viewpoint.c
>>         +nodist_libvlccore_la_SOURCES = misc/gen_messages.c
>>         +CLEANFILES += misc/gen_messages.c
>>         libvlccore_la_LIBADD = $(LIBS_libvlccore) \
>>         ../compat/libcompat.la \
>>         $(LTLIBINTL) $(LTLIBICONV) \
>>         diff --git a/src/misc/gen_messages.c.in
>b/src/misc/gen_messages.c.in
>>         new file mode 100644
>>         index 00000000000..da92de80e23
>>         --- /dev/null
>>         +++ b/src/misc/gen_messages.c.in
>>         @@ -0,0 +1,46 @@
>>        
>+/*****************************************************************************
>>         + * messages.c: messages interface
>>         + * This library provides an interface to the message queue
>to
>>         be used by other
>>         + * modules, especially intf modules. See vlc_config.h for
>>         output configuration.
>>         +
>>        
>*****************************************************************************
>>         + * Copyright (C) 1998-2005 VLC authors and VideoLAN
>>         + *
>>         + * Authors: Vincent Seguin <seguin at via.ecp.fr>
>>         + * Samuel Hocevar <sam at zoy.org>
>>         + *
>>         + * This program is free software; you can redistribute it
>>         and/or modify it
>>         + * under the terms of the GNU Lesser General Public License
>as
>>         published by
>>         + * the Free Software Foundation; either version 2.1 of the
>>         License, or
>>         + * (at your option) any later version.
>>         + *
>>         + * This program 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 Lesser General Public License for more details.
>>         + *
>>         + * You should have received a copy of the GNU Lesser General
>>         Public License
>>         + * along with this program; if not, write to the Free
>Software
>>         Foundation,
>>         + * Inc., 51 Franklin Street, Fifth Floor, Boston MA
>02110-1301,
>>         USA.
>>         +
>>        
>*****************************************************************************/
>>         +
>>        
>+/*****************************************************************************
>>         + * Preamble
>>         +
>>        
>*****************************************************************************/
>>         +
>>         +#ifdef HAVE_CONFIG_H
>>         +# include "config.h"
>>         +#endif
>>         +
>>         +#include <vlc_common.h>
>>         +
>>         +extern const char psz_vlc_changeset[];
>>         +void vlc_LogSpam(vlc_object_t *obj);
>>         +
>>         +void vlc_LogSpam(vlc_object_t *obj)
>>         +{
>>         + /* Announce who we are */
>>         + msg_Dbg(obj, "VLC media player - @VERSION_MESSAGE@");
>>         + msg_Dbg(obj, "@COPYRIGHT_MESSAGE@");
>>         + msg_Dbg(obj, "revision %s", psz_vlc_changeset);
>>         + msg_Dbg(obj, "configured with @CONFIGURE_LINE@");
>>         +}
>>         diff --git a/src/misc/messages.c b/src/misc/messages.c
>>         index 08725113897..623d7616a07 100644
>>         --- a/src/misc/messages.c
>>         +++ b/src/misc/messages.c
>>         @@ -42,14 +42,7 @@
>>         #include <vlc_modules.h>
>>         #include "../libvlc.h"
>> 
>>         -static void vlc_LogSpam(vlc_object_t *obj)
>>         -{
>>         - /* Announce who we are */
>>         - msg_Dbg(obj, "VLC media player - %s", VERSION_MESSAGE);
>>         - msg_Dbg(obj, "%s", COPYRIGHT_MESSAGE);
>>         - msg_Dbg(obj, "revision %s", psz_vlc_changeset);
>>         - msg_Dbg(obj, "configured with %s", CONFIGURE_LINE);
>>         -}
>>         +void vlc_LogSpam(vlc_object_t *obj);
>> 
>>         struct vlc_logger {
>>         const struct vlc_logger_operations *ops;
>> 
>> 
>>         -- 
>>         Envoyé de mon appareil Android avec Courriel K-9 Mail.
>Veuillez
>>         excuser
>>         ma brièveté.
>>        
>------------------------------------------------------------------------
>>         vlc-devel mailing list
>>         To unsubscribe or modify your subscription options:
>>         https://mailman.videolan.org/listinfo/vlc-devel
>>        
>------------------------------------------------------------------------
>>         vlc-devel mailing list
>>         To unsubscribe or modify your subscription options:
>>         https://mailman.videolan.org/listinfo/vlc-devel
>> 
>> 
>>         -- 
>>         Envoyé de mon appareil Android avec Courriel K-9 Mail.
>Veuillez
>>         excuser
>>         ma brièveté.
>>        
>------------------------------------------------------------------------
>>         vlc-devel mailing list
>>         To unsubscribe or modify your subscription options:
>>         https://mailman.videolan.org/listinfo/vlc-devel
>> 
>>    
>------------------------------------------------------------------------
>>     vlc-devel mailing list
>>     To unsubscribe or modify your subscription options:
>>     https://mailman.videolan.org/listinfo/vlc-devel
>> 
>> 
>> -- 
>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>excuser 
>> ma brièveté.
>> 
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>> 
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200129/5eaa4150/attachment.html>


More information about the vlc-devel mailing list