Makefile
changeset 482 fefea56726d2
parent 481 f2b8c358716d
child 493 8bfe8d4ad4a4
--- a/Makefile	Wed Jun 01 14:48:20 2016 +0300
+++ b/Makefile	Wed Jun 01 14:58:41 2016 +0300
@@ -57,6 +57,7 @@
 
 $(VER_FILE): | $(dir $(VER_FILE))
 	\
+[ -d .hg/ ] || { echo We miss VERSION file!!; exit 0; }; \
 vtagdist=$$(hg log -r . --template '{latesttagdistance}'); \
 vatrelease=$$([ $$vtagdist -le 1 ] && echo yes || echo no); \
 vtag=$$(hg log -r . --template '{latesttag}'); \
@@ -426,8 +427,9 @@
 
 $(RST_TMPL_FILE): www/tmpl/rst.tmpl.in $(BUILD_SCRIPTS) | $(dir $(RST_TMPL_FILE))
 	\
-[[ ${visclean} = no ]] && warn1='<b>Warning</b>: Build done with local changes!' || :; \
-[[ ${vatrelease} = no ]] && warn2='<b>Warning</b>: Build is far from latest <tt>$(vtag)</tt> release state by $(vtagdist) changes.' || :; \
+[[ "${visclean}" = no ]] && warn1='<b>Warning</b>: Build done with local changes!' || :; \
+[[ -z "${visclean}" ]] && warn1='<b>Warning</b>: Build done without <b>VERSION</b> file!' || :; \
+[[ "${vatrelease}" = no ]] && warn2='<b>Warning</b>: Build is far from latest <tt>$(vtag)</tt> release state by $(vtagdist) changes.' || :; \
 sed -e "s|{date}|$$(date +%F)|" -e "s|{rev}|$$(hg id -i)|" -e "s|{warn1}|$$warn1|" -e "s|{warn2}|$$warn2|" <$< >$@
 
 ################################################################