mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Put the commit ID in the version string
Finally, we are able to identify the builds more accurately. Now we check if commit-id (cogito tool) is available and pass the output to vernum.c compilation which then exports it as a build_id string. The first line of --version is now a bit long, we should probably move the build date to a second indented line or something.
This commit is contained in:
parent
e8a17b97db
commit
9921e58aba
@ -42,6 +42,7 @@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
COMMIT_ID = @COMMIT_ID@
|
||||
CONFDIR = @CONFDIR@
|
||||
CONFIG_NLS = @CONFIG_NLS@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
|
@ -34,6 +34,8 @@ AC_PROG_AWK
|
||||
AC_PATH_PROGS(AWK, "$AWK")
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AC_PATH_PROGS(COMMIT_ID, "commit-id")
|
||||
|
||||
CONFIG_ASCIIDOC="no"
|
||||
CONFIG_POD2HTML="no"
|
||||
CONFIG_XMLTO="no"
|
||||
|
@ -83,6 +83,11 @@ ELINKSLIBS = \
|
||||
$(INTLLIBS) \
|
||||
util/libutil.a
|
||||
|
||||
# Get the GIT HEAD ID if possible
|
||||
ifdef COMMIT_ID
|
||||
INCLUDES += -DBUILD_ID="\"$$($(COMMIT_ID) 2> /dev/null)\""
|
||||
endif
|
||||
|
||||
OBJS = vernum.o
|
||||
vernum.o: FORCE
|
||||
FORCE:
|
||||
|
@ -75,6 +75,8 @@ get_dyn_full_version(struct terminal *term, int more)
|
||||
if (!init_string(&string)) return NULL;
|
||||
|
||||
add_format_to_string(&string, "ELinks %s", VERSION_STRING);
|
||||
if (*build_id)
|
||||
add_format_to_string(&string, " (%s)", build_id);
|
||||
if (more) {
|
||||
add_to_string(&string, "\n");
|
||||
add_format_to_string(&string, _("Built on %s %s", term),
|
||||
|
@ -11,3 +11,4 @@
|
||||
|
||||
unsigned char *build_date = __DATE__;
|
||||
unsigned char *build_time = __TIME__;
|
||||
unsigned char *build_id = BUILD_ID;
|
||||
|
@ -3,6 +3,6 @@
|
||||
#ifndef EL__VERNUM_H
|
||||
#define EL__VERNUM_H
|
||||
|
||||
extern unsigned char *build_date, *build_time;
|
||||
extern unsigned char *build_date, *build_time, *build_id;
|
||||
|
||||
#endif /* EL__VERNUM_H */
|
||||
|
Loading…
Reference in New Issue
Block a user