Include VERSION file into source distribution.
--- a/Makefile Wed Jun 01 14:28:17 2016 +0300
+++ b/Makefile Wed Jun 01 14:39:31 2016 +0300
@@ -43,7 +43,7 @@
################################################################
# Version extracting/generation.
-VER_FILE := dist/misc/VERSION
+VER_FILE := VERSION
# Prevent making distribution with wrong version.
ifneq '' '$(filter deploy% dist%,$(MAKECMDGOALS))'
@@ -307,9 +307,9 @@
DISTSRC_GADICT_FILES := $(patsubst %,dist/$(fullpkgname)_src/%,$(GADICT_FILES))
DISTSRC_PY_FILES := $(patsubst %,dist/$(fullpkgname)_src/py/%,$(notdir $(PY_FILES)))
DISTSRC_RST_FILES := $(patsubst %,dist/$(fullpkgname)_src/www/%,$(notdir $(RST_FILES)))
-DISTSRC_MAKEFILE := dist/$(fullpkgname)_src/Makefile
+DISTSRC_BUILD_SCRIPTS := $(patsubst %,dist/$(fullpkgname)_src/%, Makefile VERSION)
-dist/$(fullpkgname)_src.tar.gz: $(DISTSRC_GADICT_FILES) $(DISTSRC_PY_FILES) $(DISTSRC_RST_FILES) $(DISTSRC_MAKEFILE) $(BUILD_SCRIPTS)
+dist/$(fullpkgname)_src.tar.gz: $(DISTSRC_GADICT_FILES) $(DISTSRC_PY_FILES) $(DISTSRC_RST_FILES) $(DISTSRC_BUILD_SCRIPTS) $(BUILD_SCRIPTS)
rm -rf $@
tar zcf $@ -C dist/ $(fullpkgname)_src
@@ -322,7 +322,7 @@
$(DISTSRC_RST_FILES): dist/$(fullpkgname)_src/www/%: www/% | dist/$(fullpkgname)_src/www/
cp $< $@
-$(DISTSRC_MAKEFILE): Makefile | dist/$(fullpkgname)_src/
+$(DISTSRC_BUILD_SCRIPTS): dist/$(fullpkgname)_src/%: % | dist/$(fullpkgname)_src/
cp $< $@
dist/$(fullpkgname)_src/ $(patsubst %,dist/$(fullpkgname)_src/%, py/ www/):
@@ -507,7 +507,7 @@
echo; \
echo Current configuration:; \
echo; \
-sed 's=^= =' <VERSION
+sed 's=^= =' <$(VER_FILE)
@if [ -f Makefile.config ]; then \
echo; \
echo User configuration:; \
@@ -537,6 +537,7 @@
.PHONY: distclean
distclean: clean
+ rm -rf $(VER_FILE)
.PHONY: clean
clean: