Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ m4_define([FORM_VERSION], m4_esyscmd_s([
# As a fallback, try for form3.h.
major_version=`grep MAJORVERSION sources/form3.h | sed -e 's/ *#define *MAJORVERSION *//'`
minor_version=`grep MINORVERSION sources/form3.h | sed -e 's/ *#define *MINORVERSION *//'`
if test "x$major_version" != x && test "x$minor_version" != x; then
patch_version=`grep PATCHVERSION sources/form3.h | sed -e 's/ *#define *PATCHVERSION *//'`
if test "x$major_version" != x && test "x$minor_version" != x && test "x$patch_version" != x; then
# Make the version files.
echo "$major_version.$minor_version" >.version
echo "$major_version.$minor_version.$patch_version" >.version
echo "#define REPO_MAJOR_VERSION $major_version" >sources/version.h.in
echo "#define REPO_MINOR_VERSION $minor_version" >>sources/version.h.in
echo "#define REPO_PATCH_VERSION $patch_version" >>sources/version.h.in
echo '\\def\\repomajorversion'"{$major_version}" >doc/manual/version.tex.in
echo '\\def\\repominorversion'"{$minor_version}" >>doc/manual/version.tex.in
echo '\\def\\repopatchversion'"{$patch_version}" >>doc/manual/version.tex.in
cp doc/manual/version.tex.in doc/devref/version.tex.in
touch doc/doxygen/version.sh.in
fi
Expand Down
7 changes: 3 additions & 4 deletions doc/manual/prepro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ \section{The preprocessor variables}
\noindent \FORM\ has a number of built in preprocessor variables. They are:

\begin{description}
\item[VERSION\_] The current version\index{VERSION\_} as the \formmajorversion{} in
\formmajorversion.\formminorversion.
\item[SUBVERSION\_] The sub-version\index{SUBVERSION\_} as the \formminorversion{} in
\formmajorversion.\formminorversion.
\item[VERSION\_] The current version\index{VERSION\_} (or ``major version''), as the ``1'' in 1.2.3.
\item[SUBVERSION\_] The current sub-version\index{SUBVERSION\_} (or ``minor version''), as the ``2'' in 1.2.3.
\item[SUBSUBVERSION\_] The current sub-sub-version\index{SUBSUBVERSION\_} (or ``patch version''), as the ``3'' in 1.2.3.
\item[NAME\_] The name\index{NAME\_} of the program file.
\item[DATE\_] The date\index{DATE\_} of the current run.
\item[CMODULE\_] The number\index{CMODULE\_} of the current module.
Expand Down
7 changes: 4 additions & 3 deletions sources/form3.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@

#define MAJORVERSION 5
#define MINORVERSION 0
#define PATCHVERSION 0

#ifdef __DATE__
#define PRODUCTIONDATE __DATE__
#else
#define PRODUCTIONDATE "8-nov-2022"
#define PRODUCTIONDATE "27-jan-2026"
#endif

/*#undef BETAVERSION */
#define BETAVERSION
#undef BETAVERSION
/*#define BETAVERSION*/

#ifdef LINUX32
#define UNIX
Expand Down
12 changes: 7 additions & 5 deletions sources/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
/* We have also version.h. */
#include "version.h"
#ifndef REPO_VERSION
#define REPO_VERSION STRINGIFY(REPO_MAJOR_VERSION) "." STRINGIFY(REPO_MINOR_VERSION)
#define REPO_VERSION STRINGIFY(REPO_MAJOR_VERSION) "." STRINGIFY(REPO_MINOR_VERSION) "." STRINGIFY(REPO_PATCH_VERSION)
#endif
#ifndef REPO_DATE
/* The build date, instead of the repo date. */
Expand All @@ -88,15 +88,16 @@
#endif
#define MAJORVERSION REPO_MAJOR_VERSION
#define MINORVERSION REPO_MINOR_VERSION
#define PATCHVERSION REPO_PATCH_VERSION
#else
/*
* Otherwise, form3.h defines MAJORVERSION, MINORVERSION and PRODUCTIONDATE,
* possibly BETAVERSION.
* Otherwise, form3.h defines MAJORVERSION, MINORVERSION, PATCHVERSION
* and PRODUCTIONDATE, possibly BETAVERSION.
*/
#ifdef BETAVERSION
#define VERSIONSTR__ STRINGIFY(MAJORVERSION) "." STRINGIFY(MINORVERSION) "Beta"
#define VERSIONSTR__ STRINGIFY(MAJORVERSION) "." STRINGIFY(MINORVERSION) "." STRINGIFY(PATCHVERSION) "Beta"
#else
#define VERSIONSTR__ STRINGIFY(MAJORVERSION) "." STRINGIFY(MINORVERSION)
#define VERSIONSTR__ STRINGIFY(MAJORVERSION) "." STRINGIFY(MINORVERSION) "." STRINGIFY(PATCHVERSION)
#endif
#define VERSIONSTR FORMNAME " " VERSIONSTR__ " (" PRODUCTIONDATE ")"
#endif
Expand Down Expand Up @@ -1236,6 +1237,7 @@ void StartVariables(void)
AM.oldnumextrasymbols = strDup1((UBYTE *)"OLDNUMEXTRASYMBOLS_","oldnumextrasymbols");
PutPreVar((UBYTE *)"VERSION_",(UBYTE *)STRINGIFY(MAJORVERSION),0,0);
PutPreVar((UBYTE *)"SUBVERSION_",(UBYTE *)STRINGIFY(MINORVERSION),0,0);
PutPreVar((UBYTE *)"SUBSUBVERSION_",(UBYTE *)STRINGIFY(PATCHVERSION),0,0);
PutPreVar((UBYTE *)"DATE_",(UBYTE *)MakeDate(),0,0);
PutPreVar((UBYTE *)"random_",(UBYTE *)"________",0,0);
PutPreVar((UBYTE *)"optimminvar_",(UBYTE *)("0"),0,0);
Expand Down
Loading