From 4857df11a64f45581855dee96fc75be9189c5b5f Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Fri, 6 Sep 2024 20:15:27 +0200 Subject: [PATCH] releases: fix autogen.sh not found. Without that fix, 'make release' results in the following issue: resources/scripts/misc/generate-configure-makefiles.sh: line 46: ./autogen.sh: No such file or directory make: *** [Makefile:711: release] Error 127 Signed-off-by: Denis 'GNUtoo' Carikli Acked-by: Adrien 'neox' Bourmault --- .../misc/generate-configure-makefiles.sh | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/resources/scripts/misc/generate-configure-makefiles.sh b/resources/scripts/misc/generate-configure-makefiles.sh index 2d21234..4161151 100755 --- a/resources/scripts/misc/generate-configure-makefiles.sh +++ b/resources/scripts/misc/generate-configure-makefiles.sh @@ -15,6 +15,31 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +topdir="$(dirname "$(dirname "$(dirname "$(dirname "$0")")")")" + +# The resources/packages/src/release script is used to released the +# GNU Boot source code in a directory like gnuboot-0.1-rc3-100-g01abcef_src +# inside the release/ directory. +# +# To do that it copies the built source code of various projects like +# coreboot, grub, etc inside release/gnuboot-0.1-rc3-100-g01abcef_src. +# +# To remove the binaries and keep only the source, it then copies the +# topdir build script inside that directory as well and then run +# './build clean all'. +# +# Since we're in release/gnuboot-0.1-rc3-100-g01abcef_src and that the +# full GNU Boot source code wasn't copied, it doesn't find autogen.sh +# when it runs that as the ./build script requires it through the +# sourcing of resources/scripts/misc/generate-configure-makefiles.sh. +# +# We could fix that by copying the right files on the target directory +# but since we're already removing files, it's better to just skip the +# regeneration of GNU Boot Makefiles completely. +if [ ! -f "${topdir}"/configure.ac ] ; then + exit 0 +fi + if [ ! -f configure ] || \ [ ! -f Makefile ] || \ [ ! -f resources/packages/i945-thinkpads-install-utilities/Makefile ] ; then