mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-15 05:20:06 +08:00
Use my latest proposed patch for improved -v message. It is simpler and gives a better message, especially when repository has been locally modified: 'tcc version 0.9.27 mob:fef701b 2022-12-02T07:11:55+01:00 locally modified (ARM eabihf Linux)'. Hope it's Ok for maintainers
This commit is contained in:
parent
fef701b57f
commit
7015838f51
12
Makefile
12
Makefile
@ -241,14 +241,12 @@ $(TCC_FILES) : DEFINES += -DONE_SOURCE=0
|
||||
$(X)tccpp.o : $(TCCDEFS_H)
|
||||
endif
|
||||
|
||||
GITHASH := $(shell git rev-parse >/dev/null 2>&1 && git rev-parse --short HEAD || echo no)
|
||||
ifneq ($(GITHASH),no)
|
||||
DEF_GITHASH := -DTCC_GITHASH="\"$(shell git rev-parse --abbrev-ref HEAD):$(GITHASH)$(shell git diff --quiet || echo ' - modified')\""
|
||||
endif
|
||||
FROM_GIT := $(shell git rev-parse >/dev/null 2>&1 && echo yes || echo no)
|
||||
|
||||
GITDATE := $(shell git log -1 >/dev/null 2>&1 && git log -1 --pretty='format:%cI' || echo no)
|
||||
ifneq ($(GITDATE),no)
|
||||
DEF_GITDATE := -DTCC_GITDATE="\"$(shell git log -1 --pretty='format:%cI')\""
|
||||
ifeq ($(FROM_GIT),yes)
|
||||
GITHASH:=$(shell git rev-parse --abbrev-ref HEAD):$(shell git rev-parse --short HEAD) $(shell git log -1 --pretty='format:%cI')
|
||||
GITHASH+=$(shell git diff --quiet || echo locally modified)
|
||||
DEF_GITHASH := -DTCC_GITHASH="\"$(GITHASH)\""
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_debug),yes)
|
||||
|
Loading…
Reference in New Issue
Block a user