Commit b5390911 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix SVN revision handling.

It is by design flawed to have phony built source.
parent 8dc109b2
###############################################################################
# Automake targets and declarations # Automake targets and declarations
############################################################################### ###############################################################################
...@@ -10,7 +10,7 @@ SUBDIRS = ...@@ -10,7 +10,7 @@ SUBDIRS =
EXTRA_DIST = extras/COPYING modules/builtin.h.in libvlc.sym EXTRA_DIST = extras/COPYING modules/builtin.h.in libvlc.sym
BUILT_SOURCES = $(CLEANFILES) BUILT_SOURCES = $(CLEANFILES)
CLEANFILES = modules/builtin.h CLEANFILES = modules/builtin.h misc/revision.c
MOSTLYCLEANFILES = $(DATA_noinst_libvlc) MOSTLYCLEANFILES = $(DATA_noinst_libvlc)
TOOLBOX = srcdir=$(top_srcdir) builddir=$(top_builddir) $(top_srcdir)/toolbox TOOLBOX = srcdir=$(top_srcdir) builddir=$(top_builddir) $(top_srcdir)/toolbox
...@@ -102,11 +102,13 @@ modules/modules.c: modules/builtin.h ...@@ -102,11 +102,13 @@ modules/modules.c: modules/builtin.h
############################################################################### ###############################################################################
libvlc_a_SOURCES = $(SOURCES_libvlc) $(SOURCES_libvlc_control) libvlc_a_SOURCES = $(SOURCES_libvlc) $(SOURCES_libvlc_control)
nodist_libvlc_a_SOURCES = misc/revision.c
libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags libvlc pic` -DUSE_BUILTINS libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags libvlc pic` -DUSE_BUILTINS
libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc pic` libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc pic`
libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc pic` libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc pic`
libvlc_la_SOURCES = $(SOURCES_libvlc) libvlc_la_SOURCES = $(SOURCES_libvlc)
nodist_libvlc_la_SOURCES = misc/revision.c
libvlc_la_LIBADD = $(INCLUDED_LIBINTL) libvlc_la_LIBADD = $(INCLUDED_LIBINTL)
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc`
libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc` libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
...@@ -148,12 +150,6 @@ else ...@@ -148,12 +150,6 @@ else
lib_LIBRARIES = libvlc.a lib_LIBRARIES = libvlc.a
endif endif
if HAVE_WIN32
pic =
else
pic = pic
endif
if HAVE_WIN32 if HAVE_WIN32
DATA_noinst_libvlc = libvlc$(LIBEXT) libvlc$(LIBEXT).a DATA_noinst_libvlc = libvlc$(LIBEXT) libvlc$(LIBEXT).a
...@@ -334,11 +330,6 @@ SOURCES_libvlc_control = \ ...@@ -334,11 +330,6 @@ SOURCES_libvlc_control = \
if !USE_LIBTOOL if !USE_LIBTOOL
if !HAVE_WIN32 if !HAVE_WIN32
nodist_libvlc_a_SOURCES = misc/version.c
CLEANFILES += misc/version.c
misc/version.c: FORCE
$(TOOLBOX) --update-version
endif endif
# Install shared libvlc # Install shared libvlc
...@@ -365,6 +356,13 @@ CLEANFILES += stamp-api ...@@ -365,6 +356,13 @@ CLEANFILES += stamp-api
endif endif
endif endif
misc/revision.c:
rm -f $@ $@.tmp
echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > $@.tmp
REVISION="$$(LANG=C svnversion "$(top_srcdir)" 2>/dev/null || echo exported)" ; \
echo "const char psz_vlc_changeset[] = \"$$REVISION\";" >> $@.tmp
mv -f $@.tmp $@
############################################################################### ###############################################################################
# Unit/regression test # Unit/regression test
############################################################################### ###############################################################################
...@@ -387,3 +385,7 @@ test_utf8_LDADD = libvlc.la ...@@ -387,3 +385,7 @@ test_utf8_LDADD = libvlc.la
test_utf8_CFLAGS = $(CFLAGS_tests) test_utf8_CFLAGS = $(CFLAGS_tests)
FORCE: FORCE:
@echo "Generated source cannot be phony. Go away." >&2
@exit 1
.PHONY: FORCE
...@@ -1830,11 +1830,9 @@ static void Version( void ) ...@@ -1830,11 +1830,9 @@ static void Version( void )
utf8_fprintf( stdout, _("Compiled by %s@%s.%s\n"), utf8_fprintf( stdout, _("Compiled by %s@%s.%s\n"),
VLC_CompileBy(), VLC_CompileHost(), VLC_CompileDomain() ); VLC_CompileBy(), VLC_CompileHost(), VLC_CompileDomain() );
utf8_fprintf( stdout, _("Compiler: %s\n"), VLC_Compiler() ); utf8_fprintf( stdout, _("Compiler: %s\n"), VLC_Compiler() );
#ifndef HAVE_SHARED_LIBVLC
if( strcmp( VLC_Changeset(), "exported" ) ) if( strcmp( VLC_Changeset(), "exported" ) )
utf8_fprintf( stdout, _("Based upon svn changeset [%s]\n"), utf8_fprintf( stdout, _("Based upon svn changeset [%s]\n"),
VLC_Changeset() ); VLC_Changeset() );
#endif
utf8_fprintf( stdout, LICENSE_MSG ); utf8_fprintf( stdout, LICENSE_MSG );
#ifdef WIN32 /* Pause the console because it's destroyed when we exit */ #ifdef WIN32 /* Pause the console because it's destroyed when we exit */
......
...@@ -69,13 +69,11 @@ DECLARE_VLC_VERSION( CompileHost, COMPILE_HOST ); ...@@ -69,13 +69,11 @@ DECLARE_VLC_VERSION( CompileHost, COMPILE_HOST );
DECLARE_VLC_VERSION( CompileDomain, COMPILE_DOMAIN ); DECLARE_VLC_VERSION( CompileDomain, COMPILE_DOMAIN );
DECLARE_VLC_VERSION( Compiler, COMPILER ); DECLARE_VLC_VERSION( Compiler, COMPILER );
#ifndef HAVE_SHARED_LIBVLC
extern const char psz_vlc_changeset[]; extern const char psz_vlc_changeset[];
char const * VLC_Changeset( void ) const char* VLC_Changeset( void )
{ {
return psz_vlc_changeset; return psz_vlc_changeset;
} }
#endif
/***************************************************************************** /*****************************************************************************
* VLC_Error: strerror() equivalent * VLC_Error: strerror() equivalent
......
...@@ -34,7 +34,7 @@ extern vlc_object_t * ...@@ -34,7 +34,7 @@ extern vlc_object_t *
vlc_custom_create (vlc_object_t *p_this, size_t i_size, int i_type, vlc_custom_create (vlc_object_t *p_this, size_t i_size, int i_type,
const char *psz_type); const char *psz_type);
#if 0 #if 1
/***************************************************************************** /*****************************************************************************
* libvlc_global_data_t (global variable) * libvlc_global_data_t (global variable)
***************************************************************************** *****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment