From 6b1bed7a8de248dc93058efe1ea8d6e773633d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 28 Mar 2024 12:48:33 +0100 Subject: [PATCH] build: Add rules to generate wine requests. --- Makefile.in | 6 +++++- make/rules-wine-requests.mk | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 make/rules-wine-requests.mk diff --git a/Makefile.in b/Makefile.in index 9a2d24f9..76da8ff9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -96,6 +96,7 @@ include $(SRC)/make/rules-cmake.mk include $(SRC)/make/rules-autoconf.mk include $(SRC)/make/rules-configure.mk include $(SRC)/make/rules-winemaker.mk +include $(SRC)/make/rules-wine-requests.mk include $(SRC)/make/rules-cargo.mk @@ -404,6 +405,9 @@ WINE_SOURCE_ARGS = \ --exclude dlls/winevulkan/winevulkan.spec \ --exclude dlls/ntdll/ntsyscalls.h \ --exclude dlls/win32u/win32syscalls.h \ + --exclude include/wine/server_protocol.h \ + --exclude server/request.h \ + --exclude server/trace.c \ WINE_CONFIGURE_ARGS = \ --enable-werror \ @@ -423,9 +427,9 @@ WINE_DEPENDS = gst_orc gstreamer gst_base vkd3d $(eval $(call rules-source,wine,$(SRCDIR)/wine)) $(eval $(call rules-autoconf,wine,32)) $(eval $(call rules-autoconf,wine,64)) +$(eval $(call rules-wine-requests,wine)) $(OBJ)/.wine-post-source: - cd $(WINE_SRC) && tools/make_requests cd $(WINE_SRC) && dlls/winevulkan/make_vulkan -x vk.xml -cd $(WINE_SRC) && tools/make_specfiles touch $@ diff --git a/make/rules-wine-requests.mk b/make/rules-wine-requests.mk new file mode 100644 index 00000000..4244fdac --- /dev/null +++ b/make/rules-wine-requests.mk @@ -0,0 +1,30 @@ +# parameters: +# $(1): lowercase package name +# $(2): uppercase package name +# +define create-rules-wine-requests +$$($(2)_SRC)/include/wine/server_protocol.h: | $$(OBJ)/.$(1)-post-source +$$($(2)_SRC)/include/wine/server_protocol.h: $$($(2)_ORIGIN)/include/wine/server_protocol.h + cp -a $$< $$@ +$$($(2)_SRC)/server/request.h: | $$(OBJ)/.$(1)-post-source +$$($(2)_SRC)/server/request.h: $$($(2)_ORIGIN)/server/request.h + cp -a $$< $$@ +$$($(2)_SRC)/server/trace.c: | $$(OBJ)/.$(1)-post-source +$$($(2)_SRC)/server/trace.c: $$($(2)_ORIGIN)/server/trace.c + cp -a $$< $$@ + +$$(OBJ)/.$(1)-wine-requests: $$($(2)_SRC)/include/wine/server_protocol.h +$$(OBJ)/.$(1)-wine-requests: $$($(2)_SRC)/server/request.h +$$(OBJ)/.$(1)-wine-requests: $$($(2)_SRC)/server/trace.c +$$(OBJ)/.$(1)-wine-requests: $$($(2)_ORIGIN)/server/protocol.def +$$(OBJ)/.$(1)-wine-requests: $$($(2)_ORIGIN)/tools/make_requests +$$(OBJ)/.$(1)-wine-requests: | $$(OBJ)/.$(1)-post-source + @echo ":: wine-requesting $(1)..." >&2 + cd "$$($(2)_SRC)" && tools/make_requests + touch $$@ + +$$(OBJ)/.$(1)-build32: $$(OBJ)/.$(1)-wine-requests +$$(OBJ)/.$(1)-build64: $$(OBJ)/.$(1)-wine-requests +endef + +rules-wine-requests = $(call create-rules-wine-requests,$(1),$(call toupper,$(1)))