mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-11-16 12:34:45 +00:00
stuff & etc..
- tccpp.c: rename ... to __TCC_BCHECK__/__TCC_BACKTRACE__ - libtcc.c: correct total line count - libtcc.c: support -run -- args... (instead of -run @ args ...) - Makefile/build-tcc.bat: streamline GITHASH string somewhat - bt-exe.c: avoid redef of pstrcpy() with 'tcc -bt tcc.c ...'
This commit is contained in:
12
Makefile
12
Makefile
@@ -243,12 +243,10 @@ $(TCC_FILES) : DEFINES += -DONE_SOURCE=0
|
||||
$(X)tccpp.o : $(TCCDEFS_H)
|
||||
endif
|
||||
|
||||
FROM_GIT := $(shell git rev-parse >/dev/null 2>&1 && echo yes || echo no)
|
||||
|
||||
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')
|
||||
GITLOCAL:=$(shell git diff --quiet || echo ' locally modified')
|
||||
DEF_GITHASH:= -DTCC_GITHASH="\"$(GITHASH)$(GITLOCAL)\""
|
||||
GITHASH:=$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null || echo no)
|
||||
ifneq ($(GITHASH),no)
|
||||
GITHASH:=$(shell git log -1 --pretty='format:%cs $(GITHASH)@%h')$(shell git diff --quiet || echo '*')
|
||||
DEF_GITHASH:= -DTCC_GITHASH="\"$(GITHASH)\""
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_debug),yes)
|
||||
@@ -270,7 +268,7 @@ $(X)%.o : %.c $(LIBTCC_INC)
|
||||
|
||||
# additional dependencies
|
||||
$(X)tcc.o : tcctools.c
|
||||
$(X)tcc.o : DEFINES += $(DEF_GITHASH) $(DEF_GITDATE)
|
||||
$(X)tcc.o : DEFINES += $(DEF_GITHASH)
|
||||
|
||||
# Host Tiny C Compiler
|
||||
tcc$(EXESUF): tcc.o $(LIBTCC)
|
||||
|
||||
Reference in New Issue
Block a user