From fee3b3395c8f8cfef589a73d5754664385f2a1a8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 15 Oct 2022 02:31:06 +0300 Subject: [PATCH 46/46] Msys2: Define Makefile to use in recursive 'make' Makefile: Pass '-f $(MAKEFILE_NAME)' for recursive name Makefile.meson: Use '$(MAKEFILE_NAME)' instead of 'Makefile.meson' See osdn #45828 Signed-off-by: Marko Lindqvist --- windows/installer_msys2/Makefile | 34 ++++++++++++++------------ windows/installer_msys2/Makefile.meson | 18 ++++++++------ 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/windows/installer_msys2/Makefile b/windows/installer_msys2/Makefile index 99a118853b..9fd9ab6cd8 100644 --- a/windows/installer_msys2/Makefile +++ b/windows/installer_msys2/Makefile @@ -8,6 +8,8 @@ # Variable setup # +MAKEFILE_NAME=Makefile + ifeq ($(MSYSTEM),MINGW64) WINARCH=win64 ARCHDIR=mingw64 @@ -68,41 +70,41 @@ all-win32: gtk3.22-installer sdl2-installer ruledit-installer-qt5 qt5-installer all-win64-10: gtk3.22-installer sdl2-installer ruledit-installer qt6-installer gtk4-installer gtk3.22-installer: - make GUI=gtk3.22 CLIENT=gtk3.22 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk3.22 + make -f $(MAKEFILE_NAME) GUI=gtk3.22 CLIENT=gtk3.22 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk3.22 gtk4-installer: - make GUI=gtk4 CLIENT=gtk4 FCMP=gtk4 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk4 + make -f $(MAKEFILE_NAME) GUI=gtk4 CLIENT=gtk4 FCMP=gtk4 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk4 sdl2-installer: - make GUI=sdl2 CLIENT=sdl2 FCMP=gtk4 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-sdl2 + make -f $(MAKEFILE_NAME) GUI=sdl2 CLIENT=sdl2 FCMP=gtk4 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-sdl2 qt-installer: qt5-installer qt5-installer: - make GUI=qt5 CLIENT=qt FCMP=qt EXTRA_CONFIG="--with-qtver=qt5 --with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" wrap-qt5 + make -f $(MAKEFILE_NAME) GUI=qt5 CLIENT=qt FCMP=qt EXTRA_CONFIG="--with-qtver=qt5 --with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" wrap-qt5 qt6-installer: - make GUI=qt6 CLIENT=qt FCMP=qt EXTRA_CONFIG="--with-qtver=qt6 --with-qt6-includes=/$(ARCHDIR)/include/qt6 --with-qt6-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" MOCCMD="$(QT6_MOCCMD)" wrap-qt6 + make -f $(MAKEFILE_NAME) GUI=qt6 CLIENT=qt FCMP=qt EXTRA_CONFIG="--with-qtver=qt6 --with-qt6-includes=/$(ARCHDIR)/include/qt6 --with-qt6-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" MOCCMD="$(QT6_MOCCMD)" wrap-qt6 ruledit-installer: ruledit-installer-qt6 ruledit-installer-qt5: # EXTRA_CONFIG="$(EXTRA_CONFIG)" *does* make a difference - it unwraps one layer # of escapes, needed for snapshot builds. - make EXTRA_CONFIG="$(EXTRA_CONFIG)" wrap-ruledit-qt5 + make -f $(MAKEFILE_NAME) EXTRA_CONFIG="$(EXTRA_CONFIG)" wrap-ruledit-qt5 ruledit-installer-qt6: # EXTRA_CONFIG="$(EXTRA_CONFIG)" *does* make a difference - it unwraps one layer # of escapes, needed for snapshot builds. - make EXTRA_CONFIG="$(EXTRA_CONFIG)" MOCCMD="$(QT6_MOCCMD)" wrap-ruledit-qt6 + make -f $(MAKEFILE_NAME) EXTRA_CONFIG="$(EXTRA_CONFIG)" MOCCMD="$(QT6_MOCCMD)" wrap-ruledit-qt6 snapshot: cd ../.. ; ./autogen.sh --no-configure-run - make VERSION_REVTYPE="git" EXTRA_CONFIG="--enable-gitrev --with-project-definition=../../../bootstrap/snapshot.project CFLAGS=\\\"-Werror $$CFLAGS\\\" CXXFLAGS=\\\"$$CXXFLAGS\\\"" all + make -f $(MAKEFILE_NAME) VERSION_REVTYPE="git" EXTRA_CONFIG="--enable-gitrev --with-project-definition=../../../bootstrap/snapshot.project CFLAGS=\\\"-Werror $$CFLAGS\\\" CXXFLAGS=\\\"$$CXXFLAGS\\\"" all ci: cd ../.. ; ./autogen.sh --no-configure-run - make VERSION_REVTYPE="git" CI=yes EXTRA_CONFIG="--enable-gitrev --with-project-definition=../../../bootstrap/snapshot.project CFLAGS=\\\"-Werror $$CFLAGS\\\" CXXFLAGS=\\\"$$CXXFLAGS\\\"" ruledit-installer-qt6 qt6-installer + make -f $(MAKEFILE_NAME) VERSION_REVTYPE="git" CI=yes EXTRA_CONFIG="--enable-gitrev --with-project-definition=../../../bootstrap/snapshot.project CFLAGS=\\\"-Werror $$CFLAGS\\\" CXXFLAGS=\\\"$$CXXFLAGS\\\"" ruledit-installer-qt6 qt6-installer # configure Freeciv @@ -634,10 +636,10 @@ clean-installer-ruledit-qt6: rm -f Freeciv-*-ruledit-qt6.nsi clean: - make GUI=gtk3.22 CLIENT=gtk3.22 clean-build-common clean-install-common clean-installer-common - make GUI=gtk4 CLIENT=gtk4 clean-build-common clean-install-common clean-installer-common - make GUI=sdl2 CLIENT=sdl2 clean-build-common clean-install-common clean-installer-common - make GUI=qt5 CLIENT=qt clean-build-common clean-install-common clean-installer-common - make GUI=qt6 CLIENT=qt clean-build-common clean-install-common clean-installer-common - make clean-build-ruledit-qt5 clean-install-ruledit-qt5 clean-installer-ruledit-qt5 - make clean-build-ruledit-qt6 clean-install-ruledit-qt6 clean-installer-ruledit-qt6 + make -f $(MAKEFILE_NAME) GUI=gtk3.22 CLIENT=gtk3.22 clean-build-common clean-install-common clean-installer-common + make -f $(MAKEFILE_NAME) GUI=gtk4 CLIENT=gtk4 clean-build-common clean-install-common clean-installer-common + make -f $(MAKEFILE_NAME) GUI=sdl2 CLIENT=sdl2 clean-build-common clean-install-common clean-installer-common + make -f $(MAKEFILE_NAME) GUI=qt5 CLIENT=qt clean-build-common clean-install-common clean-installer-common + make -f $(MAKEFILE_NAME) GUI=qt6 CLIENT=qt clean-build-common clean-install-common clean-installer-common + make -f $(MAKEFILE_NAME) clean-build-ruledit-qt5 clean-install-ruledit-qt5 clean-installer-ruledit-qt5 + make -f $(MAKEFILE_NAME) clean-build-ruledit-qt6 clean-install-ruledit-qt6 clean-installer-ruledit-qt6 diff --git a/windows/installer_msys2/Makefile.meson b/windows/installer_msys2/Makefile.meson index 3475d35217..38f6f3fe08 100644 --- a/windows/installer_msys2/Makefile.meson +++ b/windows/installer_msys2/Makefile.meson @@ -9,6 +9,8 @@ # Variable setup # +MAKEFILE_NAME=Makefile.meson + ifeq ($(MSYSTEM),MINGW64) WINARCH=win64 ARCHDIR=mingw64 @@ -46,19 +48,19 @@ endif all: gtk3.22-installer sdl2-installer gtk4-installer snapshot: - make -f Makefile.meson VERSION_REVTYPE="git" EXTRA_CONFIG="-Dgitrev=true $(EXTRA_CONFIG)" all + make -f $(MAKEFILE_NAME) VERSION_REVTYPE="git" EXTRA_CONFIG="-Dgitrev=true $(EXTRA_CONFIG)" all ci: - make -f Makefile.meson VERSION_REVTYPE="git" CI=yes EXTRA_CONFIG="-Dgitrev=true -Dsys-tolua-cmd=true $(EXTRA_CONFIG)" gtk3.22-installer sdl2-installer gtk4-installer + make -f $(MAKEFILE_NAME) VERSION_REVTYPE="git" CI=yes EXTRA_CONFIG="-Dgitrev=true -Dsys-tolua-cmd=true $(EXTRA_CONFIG)" gtk3.22-installer sdl2-installer gtk4-installer gtk3.22-installer: - make -f Makefile.meson GUI=gtk3.22 CLIENT=gtk3.22 FCMP=gtk3 installer-common + make -f $(MAKEFILE_NAME) GUI=gtk3.22 CLIENT=gtk3.22 FCMP=gtk3 installer-common gtk4-installer: - make -f Makefile.meson GUI=gtk4 CLIENT=gtk4 FCMP=gtk4 installer-common + make -f $(MAKEFILE_NAME) GUI=gtk4 CLIENT=gtk4 FCMP=gtk4 installer-common sdl2-installer: - make -f Makefile.meson GUI=sdl2 CLIENT=sdl2 FCMP=gtk4 installer-common + make -f $(MAKEFILE_NAME) GUI=sdl2 CLIENT=sdl2 FCMP=gtk4 installer-common installer-common: clean-install-common install-freeciv-$(GUI) install-env-$(GUI) # extract Freeciv version @@ -243,6 +245,6 @@ clean-installer-common: rm -f Freeciv-meson-*-$(GUI).nsi clean: - make -f Makefile.meson GUI=gtk3.22 clean-build-common clean-install-common clean-installer-common - make -f Makefile.meson GUI=gtk4 clean-build-common clean-install-common clean-installer-common - make -f Makefile.meson GUI=sdl2 clean-build-common clean-install-common clean-installer-common + make -f $(MAKEFILE_NAME) GUI=gtk3.22 clean-build-common clean-install-common clean-installer-common + make -f $(MAKEFILE_NAME) GUI=gtk4 clean-build-common clean-install-common clean-installer-common + make -f $(MAKEFILE_NAME) GUI=sdl2 clean-build-common clean-install-common clean-installer-common -- 2.35.1