[m-rev.] diff: avoid a warning from make on Windows

Julien Fischer jfischer at opturion.com
Fri Apr 7 19:13:19 AEST 2023


Avoid a warning from make on Windows.

scripts/Mmake.vars.in:
     The cygpath utility prints a warning if it is invoked with an empty
     argument.

Julien.

diff --git a/scripts/Mmake.vars.in b/scripts/Mmake.vars.in
index ca73c70..74694f7 100644
--- a/scripts/Mmake.vars.in
+++ b/scripts/Mmake.vars.in
@@ -50,7 +50,13 @@ endif
  # occurrence of $(patsubst ...), since GNU Make does not respect quotes.
  UNIX_MERCURY_EXTRA_INT_DIRS = $(foreach dir, $(MERCURY_EXTRA_INT_DIRS),\
  				$(shell @CYGPATHU@ "$(dir)"))
-UNIX_MERC_INT_DIR = $(shell @CYGPATHU@ "$(MERC_INT_DIR)")
+
+ifdef MERC_INT_DIR
+    UNIX_MERC_INT_DIR = $(shell @CYGPATHU@ "$(MERC_INT_DIR)")
+else
+    UNIX_MERC_INT_DIR =
+endif
+
  UNIX_MERCURY_EXTRA_INIT_DIRS = $(foreach dir, $(MERCURY_EXTRA_INIT_DIRS),\
  				$(shell @CYGPATHU@ "$(dir)"))



More information about the reviews mailing list