loader: Update the reported version from the current git HEAD if available.
This commit is contained in:
parent
bda2832d8d
commit
5776a72361
|
@ -1,3 +1,5 @@
|
|||
/version-stamp
|
||||
/version.c
|
||||
/wine
|
||||
/wine-glibc
|
||||
/wine-kthread
|
||||
|
|
|
@ -11,8 +11,8 @@ C_SRCS = \
|
|||
preloader.c \
|
||||
pthread.c
|
||||
|
||||
KTHREAD_OBJS = kthread.o main.o
|
||||
PTHREAD_OBJS = pthread.o main.o
|
||||
KTHREAD_OBJS = kthread.o main.o version.o
|
||||
PTHREAD_OBJS = pthread.o main.o version.o
|
||||
|
||||
MAIN_BINARY = @MAIN_BINARY@
|
||||
EXTRA_BINARIES = @EXTRA_BINARIES@
|
||||
|
@ -58,6 +58,12 @@ uninstall::
|
|||
$(RM) $(DESTDIR)$(mandir)/man$(prog_manext)/wine.$(prog_manext)
|
||||
|
||||
clean::
|
||||
$(RM) $(WINE_BINARIES) $(MODULE)
|
||||
$(RM) $(WINE_BINARIES) $(MODULE) version.c version-stamp
|
||||
|
||||
version-stamp: dummy
|
||||
(GIT_DIR=$(TOPSRCDIR)/.git git describe 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -e 's/\(.*\)/const char wine_version[] = "\1";/' >$@ || ($(RM) $@ && exit 1)
|
||||
|
||||
version.c: version-stamp
|
||||
@cmp -s version-stamp $@ || cp version-stamp $@
|
||||
|
||||
@DEPENDENCIES@ # everything below this line is overwritten by make depend
|
||||
|
|
|
@ -68,7 +68,7 @@ static inline void reserve_area( void *addr, size_t size )
|
|||
*/
|
||||
static void check_command_line( int argc, char *argv[] )
|
||||
{
|
||||
static const char version[] = PACKAGE_STRING;
|
||||
extern const char wine_version[];
|
||||
static const char usage[] =
|
||||
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
||||
" wine --help Display this help and exit\n"
|
||||
|
@ -86,7 +86,7 @@ static void check_command_line( int argc, char *argv[] )
|
|||
}
|
||||
if (!strcmp( argv[1], "--version" ))
|
||||
{
|
||||
printf( "%s\n", version );
|
||||
printf( "%s\n", wine_version );
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue