build-aux/move-if-change

Bruno Haible via "Bug reports for Bison, the GNU parser generator" <[email protected]> Sat, 12 Jul 2025 09:24:41 +0200
Newsgroups gmane.comp.parsers.bison.bugs
Organization GNU
Message-ID <2059451.zToM8qfIzz@nimes>
This is a multi-part message in MIME format.

--nextPart3566762.cLl3JjQhRp
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

Hi,

I'm setting up a CI for GNU bison. I'm using the bootstrap command

  $ ./bootstrap --no-git --gnulib-srcdir="$GNULIB_SRCDIR"

but that later leads to a build failure:

  $ make
  ...
    CCLD     src/bison
    GEN      doc/bison.help
  /bin/bash: line 1: ./build-aux/move-if-change: No such file or directory
  make[2]: *** [Makefile:13803: doc/bison.help] Error 127

The reason is that a symlink was committed:

  move-if-change -> ../gnulib/build-aux/move-if-change

that hardcodes the location of the Gnulib repository.

The attached patch fixes it.


--nextPart3566762.cLl3JjQhRp
Content-Disposition: attachment;
 filename="0001-build-Don-t-hardcode-the-location-of-the-gnulib-dire.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="x-UTF_8J";
 name="0001-build-Don-t-hardcode-the-location-of-the-gnulib-dire.patch"

From 5b4997d1d308d02dcf220df1aec6687924fb68b8 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Sat, 12 Jul 2025 08:16:47 +0200
Subject: [PATCH] build: Don't hardcode the location of the gnulib directory.

* build-aux/move-if-change: Remove symlink.
* bootstrap.conf (gnulib_extra_files): Add build-aux/move-if-change.
---
 bootstrap.conf           | 2 ++
 build-aux/move-if-change | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)
 delete mode 120000 build-aux/move-if-change

diff --git a/bootstrap.conf b/bootstrap.conf
index be0d8e4..68e79df 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -82,6 +82,8 @@ XGETTEXT_OPTIONS_RUNTIME=$XGETTEXT_OPTIONS'\\\
 
 gnulib_tool_option_extras='--symlink --conditional-dependencies --makefile-name=gnulib.mk --automake-subdir --automake-subdir-tests --po-base=gnulib-po --po-domain=bison'
 
+gnulib_extra_files="$gnulib_extra_files build-aux/move-if-change"
+
 bootstrap_post_import_hook()
 {
   # Ensure that ChangeLog exists, for automake.
diff --git a/build-aux/move-if-change b/build-aux/move-if-change
deleted file mode 120000
index 2df61a6..0000000
--- a/build-aux/move-if-change
+++ /dev/null
@@ -1 +0,0 @@
-../gnulib/build-aux/move-if-change
\ No newline at end of file
-- 
2.43.0


--nextPart3566762.cLl3JjQhRp--