[vlc-devel] [PATCH v2] configure: don't put the CONFIGURE_LINE in config.h
Steve Lhomme
robux4 at ycbcr.xyz
Wed Jan 29 08:42:51 CET 2020
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;
--
2.17.1
More information about the vlc-devel
mailing list