diff --git a/cfg/global_vars.mk b/cfg/global_vars.mk index 97a1fa6..cff9872 100644 --- a/cfg/global_vars.mk +++ b/cfg/global_vars.mk @@ -1,7 +1,11 @@ # Version TOXIC_VERSION = 0.5.2 -REV = $(shell git rev-list HEAD --count) -VERSION = $(TOXIC_VERSION)_r$(REV) +REV = $(shell if which git &>/dev/null ; then git rev-list HEAD --count 2>/dev/null || echo -n "error" ; else echo -n "error" ; fi) +ifneq ($(REV), error) + VERSION = $(TOXIC_VERSION)_r$(REV) +else + VERSION = $(TOXIC_VERSION) +endif # Project directories DOC_DIR = $(BASE_DIR)/doc diff --git a/cfg/targets/install.mk b/cfg/targets/install.mk index 715b6f9..51beb3e 100644 --- a/cfg/targets/install.mk +++ b/cfg/targets/install.mk @@ -20,6 +20,9 @@ install: toxic @echo "Installing man pages" @for f in $(MANFILES) ; do \ + if [ ! -e "$$f" ]; then \ + continue ;\ + fi ;\ section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\ file=$$section/$$f ;\ mkdir -p $$section ;\