From 9e52c62db68eb5312db3378faa921f3dfaa35e41 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 23 Nov 2021 21:33:14 +0000 Subject: 2 minor improvements: Make sure tclUuid.h ends with newline; Fallback "unknown" if neither GIT, neither fossil is detected --- unix/Makefile.in | 3 ++- win/Makefile.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 6f51a0b..3447acb 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -1260,6 +1260,7 @@ tclBasic.o: $(GENERIC_DIR)/tclBasic.c $(COMPILEHDR) $(MATHHDRS) $(NREHDR) tclUuid.h: $(TOP_DIR)/manifest.uuid echo "#define TCL_VERSION_UUID \\" >$@ cat $(TOP_DIR)/manifest.uuid >>$@ + echo "" >>$@ tclBinary.o: $(GENERIC_DIR)/tclBinary.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclBinary.c @@ -2231,7 +2232,7 @@ $(UNIX_DIR)/tclConfig.h.in: $(MAC_OSX_DIR)/configure $(TOP_DIR)/manifest.uuid: printf "git-" >$(TOP_DIR)/manifest.uuid - (cd $(TOP_DIR); git rev-parse HEAD >>$(TOP_DIR)/manifest.uuid) + (cd $(TOP_DIR); git rev-parse HEAD >>$(TOP_DIR)/manifest.uuid || printf "unknown" >$(TOP_DIR)/manifest.uuid) dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in genstubs \ $(MAC_OSX_DIR)/configure $(TOP_DIR)/manifest.uuid dist-packages ${NATIVE_TCLSH} diff --git a/win/Makefile.in b/win/Makefile.in index c8b0bbe..7adb057 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -677,11 +677,12 @@ tclEvent.${OBJEXT}: tclEvent.c tclUuid.h $(TOP_DIR)/manifest.uuid: printf "git-" >$(TOP_DIR)/manifest.uuid - git rev-parse HEAD >>$(TOP_DIR)/manifest.uuid + (cd $(TOP_DIR); git rev-parse HEAD >>$(TOP_DIR)/manifest.uuid || printf "unknown" >$(TOP_DIR)/manifest.uuid) tclUuid.h: $(TOP_DIR)/manifest.uuid echo "#define TCL_VERSION_UUID \\" >$@ cat $(TOP_DIR)/manifest.uuid >>$@ + echo "" >>$@ # The following objects are part of the stub library and should not be built # as DLL objects but none of the symbols should be exported -- cgit v0.12