correct archive name
authorMazet Laurent <laurent.mazet@thalesgroup.com>
Fri, 13 Jun 2025 15:09:53 +0000 (17:09 +0200)
committerMazet Laurent <laurent.mazet@thalesgroup.com>
Fri, 13 Jun 2025 15:16:58 +0000 (17:16 +0200)
makefile

index ed24c095e25e3e6ffc668377f72e6b52ff90fdaf..873bd42f60587520741d28653b2ac5fd9dad406d 100644 (file)
--- a/makefile
+++ b/makefile
@@ -78,6 +78,9 @@ VALID = $(call TITLE, $(1)) && $(2) && $(call PASS, SUCCESS) || { $(call FAIL, F
 GETCOMMENTS = awk '/\/\*[ \t]*$(1):/,/\*\// { sub(/.*\/\*[ \t]*$(1):/, ""); sub (/[ \t]*\*\/.*/, ""); print } /\/\/[ \t]*$(1):/ {sub (/.*\/\/[ \t]*$(1):/, ""); print }' $(2)
 #GETCOMMENTS = perl -- getcomments.pl -p='$(1):\s' -f='%' $(2)
 
+DATE = $(shell git log -1 HEAD --format=%ai|awk '{print $$1}')
+#DATE = $(shell hg log -r-1 --template '{date|isodate}'|awk '{print $$1}')
+
 ## Generic rules
 
 all: depends
@@ -134,8 +137,8 @@ tests:
        $(MAKE) all
        $(MAKE) $(addprefix test_,$(ALLEXE))
 
-archive: wipe documentation
-       name=`basename "$$(pwd)"`; cd ..; tar cvz --exclude='.git*' -f $$name-`date +%Y%m%d`.tgz $$name
+archive: wipe changelog documentation
+       name=`basename "$$(pwd)"`; cd ..; tar cvz --exclude='.git*' -f $$name-$(DATE).tgz $$name
 
 ## Main rules
 
@@ -247,9 +250,14 @@ install_lib:
 install_exe:
        make $(addprefix install_,$(ALLEXE))
 
+changelog:
+       echo "Logs from $(DATE)" > $@.txt
+       git log --pretty=format:'- %s' >> $@.txt
+#      hg log --template changelog >>$@.txt
+
 ## Phony
 
-.PHONY: all analyze clean count depends documentation gcovs purge tests
+.PHONY: all analyze changelog clean count depends documentation gcovs purge tests
 
 ## Precious