From 2b821a1b86f44d2455263c5c06a5a7affc6e54f8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 11 May 2023 08:30:17 +0300 Subject: [PATCH 32/32] installer_cross: Put build directories under autotools/ Do not generate autotools based build build directories to installer_cross root level, but to the autotools/ subdirectory hierarchy. See osdn #48010 Signed-off-by: Marko Lindqvist --- windows/installer_cross/installer_build.sh | 14 ++++++++------ windows/installer_cross/meson-winbuild.sh | 4 ++-- windows/installer_cross/winbuild.sh | 18 ++++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/windows/installer_cross/installer_build.sh b/windows/installer_cross/installer_build.sh index 365fc29d60..09b801f5dc 100755 --- a/windows/installer_cross/installer_build.sh +++ b/windows/installer_cross/installer_build.sh @@ -128,6 +128,7 @@ fi DLLSPATH="$1" GUI="$2" +NAMEP="-client-${GUI}" case $GUI in gtk3.22) @@ -151,7 +152,8 @@ case $GUI in GUINAME="GTK4" MPGUI="gtk4" FCMP="gtk4" ;; - ruledit) ;; + ruledit) + NAMEP="-ruledit" ;; *) echo "Unknown gui type \"$GUI\"" >&2 exit 1 ;; @@ -181,11 +183,11 @@ if test "$INST_CROSS_MODE" != "release" ; then fi fi -INSTDIR="freeciv-$SETUP-${VERREV}-${GUI}" +INSTDIR="freeciv-$SETUP-${VERREV}${NAMEP}" if test "$GUI" = "ruledit" ; then - if ! make -C build-${SETUP}-${GUI}/translations/ruledit update-po || - ! make -C build-${SETUP}-${GUI}/bootstrap langstat_ruledit.txt + if ! make -C autotools/build/${SETUP}-${GUI}/translations/ruledit update-po || + ! make -C autotools/build/${SETUP}-${GUI}/bootstrap langstat_ruledit.txt then echo "Langstat creation failed!" >&2 exit 1 @@ -194,8 +196,8 @@ if test "$GUI" = "ruledit" ; then git checkout ../../translations/ruledit fi else - if ! make -C build-${SETUP}-${GUI}/translations/core update-po || - ! make -C build-${SETUP}-${GUI}/bootstrap langstat_core.txt + if ! make -C autotools/build/${SETUP}-client-${GUI}/translations/core update-po || + ! make -C autotools/build/${SETUP}-client-${GUI}/bootstrap langstat_core.txt then echo "Langstat creation failed!" >&2 exit 1 diff --git a/windows/installer_cross/meson-winbuild.sh b/windows/installer_cross/meson-winbuild.sh index c2e1f48f2b..b603642c30 100755 --- a/windows/installer_cross/meson-winbuild.sh +++ b/windows/installer_cross/meson-winbuild.sh @@ -47,8 +47,8 @@ SRC_ROOT="$(cd ../.. || exit 1 ; pwd)" VERREV="$(${SRC_ROOT}/fc_version)" if test "$INST_CROSS_MODE" != "release" ; then - if test -d ../../.git || test -f ../../.git ; then - VERREV="$VERREV-$(cd ../.. && git rev-parse --short HEAD)" + if test -d ${SRC_ROOT}/.git || test -f ${SRC_ROOT}/.git ; then + VERREV="$VERREV-$(cd ${SRC_ROOT} && git rev-parse --short HEAD)" fi fi diff --git a/windows/installer_cross/winbuild.sh b/windows/installer_cross/winbuild.sh index 1c108f696c..973d8b354a 100755 --- a/windows/installer_cross/winbuild.sh +++ b/windows/installer_cross/winbuild.sh @@ -35,10 +35,12 @@ if ! test -f "$DLLSPATH/crosser.txt" ; then exit 1 fi -VERREV="$(../../fc_version)" +SRC_ROOT="$(cd ../.. || exit 1 ; pwd)" + +VERREV="$(${SRC_ROOT}/fc_version)" if test "$INST_CROSS_MODE" != "release" ; then - if test -d ../../.git || test -f ../../.git ; then - VERREV="$VERREV-$(cd ../.. && git rev-parse --short HEAD)" + if test -d ${SRC_ROOT}/.git || test -f ${SRC_ROOT}/.git ; then + VERREV="$VERREV-$(cd ${SRC_ROOT} && git rev-parse --short HEAD)" fi fi @@ -72,7 +74,7 @@ if test "$2" = "ruledit" ; then AIS="--enable-ai-static=stub" elif test "$2" != "" ; then SINGLE_GUI=true - GUIP="-$2" + GUIP="-client-$2" SERVER="yes" if test "$2" = "qt5" || test "$2" = "qt6" ; then RULEDIT="yes" @@ -107,7 +109,7 @@ if test "$MAKE_PARAMS" = "" ; then MAKE_PARAMS="-j$(nproc)" fi -BUILD_DIR="build-${SETUP}${NAMEP}" +BUILD_DIR="autotools/build/${SETUP}${NAMEP}" if ! rm -Rf "${BUILD_DIR}" ; then echo "Failed to clear out old build directory!" >&2 @@ -179,7 +181,7 @@ echo "----------------------------------" export CC="$TARGET-gcc -static-libgcc -static-libstdc++" export CXX="$TARGET-g++ -static-libgcc -static-libstdc++" -if ! ../../autogen.sh --no-configure-run ; then +if ! ${SRC_ROOT}/autogen.sh --no-configure-run ; then echo "Autogen failed" >&2 exit 1 fi @@ -199,7 +201,7 @@ if test "$MOCCMD" = "" && test "$MOC_CROSSER" != "" ; then MOCPARAM="MOCCMD=${MOC_CROSSER}" fi -if ! ../../../configure \ +if ! ${SRC_ROOT}/configure \ ac_cv_working_gettimeofday=yes \ $MOCPARAM \ FREECIV_LABEL_FORCE="-crs" \ @@ -215,7 +217,7 @@ if ! ../../../configure \ --enable-fcmp=$FCMP \ --enable-debug \ --host=$TARGET \ - --build=$(../../../bootstrap/config.guess) \ + --build=$(${SRC_ROOT}/bootstrap/config.guess) \ --with-libiconv-prefix=${DLLSPATH} \ --with-sqlite3-prefix=${DLLSPATH} \ --with-followtag="crosser" \ -- 2.39.2