Fred Kiefer wrote:
> I am not sure, I understand this change. To me it looks mostly like
> avoiding a call to configure.

That's right.

> If it is just that, wouldn’t it be simpler to change your build
> script to include that call with the correct parameters?

Yes, it would be simpler to make a Debian-specific change like in the
patch that was proposed for the Debian bug:

https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1094879;filename=gnustep-gui_0.31.1-8.1.debdiff;msg=5

(The bug report URL is https://bugs.debian.org/1094879.)

I just thought that an upstream change might benefit other distros (I
don't know how cross-building is implemented outside Debian but
they're likely to encounter the same problem as it stems from GNU
make's eagerness to rebuild all targets that it considers out-of-date).

> It would be great, if you could trim down this change to the
> required lines

You mean with the comments stripped off, right?  Revised patch attached.

> and provide it as a PR.

Sorry, I cannot do that because such an action requires me to make a
GitHub account.  I refuse to make one, and have explained why several
times here and on the Savannah tracker.  I'll just refer to this
article now and in the future:

https://www.gnu.org/philosophy/whats-wrong-with-github.html

The patch is produced with "git format-patch" and can be applied with
"git am" and friends.
>From 278abc7935e573a2c8552b7a5ff86db346ef31ec Mon Sep 17 00:00:00 2001
From: Yavor Doganov <[email protected]>
Date: Tue, 13 Oct 2026 21:03:45 +0300
Subject: [PATCH] Fix cross-compilation

---
 GNUmakefile           |  4 ++++
 GNUmakefile.postamble | 12 ++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 97e456771..933a9dfa4 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -45,12 +45,15 @@ include $(GNUSTEP_MAKEFILES)/common.make
 
 include ./Version
 
+_have_makefiles := $(shell test -f config.make -o -f gui.make && echo yes)
+
 # Don't build docs by default
 doc=no
 
 #
 # The list of subproject directories
 #
+ifeq ($(_have_makefiles),yes)
 SUBPROJECTS = \
 Source \
 Images \
@@ -73,6 +76,7 @@ SUBPROJECTS += $(BUILD_SOUNDS)
 ifeq ($(doc), yes)
 SUBPROJECTS += Documentation
 endif
+endif
 
 -include GNUmakefile.preamble
 
diff --git a/GNUmakefile.postamble b/GNUmakefile.postamble
index b39f1fe1b..5f6023384 100644
--- a/GNUmakefile.postamble
+++ b/GNUmakefile.postamble
@@ -1,4 +1,4 @@
-# -*-makefile-*-
+# -*-makefile-gmake-*-
 #  GNUmakefile.postamble
 #
 #  Project specific makefile rules
@@ -31,7 +31,11 @@
 #
 
 # Things to do before compiling
-# before-all::
+before-all:: config.make gui.make
+ifeq ($(_have_makefiles),)
+       ./configure
+       $(MAKE)
+endif
 
 # Things to do after compiling
 # after-all::
@@ -77,6 +81,7 @@ before-install:: $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
 after-distclean::
        rm -f config.status config.log config.cache TAGS config.make gui.make
 
+ifeq ($(_have_makefiles),yes)
 gui.make: gui.make.in Version configure
        if [ -x config.status ]; then \
          ./config.status --recheck && ./config.status; \
@@ -90,6 +95,9 @@ config.make: config.make.in configure
        else \
          ./configure; \
        fi
+else
+config.make gui.make: ;
+endif
 
 # Things to do before checking
 # before-check::
-- 
2.55.0

Reply via email to