Browse Source

Automate versioning for CDE, set current version to 2.4.0b

Previously in the imake world, changing the CDE version required hand
editing a handful of files.

This commit makes these files into ".in" files.  configure.ac now
holds CDE version information -- both in the AC_INIT() call and in the
CDE_VERSION_* variables a few lines down.

Changing the CDE version now involves editing those two locations in
configure.ac only.

Thereafter, a configure run will replace version information in the
following files with the current CDE version:

copyright
doc/common/help/HELPEnt.sgm
include/Dt/Dt.h
lib/tt/bin/ttauth/ttauth.man

This also causes a catch-22 problem with ToolTalk.  So the
tooltalk.inc file is gone and the relevant TT Makefiles have been
modified to set and define the TT version in those Makefiles that
actually use it.
Jon Trulson 2 years ago
parent
commit
a5a2d937cb

+ 7 - 0
cde/.gitignore

@@ -2314,3 +2314,10 @@ programs/localized/util/MsgCat.c
 programs/fontaliases/linux/en_US.UTF-8/fonts.alias
 programs/fontaliases/linux/en_US.UTF-8/mk_fonts_alias
 programs/fontaliases/linux/en_US.UTF-8/test_fonts_alias
+
+# files that are modified by configure for version information
+copyright
+doc/common/help/HELPEnt.sgm
+include/Dt/Dt.h
+lib/tt/bin/ttauth/ttauth.man
+lib/tt/tooltalk.inc

+ 26 - 12
cde/configure.ac

@@ -1,7 +1,27 @@
-AC_INIT([cde-desktop], [2.4.0a], [https://sourceforge.net/projects/cdesktopenv])
+dnl When changing the version below, also change the CDE_VERSION_* macros
+dnl to match further below
+AC_INIT([Common Desktop Environment],
+        [2.4.0b],
+        [https://sourceforge.net/projects/cdesktopenv],
+        [cde],
+        [https://sourceforge.net/projects/cdesktopenv])
 AC_CONFIG_HEADERS([include/autotools_config.h])
 AC_CONFIG_MACRO_DIRS([m4])
-AM_INIT_AUTOMAKE([foreign subdir-objects])
+AM_INIT_AUTOMAKE([foreign subdir-objects no-define])
+
+dnl global CDE versioning
+
+CDE_VERSION_MAJOR=2
+CDE_VERSION_MINOR=4
+CDE_VERSION_MICRO=0
+dnl this is blank for a release, or contains an alpha character to indicate a
+dnl dev release.
+CDE_VERSION_DEV=b
+
+AC_SUBST(CDE_VERSION_MAJOR)
+AC_SUBST(CDE_VERSION_MINOR)
+AC_SUBST(CDE_VERSION_MICRO)
+AC_SUBST(CDE_VERSION_DEV)
 
 dnl These must be up here for the compiler search list to actually work
 AC_PROG_CC([cc gcc clang])
@@ -20,16 +40,6 @@ dnl AC_PREREQ()
 AC_CANONICAL_HOST
 AC_CANONICAL_BUILD
 
-dnl global CDE versioning
-
-CDE_VERSION_MAJOR=2
-CDE_VERSION_MINOR=3
-CDE_VERSION_MICRO=0
-
-AC_SUBST(CDE_VERSION_MAJOR)
-AC_SUBST(CDE_VERSION_MINOR)
-AC_SUBST(CDE_VERSION_MICRO)
-
 dnl SOURCE_DEFINES - start with CDE project default
 SOURCE_CPP_DEFINES="-DANSICPP -DMULTIBYTE -DNLS16"
 
@@ -848,6 +858,10 @@ doc/it_IT.ISO8859-1/help/Makefile
 
 include/Makefile
 
+copyright
+doc/common/help/HELPEnt.sgm
+include/Dt/Dt.h
+lib/tt/bin/ttauth/ttauth.man
 ])
 
 AC_OUTPUT

+ 1 - 1
cde/copyright → cde/copyright.in

@@ -1,7 +1,7 @@
 
 
 
-             Common Desktop Environment Version 2.4.0a
+             Common Desktop Environment Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@
 
 (c) Copyright 1993-2012 The Open Group
 (c) Copyright 2012-2022 CDE Project contributors, see CONTRIBUTORS for details

+ 2 - 2
cde/doc/common/help/HELPEnt.sgm → cde/doc/common/help/HELPEnt.sgm.in

@@ -1,8 +1,8 @@
 <!-- $TOG: HELPEnt.sgm /main/12 1999/10/12 09:35:15 mgreess $ -->
-<!ENTITY CDEcopyright "<GlossTerm Role=nogloss>Common Desktop Environment 2.4.0a</GlossTerm>,
+<!ENTITY CDEcopyright "<GlossTerm Role=nogloss>Common Desktop Environment @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@</GlossTerm>,
 
 &copy; Copyright 1993-2012 The Open Group
-&copy; Copyright 2012-2020 CDE Project contributors, see CONTRIBUTORS for details
+&copy; Copyright 2012-2023 CDE Project contributors, see CONTRIBUTORS for details
 
 Project Website: http://cdesktopenv.sourceforge.net/
 

+ 4 - 4
cde/include/Dt/Dt.h → cde/include/Dt/Dt.h.in

@@ -50,15 +50,15 @@ extern "C" {
 
 /* CDE Version information */
 
-#define DtVERSION     		2
-#define DtREVISION    		4
-#define DtUPDATE_LEVEL    	0
+#define DtVERSION     		@CDE_VERSION_MAJOR@
+#define DtREVISION    		@CDE_VERSION_MINOR@
+#define DtUPDATE_LEVEL    	@CDE_VERSION_MICRO@
 
 #define DtVERSION_NUMBER	(DtVERSION * 10000 +  \
 				DtREVISION * 100 + \
 				DtUPDATE_LEVEL)
 
-#define DtVERSION_STRING "CDE Version 2.4.0a"
+#define DtVERSION_STRING "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
 
 
 /* 

+ 2 - 1
cde/lib/tt/bin/dbck/Makefile.am

@@ -1,6 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 bin_PROGRAMS = ttdbck
 

+ 2 - 1
cde/lib/tt/bin/scripts/Makefile.am

@@ -1,6 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 noinst_SCRIPTS = ttce2xdr
 BUILT_SOURCES = ttce2xdr

+ 2 - 1
cde/lib/tt/bin/shell/Makefile.am

@@ -1,6 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 bin_PROGRAMS = ttmv ttrm ttcp ttrmdir
 

+ 2 - 1
cde/lib/tt/bin/tt_type_comp/Makefile.am

@@ -1,6 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 BUILT_SOURCES = mp_types_gram.h
 CLEANFILES = mp_types_gram.h

+ 1 - 1
cde/lib/tt/bin/ttauth/ttauth.man → cde/lib/tt/bin/ttauth/ttauth.man.in

@@ -18,7 +18,7 @@
 .\" not be used in advertising or otherwise to promote the sale, use or
 .\" other dealings in this Software without prior written authorization
 .\" from The Open Group.
-.TH TTAUTH 1 "Release 2.4.0a" "CDE"
+.TH TTAUTH 1 "Release @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@" "CDE"
 .SH NAME
 ttauth \- ToolTalk authority file utility
 .SH SYNOPSIS

+ 2 - 1
cde/lib/tt/bin/ttdbserverd/Makefile.am

@@ -1,6 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 bin_PROGRAMS = rpc.ttdbserver
 

+ 2 - 1
cde/lib/tt/bin/ttsession/Makefile.am

@@ -1,6 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 bin_PROGRAMS = ttsession
 

+ 2 - 1
cde/lib/tt/bin/tttar/Makefile.am

@@ -1,6 +1,7 @@
 MAINTAINERCLENAFILES = Makefile.in
 
-include ../../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 bin_PROGRAMS = tttar
 

+ 0 - 2
cde/lib/tt/bin/tttrace/Makefile.am

@@ -1,7 +1,5 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
-
 bin_PROGRAMS = tttrace
 
 tttrace_CXXFLAGS = -I../../lib

+ 0 - 1
cde/lib/tt/lib/Makefile.am

@@ -2,7 +2,6 @@ MAINTAINERCLEANFILES = Makefile.in
 
 SUBDIRS = api db mp util tttk
 
-include ../tooltalk.inc
 
 lib_LTLIBRARIES = libtt.la
 

+ 0 - 2
cde/lib/tt/lib/api/c/Makefile.am

@@ -2,8 +2,6 @@ ttdir = ${includedir}/Tt
 
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../../tooltalk.inc
-
 noinst_LTLIBRARIES = libapi.la
 
 libapi_la_CXXFLAGS = -I../../../lib

+ 0 - 2
cde/lib/tt/lib/api/dnd/Makefile.am

@@ -1,7 +1,5 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../../tooltalk.inc
-
 noinst_LTLIBRARIES = libdnd.la
 
 libdnd_la_CFLAGS = -I../..

+ 0 - 2
cde/lib/tt/lib/db/Makefile.am

@@ -1,7 +1,5 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
-
 noinst_LTLIBRARIES = libdb.la
 
 libdb_la_CXXFLAGS = -I../../lib -I../../mini_isam

+ 0 - 2
cde/lib/tt/lib/mp/Makefile.am

@@ -1,7 +1,5 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
-
 noinst_LTLIBRARIES = libmp.la
 
 libmp_la_CXXFLAGS = -I../../lib -I../../mini_isam

+ 2 - 3
cde/lib/tt/lib/tttk/Makefile.am

@@ -1,8 +1,7 @@
-headerdir = ${prefix}/share/include/Tt
-
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 noinst_LTLIBRARIES = libtttk.la
 

+ 2 - 1
cde/lib/tt/lib/util/Makefile.am

@@ -1,6 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 noinst_LTLIBRARIES = libutil.la
 

+ 2 - 1
cde/lib/tt/mini_isam/Makefile.am

@@ -1,6 +1,7 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../tooltalk.inc
+TT_VERSION = "CDE Version @CDE_VERSION_MAJOR@.@CDE_VERSION_MINOR@.@CDE_VERSION_MICRO@@CDE_VERSION_DEV@"
+TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
 
 noinst_LIBRARIES= libisam.a
 

+ 0 - 2
cde/lib/tt/slib/Makefile.am

@@ -1,7 +1,5 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-include ../tooltalk.inc
-
 noinst_LIBRARIES = libstt.a
 
 libstt_a_CXXFLAGS = $(TIRPC_DEFINES) -I../lib

+ 0 - 13
cde/lib/tt/tooltalk.inc

@@ -1,13 +0,0 @@
-# This file is imbedded near the top of  every ToolTalk Imakefile.
-# It contains definitions and redefinitions that are common to all
-# of ToolTalk but which aren't referred to anywhere else in the
-# build. 
-
-# It should match tooltalk.tmpl in terms of definitions...
-
-# TT_VERSION defines the version string which is imbedded in all the 
-# binaries and shipped libraries.
-
-TT_VERSION = "CDE Version 2.4.0a"
-TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\"
-