From de76c5f12460d6bde8364e724be26f7f5a290f9f Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 30 Nov 2021 02:04:53 +0300 Subject: [PATCH] docs and some tweaks... Signed-off-by: Alex A. Naanou --- Makefile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 8cee83f..412bc46 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,12 @@ # Variables: # CODE_INSTALL - set how we handle the installing code/source. # this can be: -# strip - strip the docs from code +# strip - strip the docs from code (default) # copy - copy the code/doc file # link - link the code/doc files +# (affects install and install-local targets) # INSTALL_PATH - install path -# (only for install target) +# (only affects install target) # # # Examples: @@ -63,13 +64,14 @@ else endif -# get version... +# metadata... # NOTE: the code version is in the code... -VERSION := $(shell \ +VERSION = $(strip $(shell \ cat $(MODULE).cls \ | grep 'VERSION{' \ - | sed 's/.*{\(.*\)}.*/\1/') - + | sed 's/.*{\(.*\)}.*/\1/')) +DATE = $(strip $(shell date "+%Y%m%d%H%M")) +COMMIT = $(strip $(shell git rev-parse HEAD)) # LaTeX paths... TEX_LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) @@ -78,10 +80,11 @@ TEX_HOME = $(shell kpsewhich --var-value TEXMFHOME) # default install target... INSTALL_PATH ?= $(TEX_HOME) - # distribution... +#DIST_NAME := $(MODULE)-$(VERSION) +DIST_NAME := $(MODULE)-$(VERSION)-$(DATE) DIST_DIR := dist -DIST_FILES := \ +DIST_FILES = \ $(wildcard scripts/*) \ $(wildcard examples/*) \ $(wildcard workflow/*) \ @@ -175,7 +178,7 @@ doc: $(MODULE).pdf .PHONY: dist dist: $(DIST_FILES) sweep $(MD) $(DIST_DIR) - zip -Drq $(DIST_DIR)/$(MODULE)-$(VERSION).zip $(DIST_FILES) + zip -Drq $(DIST_DIR)/$(DIST_NAME).zip $(DIST_FILES) .PHONY: all