[vlc-devel] [PATCH] libvlc/core: Use a revision.h in build dir instead of .c file

Steve Lhomme robux4 at ycbcr.xyz
Fri Jun 21 13:46:14 CEST 2019


On 2019-06-21 13:31, Rémi Denis-Courmont wrote:
> Hi,
> 
> This looks like it'll cause too eager dependencies and too systematic 
> rebuild of libvlc{,core}. I think we used to do something similar and 

Not sure what kind of systematic rebuild of libvlccore you're talking 
about, but right now every time I commit something, revision.txt is 
rebuilt and the libvlccore is rebuilt. It's a waste of time when not 
touching the core. So I'd be glad if we can get rid of this.

But I don't think this commit changes that behavior.

> purposefully stopped.
> 
> 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>
>       
> 
> 
> -- 
> 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
> 


More information about the vlc-devel mailing list