Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] provide a more advanced autotools_layout() to the level of cmake for autotools package supporting out-of-tree build #17315

Open
1 task
hpe-ykoehler opened this issue Nov 13, 2024 · 2 comments

Comments

@hpe-ykoehler
Copy link

What is your suggestion?

autotools package support building outside of the source tree folder using the approach

cd $build
../configure && make && ...

for those autotools package supporting this mode a autotools_layout() function should exists with the same function as cmake_layout as to set the build_folder directly in the recipe of via a settings set in the conan profile.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded memsharded self-assigned this Nov 13, 2024
@memsharded
Copy link
Member

Thanks for the suggestion @hpe-ykoehler

In order to consider this feature, it would be necessary to have some evidence of autotools projects supporting this flow. Up to my knowledge the vast majority of projects will work building only in-source.
Then, the best way to proceed is to define a very simple example, like using conan new autotools_lib, and first write manually a layout() method that implements the necessary layout, and then it can be taken from there and abstract that layout() method into its own helper if necessary.

Could you please provide:

  • Some references of existing autotools projects that allow building outside of the source
  • A very basic, the most simple autotools based project (ideally starting from conan new autotools_lib with a manually written layout() method that would implement the out-of-source build?

Thanks for your feedback.

@hpe-ykoehler
Copy link
Author

hpe-ykoehler commented Nov 14, 2024

The out-of-source build feature (also referred to as parallel build trees) of autotools/automake is not new.

You can find many articles about it on Google. And you can pull recent autotools based package to try it in a shell directly.

As with anything, some package may not use this function and may write build system file that make it incompatible, similar things can also be done in CMake (but it is a little harder to achieve thanks to the higher level language used).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants