[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 07:15:42 CEST 2019
On 2019-06-21 0:33, Marvin Scholz wrote:
> 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.
Sounds good to me!
> ---
> 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
>
More information about the vlc-devel
mailing list