File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -438,9 +438,9 @@ SET(MAIKO_HDRS
438438 inc/z2defs.h
439439)
440440
441- ADD_CUSTOM_TARGET (gen- vdate
441+ ADD_CUSTOM_COMMAND ( OUTPUT vdate.c
442442 COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /bin/mkvdate > vdate.c
443- BYPRODUCTS vdate.c
443+ DEPENDS ${MAIKO_SRCS} ${MAIKO_HDRS} ${MAIKO_DISPLAY_X11_SRCS} ${MAIKO_DISPLAY_X11_HDRS} ${MAIKO_DISPLAY_SDL_SRCS} ${MAIKO_DISPLAY_SDL_HDRS}
444444)
445445
446446ADD_EXECUTABLE (lde src/ldeboot.c src/unixfork.c)
Original file line number Diff line number Diff line change 11#! /bin/sh
2+ if command -v " git" > /dev/null 2>&1 ; then
3+ MAIKO_REV=" $( git status --porcelain) "
4+ if [ $? == 0 ]; then
5+ if [ ! -z " $( git status --porcelain) " ]; then
6+ MAIKO_REV=" $( git rev-parse --short HEAD) -dirty"
7+ else
8+ MAIKO_REV=" $( git rev-parse --short HEAD) "
9+ fi
10+ else
11+ MAIKO_REV=" none"
12+ fi
13+ else
14+ MAIKO_REV = " none"
15+ fi
216cat << EOF
317#include <time.h>
418extern const time_t MDate;
519const time_t MDate = $( date +%s) ;
20+ extern const char *MaikoGitVersion;
21+ const char *MaikoGitVersion = "maiko git version: $MAIKO_REV ";
622EOF
You can’t perform that action at this time.
0 commit comments