Adding initial support to display the git commit id in the simulator code.
This commit is contained in:
parent
9e421ada27
commit
f8e68b70b5
3 changed files with 17 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
.git-commit-id
|
||||
#ignore thumbnails created by windows
|
||||
Thumbs.db
|
||||
#Ignore files built by Visual Studio
|
||||
|
@ -41,3 +42,4 @@ ipch/
|
|||
Visual Studio Projects/*
|
||||
|
||||
|
||||
|
||||
|
|
13
makefile
13
makefile
|
@ -296,6 +296,9 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
ifneq (binexists,$(shell if $(TEST) -e BIN; then echo binexists; fi))
|
||||
MKDIRBIN = mkdir -p BIN
|
||||
endif
|
||||
ifneq (,$(shell cat .git-commit-id))
|
||||
GIT_COMMIT_ID=$(shell cat .git-commit-id)
|
||||
endif
|
||||
else
|
||||
#Win32 Environments (via MinGW32)
|
||||
GCC = gcc
|
||||
|
@ -338,7 +341,11 @@ else
|
|||
ifneq ($(USE_NETWORK),)
|
||||
NETWORK_OPT += -DUSE_SHARED
|
||||
endif
|
||||
ifneq (,$(shell if exist .git-commit-id type .git-commit-id))
|
||||
GIT_COMMIT_ID==$(shell if exist .git-commit-id type .git-commit-id)
|
||||
endif
|
||||
endif
|
||||
CFLAGS_GIT = -DSIM_GIT_COMMIT_ID="$(GIT_COMMIT_ID)"
|
||||
ifneq ($(DEBUG),)
|
||||
CFLAGS_G = -g -ggdb -g3
|
||||
CFLAGS_O = -O0
|
||||
|
@ -406,6 +413,10 @@ ifneq (clean,$(MAKECMDGOALS))
|
|||
ifneq (,$(NETWORK_FEATURES))
|
||||
$(info *** $(NETWORK_FEATURES).)
|
||||
endif
|
||||
ifneq (,$(GIT_COMMIT_ID))
|
||||
$(info ***)
|
||||
$(info *** git commit id is $(GIT_COMMIT_ID).)
|
||||
endif
|
||||
$(info ***)
|
||||
endif
|
||||
ifneq ($(DONT_USE_ROMS),)
|
||||
|
@ -419,7 +430,7 @@ endif
|
|||
|
||||
CC_STD = -std=c99
|
||||
CC_OUTSPEC = -o $@
|
||||
CC = $(GCC) $(CC_STD) -U__STRICT_ANSI__ $(CFLAGS_G) $(CFLAGS_O) -I . $(OS_CCDEFS) $(ROMS_OPT)
|
||||
CC = $(GCC) $(CC_STD) -U__STRICT_ANSI__ $(CFLAGS_G) $(CFLAGS_O) $(CFLAGS_GIT) -I . $(OS_CCDEFS) $(ROMS_OPT)
|
||||
LDFLAGS = $(OS_LDFLAGS) $(NETWORK_LDFLAGS) $(LDFLAGS_O)
|
||||
|
||||
#
|
||||
|
|
3
scp.c
3
scp.c
|
@ -2298,6 +2298,9 @@ if (vdelt)
|
|||
if (flag)
|
||||
fprintf (st, " [%s, %s, %s]", sim_si64, sim_sa64, sim_snet);
|
||||
fprintf (st, "\n");
|
||||
#if defined(SIM_GIT_COMMIT_ID)
|
||||
fprintf (st, "git commit id: %8.8s\n", SIM_GIT_COMMIT_ID);
|
||||
#endif
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue