[vlc-devel] [PATCH] libvlc/core: Use a revision.h in build dir instead of .c file
Rémi Denis-Courmont
remi at remlab.net
Fri Jun 21 09:36:26 CEST 2019
Hi,
How does this work from tarball?
Le 21 juin 2019 00:33:17 GMT+02:00, Marvin Scholz <epirat07 at gmail.com> a écrit :
>Instead of generating the revision.c file in the source tree
>and including the c file in lib/core.c, generate a .h file in the
>build dir and include that instead.
>---
> lib/core.c | 2 +-
> src/Makefile.am | 7 +++----
> src/libvlc.c | 1 +
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/lib/core.c b/lib/core.c
>index 06fd52fbfa..c1fb78b7cf 100644
>--- a/lib/core.c
>+++ b/lib/core.c
>@@ -34,7 +34,7 @@
> #include <limits.h>
> #include <assert.h>
>
>-#include "../src/revision.c"
>+#include "../src/revision.h"
>
> libvlc_instance_t * libvlc_new( int argc, const char *const *argv )
> {
>diff --git a/src/Makefile.am b/src/Makefile.am
>index 3f73999fdb..b25df0b56e 100644
>--- a/src/Makefile.am
>+++ b/src/Makefile.am
>@@ -198,7 +198,6 @@ libvlccore_la_SOURCES = \
> libvlc.h \
> libvlc-module.c \
> missing.c \
>- revision.c \
> version.c \
> config/configuration.h \
> config/core.c \
>@@ -618,10 +617,10 @@ LDADD = libvlccore.la \
> # GIT revision
>###############################################################################
>
>-BUILT_SOURCES += stamp-revision
>-MAINTAINERCLEANFILES = $(srcdir)/revision.txt $(srcdir)/revision.c
>+BUILT_SOURCES += stamp-revision revision.h
>+MAINTAINERCLEANFILES = $(srcdir)/revision.txt revision.h
>
>-$(srcdir)/revision.c: $(srcdir)/revision.txt
>+revision.h: $(srcdir)/revision.txt
> $(AM_V_at)rm -f -- $@
> $(AM_V_GEN)echo "const char psz_vlc_changeset[] = \"$$(cat $<)\";" \
> > $@
>diff --git a/src/libvlc.c b/src/libvlc.c
>index 018987f0bf..d65258761f 100644
>--- a/src/libvlc.c
>+++ b/src/libvlc.c
>@@ -65,6 +65,7 @@
> #include <vlc_thumbnailer.h>
>
> #include "libvlc.h"
>+#include "revision.h"
>
> #include <vlc_vlm.h>
>
>--
>2.20.1 (Apple Git-117)
>
>_______________________________________________
>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/20190621/40ca66d3/attachment.html>
More information about the vlc-devel
mailing list