You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2022/07/31 09:03:14 UTC

[GitHub] [buildstream-plugins] nanonyme commented on a diff in pull request #21: Enable setting build-dir

nanonyme commented on code in PR #21:
URL: https://github.com/apache/buildstream-plugins/pull/21#discussion_r933953103


##########
src/buildstream_plugins/elements/autotools.yaml:
##########
@@ -93,20 +94,39 @@ config:
   - |
     %{autogen}
   - |
-    %{configure}
+    if [ -n "%{build-dir}" ]; then
+      mkdir %{build-dir}
+      pushd %{build-dir}
+      %{configure}
+      popd
+    else
+      %{configure}
+    fi
 
   # Commands for building the software
   #
   build-commands:
   - |
-    %{make}
+    if [ -n "%{build-dir}" ]; then
+      pushd %{build-dir}
+      %{make}
+      popd

Review Comment:
   Right, subshell strategy definitely works. What is iffy here is whether it would be cleaner to pre-create commands-subdir if it doesn't exist, run autogen in subshell in conf-root (where it normally has to be run) and tell consumer that they can set build-dir through `command-subdir: build-dir`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org