From f85e7586df0983d2be2110b5d52457c2fd4f9ff8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 27 Sep 2023 11:12:51 +0300 Subject: [PATCH 37/37] Meson: Control ruleup build with 'tools' option See osdn #48736 Signed-off-by: Marko Lindqvist --- doc/INSTALL.meson | 3 ++- meson.build | 4 ++++ meson_options.txt | 4 ++-- platforms/macos/homebrew-appbundle.sh | 2 +- scripts/ci-build.sh | 2 +- windows/installer_cross/meson-winbuild.sh | 2 +- windows/installer_msys2/Makefile.meson | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/INSTALL.meson b/doc/INSTALL.meson index f0eae957a9..c46cc6e27b 100644 --- a/doc/INSTALL.meson +++ b/doc/INSTALL.meson @@ -153,7 +153,8 @@ audio (boolean): tools (array): Extra tools to build: * ruledit : Ruleset editor - * manual: Manual generator + * manual : Manual generator + * ruleup : Ruleset upgrader Default is to build them all. nls (boolean): diff --git a/meson.build b/meson.build index acad1a2f51..445504de36 100644 --- a/meson.build +++ b/meson.build @@ -3999,6 +3999,8 @@ tool_lib = static_library('fc_toolutil', include_directories: server_inc, ) +if get_option('tools').contains('ruleup') + executable('freeciv-ruleup', 'tools/ruleup.c', link_with: [common_lib, server_lib, tool_lib, ais], @@ -4007,6 +4009,8 @@ executable('freeciv-ruleup', install: true ) +endif + if get_option('tools').contains('ruledit') if not qt_dep.found() diff --git a/meson_options.txt b/meson_options.txt index f2c08721ca..95f530e303 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -52,8 +52,8 @@ option('audio', option('tools', type: 'array', - choices: ['ruledit', 'manual'], - value: ['ruledit', 'manual'], + choices: ['ruledit', 'manual', 'ruleup'], + value: ['ruledit', 'manual', 'ruleup'], description: 'Extra tools to build') option('nls', diff --git a/platforms/macos/homebrew-appbundle.sh b/platforms/macos/homebrew-appbundle.sh index 9531ddc3b3..9e54bd996d 100755 --- a/platforms/macos/homebrew-appbundle.sh +++ b/platforms/macos/homebrew-appbundle.sh @@ -102,7 +102,7 @@ fi cd build || exit 1 if ! meson setup .. \ - -Dtools=manual \ + -Dtools=manual,ruleup \ -Dsyslua=true \ -Ddebug=false \ -Dclients=gtk4,qt \ diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh index 569f43b384..fde9141a61 100755 --- a/scripts/ci-build.sh +++ b/scripts/ci-build.sh @@ -104,7 +104,7 @@ mkdir build cd build meson setup .. \ -Ddebug=true \ - -Dtools=ruledit,manual \ + -Dtools=ruledit,manual,ruleup \ -Dsyslua=true \ -Dclients=gtk3.22,sdl2,gtk4,qt,stub \ -Dfcmp=gtk3,gtk4,qt,cli \ diff --git a/windows/installer_cross/meson-winbuild.sh b/windows/installer_cross/meson-winbuild.sh index 414b225d6f..319f00c9b8 100755 --- a/windows/installer_cross/meson-winbuild.sh +++ b/windows/installer_cross/meson-winbuild.sh @@ -75,7 +75,7 @@ fi QTPARAMS="" -TOOLS=manual +TOOLS=manual,ruleup case "${GUI}" in gtk3.22) FCMP="gtk3" ;; gtk4) FCMP="gtk4" ;; diff --git a/windows/installer_msys2/Makefile.meson b/windows/installer_msys2/Makefile.meson index c965920683..896f524396 100644 --- a/windows/installer_msys2/Makefile.meson +++ b/windows/installer_msys2/Makefile.meson @@ -156,7 +156,7 @@ installer-common: install-freeciv-$(GUI) install-env-$(GUI) install-freeciv-common: clean-install-client-arch # Create build directory mkdir -p $(BUILD_DIR)/$(WINARCH)-client-$(GUI) - cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); meson setup $(IMSYS2_DIR)/../.. -Dprefix=$(IMSYS2_DIR)/$(INST_DIR)/$(WINARCH)-client-$(GUI) -Dfollowtag='windows-S3_2' -Dclients=$(CLIENT) -Dfcmp=$(FCMP) -Dtools=manual -Dreadline=false -Dcacert-path='./ssl/certs/ca-bundle.crt' -Dmin-win-ver=$(MIN_WIN_VER) -Dsyslua=false $(EXTRA_CONFIG) + cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); meson setup $(IMSYS2_DIR)/../.. -Dprefix=$(IMSYS2_DIR)/$(INST_DIR)/$(WINARCH)-client-$(GUI) -Dfollowtag='windows-S3_2' -Dclients=$(CLIENT) -Dfcmp=$(FCMP) -Dtools=manual,ruleup -Dreadline=false -Dcacert-path='./ssl/certs/ca-bundle.crt' -Dmin-win-ver=$(MIN_WIN_VER) -Dsyslua=false $(EXTRA_CONFIG) cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); ninja cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); ninja install cd $(BUILD_DIR)/$(WINARCH)-client-$(GUI); ninja langstat_core.txt -- 2.40.1