From 18e78c2be7f7a650aadc644472e4a774b99278c9 Mon Sep 17 00:00:00 2001
From: Ulrich Sibiller <uli42@gmx.de>
Date: Sat, 11 May 2024 17:18:29 +0200
Subject: multiple imake config fixes

see ArcticaProject/nx-libs/issues/1058 for details and the original patch.

Found and fixed by realsimix

Adresses ArcticaProject/nx-libs#1058 (part 1)
---
 nx-X11/config/cf/Imake.rules  | 6 +++---
 nx-X11/config/cf/X11.tmpl     | 2 +-
 nx-X11/config/cf/lnxLib.rules | 6 ++++--
 3 files changed, 8 insertions(+), 6 deletions(-)

(limited to 'nx-X11')

diff --git a/nx-X11/config/cf/Imake.rules b/nx-X11/config/cf/Imake.rules
index f8ac988d9..005869280 100644
--- a/nx-X11/config/cf/Imake.rules
+++ b/nx-X11/config/cf/Imake.rules
@@ -547,7 +547,7 @@ clean cleantc::								@@\
 		:; \							@@\
 	else \								@@\
 		if [ -h dir ]; then \					@@\
-			(test -n "${VERBOSE}" && test -n "${VERBOSE}" && set -x; rm -f dir); \				@@\
+			(test -n "${VERBOSE}" && set -x; rm -f dir); \				@@\
 		fi; \							@@\
 		(test -n "${VERBOSE}" && set -x; $(MKDIRHIER) dir); \				@@\
 	fi
@@ -1976,7 +1976,7 @@ DependDependencyStatement()						@@\
 NoCmpScript(ProgramTargetName($(DEPEND)))				@@\
 									@@\
 ProgramTargetName($(DEPEND)):						@@\
-	@echo "using system-wide depend, continuing in $(CURRENT_DIR)"
+	@test -z "${VERBOSE}" || echo "using system-wide depend, continuing in $(CURRENT_DIR)"
 
 #endif /* UseInstalled */
 #endif /* DependDependency */
@@ -2069,7 +2069,7 @@ target:: ProgramTargetName($(IMAKE))					@@\
 NoCmpScript(ProgramTargetName($(IMAKE)) $(IMAKE).Osuf)			@@\
 									@@\
 ProgramTargetName($(IMAKE)) $(IMAKE).Osuf:				@@\
-	@echo "using system-wide imake, continuing in $(CURRENT_DIR)"
+	@test -z "${VERBOSE}" || echo "using system-wide imake, continuing in $(CURRENT_DIR)"
 #endif /* UseInstalled */
 #endif /* ImakeDependency */
 
diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl
index 4bd18aa4e..22dc19006 100644
--- a/nx-X11/config/cf/X11.tmpl
+++ b/nx-X11/config/cf/X11.tmpl
@@ -1500,7 +1500,7 @@ install:: deps								@@\
 	  $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.html \	@@\
 		$(DESTDIR)$(DOCHTMLDIR)); \				@@\
 	  for i in name*.png; do \					@@\
-	    if [ -f $$i ]; then (test -n "${VERBOSE}" && test -n "${VERBOSE}" && set -x; \				@@\
+	    if [ -f $$i ]; then (test -n "${VERBOSE}" && set -x; \	@@\
 	      $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) $$i \		@@\
 		$(DESTDIR)$(DOCHTMLDIR)); \				@@\
 	    fi; \							@@\
diff --git a/nx-X11/config/cf/lnxLib.rules b/nx-X11/config/cf/lnxLib.rules
index fc60671ec..928a4cd5a 100644
--- a/nx-X11/config/cf/lnxLib.rules
+++ b/nx-X11/config/cf/lnxLib.rules
@@ -136,7 +136,8 @@ install:: Concat(lib,libname.so.rev) 					@@\
 install:: Concat(lib,libname.so) 					@@\
 	MakeDir($(DESTDIR)dest)						@@\
 	@set +e; SetRevisions(rev); \					@@\
-		test -n "${VERBOSE}" && set -xe; \						@@\
+		set -e; \                                               @@\
+		test -n "${VERBOSE}" && set -x; \			@@\
 		$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.$$MAJ.$$MIN) $(DESTDIR)dest; \ @@\
 		$(RM) Concat($(DESTDIR)dest/lib,libname.so.$$MAJ); \	@@\
 		$(LN) Concat(lib,libname.so.$$MAJ.$$MIN) Concat($(DESTDIR)dest/lib,libname.so.$$MAJ); \ @@\
@@ -207,7 +208,8 @@ Concat(lib,libname.so):  solist $(EXTRALIBRARYDEPS)			@@\
 									@@\
 clean::									@@\
 	@set +e; SetRevisions(rev); \					@@\
-		test -n "${VERBOSE}" && set -xe; \						@@\
+		set -e; \						@@\
+		test -n "${VERBOSE}" && set -xe; \			@@\
 		$(RM) Concat(lib,libname.so.$$MAJ); \			@@\
 		$(RM) Concat(lib,libname.so.$$MAJ.$$MIN)		@@\
 	$(RM) Concat(lib,libname.so)
-- 
cgit v1.2.3