Include a dissuader for odd numbered minor releases
[pspp] / src / libpspp / automake.mk
index 1a7b54f066351df7a1c66ec2e5b594c44d909dbe..29628596b33c52eedd7d10dd58be8ae4c7151ba7 100644 (file)
@@ -122,8 +122,12 @@ src/libpspp/version.c: $(top_srcdir)/AUTHORS Makefile
        $(AM_V_at)echo "#include \"version.h\"" >> $@,tmp
        $(AM_V_at)echo "const char bare_version[] = \"$(VERSION)\";" >> $@,tmp
        $(AM_V_at)echo "const char version[] = \"GNU $(PACKAGE) $(VERSION)\";" >> $@,tmp
-       $(AM_V_at)echo "const char stat_version[] = \"GNU $(PACKAGE) $(VERSION) \
-$(AM_V_at)(`LC_ALL=C TZ=UTC date`).\";" >> $@,tmp
+       $(AM_V_at)echo "const char announced_version[] = \"GNU $(PACKAGE) $(VERSION)\"" >> $@,tmp
+       @case `$(AM_V_at)echo $(VERSION) | $(AM_V_at)$(SED) -e 's/[0-9][0-9]*\.[0-9]*\([0-9]\)\.[0-9][0-9]*/\1/'` in \
+         [13579]) $(AM_V_at)echo "\"\nThis is an unreleased test version. It is not recommended for production use. Use at your own risk\"" >> $@,tmp \
+       ;;\
+       esac
+       $(AM_V_at)echo ";" >> $@,tmp
        $(AM_V_at)echo "const char host_system[] = \"$(host_triplet)\";" >> $@,tmp
        $(AM_V_at)echo "const char build_system[] = \"$(build_triplet)\";" >> $@,tmp
        $(AM_V_at)echo "const char locale_dir[] = \"$(datadir)/locale\";" >> $@,tmp
@@ -131,4 +135,4 @@ $(AM_V_at)(`LC_ALL=C TZ=UTC date`).\";" >> $@,tmp
        $(AM_V_at)echo "const char *const authors[] = {" >> $@,tmp
        $(AM_V_at)$(SED) -e 's/^/  \"/' -e 's/$$/\",/' $(top_srcdir)/AUTHORS >> $@,tmp
        $(AM_V_at)echo "0 };" >> $@,tmp
-       mv $@,tmp $@
+       $(AM_V_at)mv $@,tmp $@