@@ -37,6 +37,33 @@ shouldn't specify it.
37
37
Running commands inside the subsystem
38
38
-------------------------------------
39
39
40
+
41
+ .. _conanfile_win_bash :
42
+
43
+ self.win_bash
44
+ _____________
45
+
46
+ This is an experimental feature introduced in Conan 1.39. It supersedes the ``run(..., win_bash=True) `` argument but
47
+ if the ``run(..., win_bash=True) `` is used, it will have priority so the compatibility with the previous behavior is
48
+ guaranteed.
49
+
50
+ The ``self.win_bash `` is an attribute of the conanfile, when set to ``True `` and only when running in Windows (you don't need
51
+ to check if you are in Windows), it will run the ``self.run() `` commands inside a bash shell.
52
+
53
+
54
+ .. note ::
55
+
56
+ The ``bash.exe `` that will run **is not auto-detected ** or read from the ``CONAN_BASH_PATH `` anymore, neither the subsystem to be used.
57
+ These are the config variables used:
58
+
59
+ - ``tools.microsoft.bash:subsystem ``: Values can be ``msys2 ``, ``cygwin ``, ``msys `` and ``wsl ``.
60
+ - ``tools.microsoft.bash:path ``: Path to the ``bash.exe ``
61
+
62
+ The new :ref: `Autotools, AutotoolsToolchain, AutotoolsDeps and PkgConfigDeps<conan_tools_gnu> ` will work automatically
63
+ when ``self.win_bash `` is set.
64
+
65
+
66
+
40
67
self.run()
41
68
__________
42
69
@@ -54,6 +81,11 @@ run in Windows-native mode, the compiler won't link against the ``msys-2.0.dll``
54
81
AutoToolsBuildEnvironment
55
82
_________________________
56
83
84
+ .. note ::
85
+
86
+ From Conan 1.39 the new :ref: `Autotools<conan_tools_gnu_build_helper> ` build helper will use the ``self.win_bash ``
87
+ conanfile attribute (see above) to adjust automatically all the paths to the subsystem.
88
+
57
89
In the constructor of the build helper, you have the ``win_bash `` parameter. Set it to ``True `` to
58
90
run the ``configure `` and ``make `` commands inside a bash.
59
91
0 commit comments