# HG changeset patch # User Oleksandr Gavenko # Date 1464782321 -10800 # Node ID fefea56726d272322b5dfb2fb950de0d84e1af76 # Parent f2b8c358716d7acf9e5f73453eba5880ad371f72 Warn if build done without version file. diff -r f2b8c358716d -r fefea56726d2 .hgignore --- a/.hgignore Wed Jun 01 14:48:20 2016 +0300 +++ b/.hgignore Wed Jun 01 14:58:41 2016 +0300 @@ -1,18 +1,7 @@ syntax: glob dist/ - -*.dict -*.dict.dz -*.index -*.html -voa-special.aux -voa-special.log -voa-special.out -voa-special.pdf -*.tar.gz -*.tar.bz2 -gadict-*.*/** +VERSION .devel/ *~ diff -r f2b8c358716d -r fefea56726d2 Makefile --- 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='Warning: Build done with local changes!' || :; \ -[[ ${vatrelease} = no ]] && warn2='Warning: Build is far from latest $(vtag) release state by $(vtagdist) changes.' || :; \ +[[ "${visclean}" = no ]] && warn1='Warning: Build done with local changes!' || :; \ +[[ -z "${visclean}" ]] && warn1='Warning: Build done without VERSION file!' || :; \ +[[ "${vatrelease}" = no ]] && warn2='Warning: Build is far from latest $(vtag) 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|" <$< >$@ ################################################################