From 69ab8e969326eac84f1c41775b63ce08e5ebf2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Fri, 2 Apr 2021 13:21:07 +0200 Subject: [PATCH] build: Use a separate rule for downloads. --- Makefile | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 25847415..44ff1a2e 100644 --- a/Makefile +++ b/Makefile @@ -119,21 +119,24 @@ configure: vagrant if [ ! -e $(BUILD_DIR)/Makefile ]; \ then mkdir -p $(BUILD_DIR); \ (cd $(BUILD_DIR) && $(CONFIGURE_CMD)); \ - fi && \ - make -C $(BUILD_DIR) downloads + fi ifeq ($(protonsdk_version),local) configure: protonsdk endif +downloads: private SHELL := $(VAGRANT_SHELL) +downloads: configure + make -C $(BUILD_DIR) downloads + proton: private SHELL := $(VAGRANT_SHELL) -proton: configure +proton: downloads make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) dist && \ echo "Proton built in VM. Use 'install' or 'deploy' targets to retrieve the build." install-internal: | vagrant_share/compatibilitytools.d/$(_build_name) install-internal: private SHELL := $(VAGRANT_SHELL) -install-internal: configure +install-internal: downloads make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) STEAM_DIR=/vagrant/ install install: install-internal @@ -144,14 +147,14 @@ install: install-internal redist: | vagrant_share/$(DEPLOY_DIR) redist: private SHELL := $(VAGRANT_SHELL) -redist: configure +redist: downloads rm -rf /vagrant/$(DEPLOY_DIR)/* && \ make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) redist && cp -Rf $(BUILD_DIR)/redist/* /vagrant/$(DEPLOY_DIR) && \ echo "Proton build available at vagrant_share/$(DEPLOY_DIR)" deploy: | vagrant_share/$(DEPLOY_DIR)-deploy deploy: private SHELL := $(VAGRANT_SHELL) -deploy: configure +deploy: downloads rm -rf /vagrant/$(DEPLOY_DIR)-deploy/* && \ make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) deploy && cp -Rf $(BUILD_DIR)/deploy/* /vagrant/$(DEPLOY_DIR)-deploy && \ echo "Proton deployed to vagrant_share/$(DEPLOY_DIR)-deploy" @@ -159,7 +162,7 @@ deploy: configure module: | vagrant_share/$(module)/lib/wine/ module: | vagrant_share/$(module)/lib64/wine/ module: private SHELL := $(VAGRANT_SHELL) -module: configure +module: downloads make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) module=$(module) module && \ cp -f $(BUILD_DIR)/obj-wine32/dlls/$(module)/$(module)$(MODULE_SFX)* /vagrant/$(module)/lib/wine/ && \ cp -f $(BUILD_DIR)/obj-wine64/dlls/$(module)/$(module)$(MODULE_SFX)* /vagrant/$(module)/lib64/wine/ && \ @@ -170,7 +173,7 @@ module: configure dxvk: | vagrant_share/dxvk/lib/wine/dxvk dxvk: | vagrant_share/dxvk/lib64/wine/dxvk dxvk: private SHELL := $(VAGRANT_SHELL) -dxvk: configure +dxvk: downloads make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) dxvk && \ cp -f $(BUILD_DIR)/dist/files/lib/wine/dxvk/*.dll /vagrant/dxvk/lib/wine/dxvk/ && \ cp -f $(BUILD_DIR)/dist/files/lib64/wine/dxvk/*.dll /vagrant/dxvk/lib64/wine/dxvk/ @@ -178,7 +181,7 @@ dxvk: configure vkd3d-proton: | vagrant_share/vkd3d-proton/lib/wine/vkd3d-proton vkd3d-proton: | vagrant_share/vkd3d-proton/lib64/wine/vkd3d-proton vkd3d-proton: private SHELL := $(VAGRANT_SHELL) -vkd3d-proton: configure +vkd3d-proton: downloads make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) vkd3d-proton && \ cp -f $(BUILD_DIR)/dist/files/lib/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib/wine/vkd3d-proton/ && \ cp -f $(BUILD_DIR)/dist/files/lib64/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib64/wine/vkd3d-proton/ @@ -186,7 +189,7 @@ vkd3d-proton: configure lsteamclient: | vagrant_share/lsteamclient/lib/wine lsteamclient: | vagrant_share/lsteamclient/lib64/wine lsteamclient: private SHELL := $(VAGRANT_SHELL) -lsteamclient: configure +lsteamclient: downloads make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) lsteamclient && \ cp -f $(BUILD_DIR)/dist/files/lib/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib/wine && \ cp -f $(BUILD_DIR)/dist/files/lib64/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib64/wine @@ -194,7 +197,7 @@ lsteamclient: configure vrclient: | vagrant_share/vrclient/lib/wine vrclient: | vagrant_share/vrclient/lib64/wine vrclient: private SHELL := $(VAGRANT_SHELL) -vrclient: configure +vrclient: downloads make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) vrclient && \ cp -f $(BUILD_DIR)/dist/files/lib/wine/vrclient.dll.so /vagrant/vrclient/lib/wine && \ cp -f $(BUILD_DIR)/dist/files/lib64/wine/vrclient_x64.dll.so /vagrant/vrclient/lib64/wine @@ -202,7 +205,7 @@ vrclient: configure wineopenxr: | vagrant_share/wineopenxr/lib/wine wineopenxr: | vagrant_share/wineopenxr/lib64/wine wineopenxr: private SHELL := $(VAGRANT_SHELL) -wineopenxr: configure +wineopenxr: downloads make -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) wineopenxr && \ cp -f $(BUILD_DIR)/dist/files/lib64/wine/wineopenxr.dll.so /vagrant/wineopenxr/lib64/wine