G'day,
As part of the recent lglicua-0.1-beta1 release, some changes were made
to the version of tecmake.mak that the build process applies to override
the troublesome SourceForge copies of tecmake.mak for all packages.
(The trouble is that testing for newer features, e.g. GTK3 instead of GTK2,
used a test that topped out at GNU/Linux kernel 5, and, now that kernel
6.x is appearing in distribution releases (e.g. Rocky 9.2, Ubuntu 23.04),
the wrong selection was made, and the build failed.)
The first two changes merely continue a coding standard change, where
static text (e.g. "arm", "Linux26", "ia64", "arm64", "x86", "x64",
"Haiku") are written first in "ifeq" makefile conditionals.
As explained earlier, this change makes the order fit into the inbuilt
functions "findstring" and "filter", both of whom specify the static
text first. This lays the groundwork for coalescing code into simpler,
compact and understandable paragraphs. Also, using "else ifeq ..."
and/or "else ifneq ..." cuts down the number of possible code paths,
and so also aids in making the code easier to understand.
----
The changes are split up into four patches, to make the effort to
check for correctness easier. The patches are attached to this message,
and are:
v01-4.31-tecmake.mak.patch:
For lines 200-550 of tecmake.mak (4.30), change ifeq parameter
order to have static text first, variable name second (14
changes);
v02-4.31-tecmake.mak.patch:
For lines 551-1892 of tecmake.mak (4.30), change ifeq parameter
order to have static text first, variable name second (8
changes);
v03-4.31-tecmake.mak.patch:
Reduce the logic selecting GTK_DEFAULT (and also NO_GTK_DEFAULT)
from 37 lines to 19, by using "else ifneq" and filter/findstring:
1. else ifneq ($(filter Linux26 Linux26_64, $(TEC_UNAME)), )
NO_GTK_DEFAULT = Yes
2. else ifneq ($(filter CYGWIN CentOS Linux MacOS FreeBSD,
$(TEC_SYSNAME)), )
GTK_DEFAULT = Yes
3. else ifneq ($(findstring SunOS, $(TEC_UNAME)), ) [...]
NO_GTK_DEFAULT is not used elsewhere in tecmake.mak, nor have I
traces of its use in IM/CD/IUP etc packages. It's possible
that this definition is only used to enable logic selection in
this paragraph, and NO_GTK_DEFAULT could be eliminated entirely.
v04-4.31-tecmake.mak.patch:
Change VERSION from 4.30-03 to 4.31.
----
cheers,
sur-behoffski (Brenton Hoff)
programmer, Grouse Software
--- 00-tecmake.mak 2023-06-25 03:28:32.000000000 +0930
+++ 01-tecmake.mak 2023-06-25 03:28:32.000000000 +0930
@@ -6,7 +6,7 @@
#---------------------------------#
# Tecmake Version
-VERSION = 4.30
+VERSION = 4.30-01
#---------------------------------#
@@ -200,14 +200,14 @@
ifneq ($(findstring x86, $(TEC_SYSARCH)), )
TEC_BYTEORDER = TEC_LITTLEENDIAN
else
-ifeq ($(TEC_SYSARCH), arm)
+ifeq (arm, $(TEC_SYSARCH))
TEC_BYTEORDER = TEC_LITTLEENDIAN
else
TEC_BYTEORDER = TEC_BIGENDIAN
endif
endif
-ifeq ($(TEC_SYSARCH), x64)
+ifeq (x64, $(TEC_SYSARCH))
TEC_BYTEORDER = TEC_LITTLEENDIAN
TEC_WORDSIZE = TEC_64
else
@@ -219,12 +219,12 @@
endif
# Itanium Exception
-ifeq ($(TEC_SYSARCH), ia64)
+ifeq (ia64, $(TEC_SYSARCH))
TEC_BYTEORDER = TEC_LITTLEENDIAN
TEC_WORDSIZE = TEC_64
endif
-ifeq ($(TEC_SYSARCH), arm64)
+ifeq (arm64, $(TEC_SYSARCH))
TEC_BYTEORDER = TEC_LITTLEENDIAN
TEC_WORDSIZE = TEC_64
endif
@@ -246,10 +246,10 @@
ifneq ($(findstring Linux24, $(TEC_UNAME)), )
NO_GTK_DEFAULT = Yes
endif
-ifeq ($(TEC_UNAME), Linux26)
+ifeq (Linux26, $(TEC_UNAME))
NO_GTK_DEFAULT = Yes
endif
-ifeq ($(TEC_UNAME), Linux26_64)
+ifeq (Linux26_64, $(TEC_UNAME))
NO_GTK_DEFAULT = Yes
endif
@@ -270,7 +270,7 @@
GTK_DEFAULT = Yes
endif
ifneq ($(findstring SunOS, $(TEC_UNAME)), )
- ifeq ($(TEC_SYSARCH), x86)
+ ifeq (x86, $(TEC_SYSARCH))
GTK_DEFAULT = Yes
endif
endif
@@ -364,7 +364,7 @@
DEPEND := $(DEPENDDIR)/$(TARGETNAME).$(DEPEXT).$(TEC_UNAME)
endif
-ifeq ($(MAKETYPE), APP)
+ifeq (APP, $(MAKETYPE))
TARGETROOT ?= $(PROJDIR)/bin
else
TARGETROOT ?= $(PROJDIR)/lib
@@ -505,14 +505,14 @@
endif
ifdef USE_LOH_SUBDIR
- ifeq ($(TEC_BYTEORDER), TEC_BIGENDIAN)
- ifeq ($(TEC_WORDSIZE), TEC_64)
+ ifeq (TEC_BIGENDIAN, $(TEC_BYTEORDER))
+ ifeq (TEC_64, $(TEC_WORDSIZE))
LOH_SUBDIR ?= be64
else
LOH_SUBDIR ?= be32
endif
else
- ifeq ($(TEC_WORDSIZE), TEC_64)
+ ifeq (TEC_64, $(TEC_WORDSIZE))
LOH_SUBDIR ?= le64
else
LOH_SUBDIR ?= le32
@@ -522,14 +522,14 @@
LOHDIR := $(LOHDIR)/$(LOH_SUBDIR)
INCLUDES += $(LOHDIR)
else
- ifeq ($(TEC_BYTEORDER), TEC_BIGENDIAN)
- ifeq ($(TEC_WORDSIZE), TEC_64)
+ ifeq (TEC_BIGENDIAN, $(TEC_BYTEORDER))
+ ifeq (TEC_64, $(TEC_WORDSIZE))
LO_SUFFIX ?= _be64
else
LO_SUFFIX ?= _be32
endif
else
- ifeq ($(TEC_WORDSIZE), TEC_64)
+ ifeq (TEC_64, $(TEC_WORDSIZE))
LO_SUFFIX ?= _le64
else
LO_SUFFIX ?=
--- 01-tecmake.mak 2023-06-25 03:28:32.000000000 +0930
+++ 02-tecmake.mak 2023-06-25 03:28:32.000000000 +0930
@@ -6,7 +6,7 @@
#---------------------------------#
# Tecmake Version
-VERSION = 4.30-01
+VERSION = 4.30-02
#---------------------------------#
@@ -597,7 +597,7 @@
DEPFLAGS += -std=c++11
endif
-ifeq "$(TEC_SYSNAME)" "Haiku"
+ifeq "Haiku" "$(TEC_SYSNAME)"
STDFLAGS += -Wno-multichar
LIBS += be textencoding tracker
endif
@@ -605,11 +605,11 @@
ifneq ($(findstring Linux, $(TEC_UNAME)), )
UNIX_LINUX = Yes
ifdef BUILD_64
- ifeq ($(TEC_SYSARCH), ia64)
+ ifeq (ia64, $(TEC_SYSARCH))
STDFLAGS += -fPIC
X11_LIB := /usr/X11R6/lib
# arm64 config - AIR
- else ifeq ($(TEC_SYSARCH), arm64)
+ else ifeq (arm64, $(TEC_SYSARCH))
STDFLAGS += -fPIC
X11_LIB := /usr/lib/aarch64-linux-gnu/
else
@@ -630,7 +630,7 @@
ifneq ($(findstring CentOS, $(TEC_UNAME)), )
UNIX_LINUX = Yes
ifdef BUILD_64
- ifeq ($(TEC_SYSARCH), ia64)
+ ifeq (ia64, $(TEC_SYSARCH))
STDFLAGS += -fPIC
X11_LIB := /usr/X11R6/lib
else
@@ -712,7 +712,7 @@
OPENGL_INC := /usr/openwin/share/include/X11
GLUT_LIB := /usr/local/glut-3.7/lib/glut
GLUT_INC := /usr/local/glut-3.7/include
- ifeq ($(TEC_SYSARCH), x86)
+ ifeq (x86, $(TEC_SYSARCH))
STDINCS += /usr/X11/include
GTK := /usr
endif
@@ -760,7 +760,7 @@
LFLAGS = -framework OpenGL
OPENGL_LIBS :=
- ifeq ($(TEC_SYSMINOR), 5)
+ ifeq (5, $(TEC_SYSMINOR))
#Darwin9 Only - OpenGL bug fix for Fink, when the message bellow appears
# ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib
#LFLAGS += -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
@@ -776,7 +776,7 @@
BSD = Yes
X11_LIB := /usr/X11R6/lib
X11_INC := /usr/X11R6/include
- ifeq ($(TEC_SYSARCH), x64)
+ ifeq (x64, $(TEC_SYSARCH))
STDFLAGS += -fPIC
endif
endif
@@ -1478,7 +1478,7 @@
STDINCS += $(X11_INC)
endif
-ifneq "$(TEC_SYSNAME)" "Haiku"
+ifneq "Haiku" "$(TEC_SYSNAME)"
LIBS += m
endif
--- 02-tecmake.mak 2023-06-25 03:28:32.000000000 +0930
+++ 03-tecmake.mak 2023-06-25 03:28:32.000000000 +0930
@@ -6,7 +6,7 @@
#---------------------------------#
# Tecmake Version
-VERSION = 4.30-02
+VERSION = 4.30-03
#---------------------------------#
@@ -243,37 +243,19 @@
DLIBPRE := lib
APPEXT :=
+# Define one, or neither, of GTK_DEFAULT and NO_GTK_DEFAULT, based on
+# distribution. NO_GTK_DEFAULT isn't used explicitly elsewhere in this
+# file, but others may use it later.
ifneq ($(findstring Linux24, $(TEC_UNAME)), )
NO_GTK_DEFAULT = Yes
-endif
-ifeq (Linux26, $(TEC_UNAME))
- NO_GTK_DEFAULT = Yes
-endif
-ifeq (Linux26_64, $(TEC_UNAME))
+else ifneq ($(filter Linux26 Linux26_64, $(TEC_UNAME)), )
NO_GTK_DEFAULT = Yes
-endif
-
-ifndef NO_GTK_DEFAULT
- ifneq ($(findstring cygw, $(TEC_UNAME)), )
- GTK_DEFAULT = Yes
- endif
- ifneq ($(findstring CentOS, $(TEC_UNAME)), )
- GTK_DEFAULT = Yes
- endif
- ifneq ($(findstring Linux, $(TEC_UNAME)), )
- GTK_DEFAULT = Yes
- endif
- ifneq ($(findstring MacOS, $(TEC_UNAME)), )
- GTK_DEFAULT = Yes
- endif
- ifneq ($(findstring FreeBSD, $(TEC_UNAME)), )
+else ifneq ($(filter CYGWIN CentOS Linux MacOS FreeBSD, $(TEC_SYSNAME)), )
+ GTK_DEFAULT = Yes
+else ifneq ($(findstring SunOS, $(TEC_UNAME)), )
+ ifeq (x86, $(TEC_SYSARCH))
GTK_DEFAULT = Yes
endif
- ifneq ($(findstring SunOS, $(TEC_UNAME)), )
- ifeq (x86, $(TEC_SYSARCH))
- GTK_DEFAULT = Yes
- endif
- endif
endif
# Refine GTK default request: Newer GNU/Linux systems get GTK3,
--- 03-tecmake.mak 2023-06-25 03:28:32.000000000 +0930
+++ 04-tecmake.mak 2023-06-25 14:19:24.810146647 +0930
@@ -6,7 +6,7 @@
#---------------------------------#
# Tecmake Version
-VERSION = 4.30-03
+VERSION = 4.31
#---------------------------------#
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users