History

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

Christian Jullien committed 3 years ago

Commit 70158381 parent fef701b2 files · +5 −10Browse files

Unified · Split

2 files
  1. Makefile +5 −7
  2. tcc.c +0 −3
Makefile+5−7
@@ -241,14 +241,12 @@ $(TCC_FILES) : DEFINES += -DONE_SOURCE=0 · 240 unmodified lines
241$(X)tccpp.o : $(TCCDEFS_H)241$(X)tccpp.o : $(TCCDEFS_H)
242endif242endif
243 243
244GITHASH := $(shell git rev-parse >/dev/null 2>&1 && git rev-parse --short HEAD || echo no)244FROM_GIT := $(shell git rev-parse >/dev/null 2>&1 && echo yes || echo no)
245ifneq ($(GITHASH),no)
246DEF_GITHASH := -DTCC_GITHASH="\"$(shell git rev-parse --abbrev-ref HEAD):$(GITHASH)$(shell git diff --quiet || echo ' - modified')\""
247endif
248 245
249GITDATE := $(shell git log -1 >/dev/null 2>&1 && git log -1 --pretty='format:%cI' || echo no)246ifeq ($(FROM_GIT),yes)
250ifneq ($(GITDATE),no)247GITHASH:=$(shell git rev-parse --abbrev-ref HEAD):$(shell git rev-parse --short HEAD) $(shell git log -1 --pretty='format:%cI')
251DEF_GITDATE := -DTCC_GITDATE="\"$(shell git log -1 --pretty='format:%cI')\""248GITHASH+=$(shell git diff --quiet || echo locally modified)
249DEF_GITHASH := -DTCC_GITHASH="\"$(GITHASH)\""
252endif250endif
253 251
254ifeq ($(CONFIG_debug),yes)252ifeq ($(CONFIG_debug),yes)
tcc.c+0−3
@@ -155,9 +155,6 @@ static const char version[] = · 154 unmodified lines
155 "tcc version "TCC_VERSION155 "tcc version "TCC_VERSION
156#ifdef TCC_GITHASH156#ifdef TCC_GITHASH
157 " "TCC_GITHASH157 " "TCC_GITHASH
158#endif
159#ifdef TCC_GITDATE
160 " on "TCC_GITDATE
161#endif158#endif
162 " ("159 " ("
163#ifdef TCC_TARGET_I386160#ifdef TCC_TARGET_I386

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t