mirror of
https://github.com/simh/simh.git
synced 2026-01-13 23:35:57 +00:00
SCP: makefile: Extend SHOW VERSION output to include build OS version
This is only displayed when the build OS version is different from the running OS version.
This commit is contained in:
parent
e8aac5b410
commit
2673530d3d
3
makefile
3
makefile
@ -349,6 +349,7 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
|
||||
$(shell git log -1 --pretty="SIM_GIT_COMMIT_ID %H$(GIT_EXTRA_FILES)%nSIM_GIT_COMMIT_TIME $(isodate)" >.git-commit-id)
|
||||
endif
|
||||
endif
|
||||
SIM_BUILD_OS_VERSION= -DSIM_BUILD_OS_VERSION="$(shell uname -a)"
|
||||
LTO_EXCLUDE_VERSIONS =
|
||||
PCAPLIB = pcap
|
||||
ifeq (agcc,$(findstring agcc,${GCC})) # Android target build?
|
||||
@ -1352,7 +1353,7 @@ ifneq ($(DONT_USE_READER_THREAD),)
|
||||
endif
|
||||
|
||||
CC_OUTSPEC = -o $@
|
||||
CC := ${GCC} ${CC_STD} -U__STRICT_ANSI__ ${CFLAGS_G} ${CFLAGS_O} ${CFLAGS_GIT} ${CFLAGS_I} -DSIM_COMPILER="${COMPILER_NAME}" -DSIM_BUILD_TOOL=simh-makefile -I . ${OS_CCDEFS} ${ROMS_OPT}
|
||||
CC := ${GCC} ${CC_STD} -U__STRICT_ANSI__ ${CFLAGS_G} ${CFLAGS_O} ${CFLAGS_GIT} ${CFLAGS_I} -DSIM_COMPILER="${COMPILER_NAME}" $(SIM_BUILD_OS_VERSION) -DSIM_BUILD_TOOL=simh-makefile -I . ${OS_CCDEFS} ${ROMS_OPT}
|
||||
ifneq (,${SIM_VERSION_MODE})
|
||||
CC += -DSIM_VERSION_MODE="${SIM_VERSION_MODE}"
|
||||
endif
|
||||
|
||||
9
scp.c
9
scp.c
@ -6950,6 +6950,9 @@ if (flag) {
|
||||
char tarversion[PATH_MAX+1] = "";
|
||||
char curlversion[PATH_MAX+1] = "";
|
||||
FILE *f;
|
||||
#if defined(SIM_BUILD_OS_VERSION)
|
||||
char buildosversion[2*PATH_MAX+1] = S_xstr(SIM_BUILD_OS_VERSION);
|
||||
#endif
|
||||
|
||||
if ((f = popen ("uname -a", "r"))) {
|
||||
memset (osversion, 0, sizeof (osversion));
|
||||
@ -6960,7 +6963,11 @@ if (flag) {
|
||||
} while (osversion[0] == '\0');
|
||||
pclose (f);
|
||||
}
|
||||
fprintf (st, "\n OS: %s", osversion);
|
||||
#if defined(SIM_BUILD_OS_VERSION)
|
||||
if (strcmp(osversion, buildosversion) != 0)
|
||||
fprintf (st, "\n Building OS: %s", buildosversion);
|
||||
#endif
|
||||
fprintf (st, "\n Running OS: %s", osversion);
|
||||
if ((f = popen ("uname", "r"))) {
|
||||
memset (os_type, 0, sizeof (os_type));
|
||||
do {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user