From 4c86718e78c6b18c84774e48ca025694364c251a Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Thu, 18 Apr 2024 12:45:01 +0200 Subject: initial support for running autogen.sh inside wsl from git-bash Change-Id: I4272ea817a48880fd4206d6c73add7ccb8c4f6c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166335 Tested-by: Jenkins Reviewed-by: Christian Lohmaier --- Makefile.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index ab7090ee1e77..f55e92c94405 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,6 +38,11 @@ Makefile $(BUILDDIR)/Makefile: $(BUILDDIR)/config_host.mk $(BUILDDIR)/config_hos @touch $@ # run configure in an environment not polluted by config_host.mk +ifneq ($(MSYSTEM),) +WSL:=@WSL@ +# wsl needs unix-style path into windows realm +$(BUILDDIR)/config_host.mk : SRCDIR:=/$(shell $(WSL) wslpath -u $(SRCDIR)) +endif $(BUILDDIR)/config_host.mk : $(wildcard \ $(SRCDIR)/autogen.sh \ $(SRCDIR)/config_host.mk.in \ @@ -51,9 +56,8 @@ $(BUILDDIR)/config_host.mk : $(wildcard \ $(BUILDDIR)/autogen.input \ $(BUILDDIR)/autogen.lastrun \ ) \ - $(shell . $(SRCDIR)/bin/get_config_variables JAVA_HOME && \ - if test -n "$${JAVA_HOME}" -a ! -d "$${JAVA_HOME}/bin"; then echo force-restart; fi) - sh -c $(SRCDIR)/autogen.sh + $(shell if test -n '$(JAVA_HOME)' -a ! -d '$(JAVA_HOME)'; then echo force-restart; fi) + sh -c "$(if $(MSYSTEM),$(WSL) )$(SRCDIR)/autogen.sh" else # MAKE_RESTARTS -- cgit