Hi,
during last FPC meeting we agreed[0] that we need some standardization of macro related to builds where builddir != srcdir (and with possibility to make it builddir = srcdir).
I was working to make guidelines for ninja and meson. For ninja it doesn't matter from where you build (it's like make), but meson itself accepts ONLY out-of-tree builds. Would be nice to get system-wide (rpm-wide?) macro which stands for: 1) source directory where CMakeLists.txt/meson.build/configure are 2) build directory (I think _target_platform is a good candidate)
to make out-of-tree conversion to in-tree, you do the RPM variable override.
For example, in openSUSE it's defined in cmake[1] as __builddir and __srcdir.
Ideas, suggestions are appreciated!
[0] https://meetbot.fedoraproject.org/fedora-meeting-1/2016-10-13/fpc.2016-10-13... [1] https://build.opensuse.org/package/view_file/openSUSE:Factory/cmake /cmake.macros?expand=1
On 17 October 2016 at 15:37, Igor Gnatenko ignatenko@redhat.com wrote:
during last FPC meeting we agreed[0] that we need some standardization of macro related to builds where builddir != srcdir (and with possibility to make it builddir = srcdir).
May I ask why? Is it any particular reason investing time on this area? All projects are ready to have srcdir == builddir and many are not. Many are not.
IMO there is no significant cons to switch to builddir != srcdir and there are much more interesting things to do from point of view standardization like even apply some common way of formatting spec files (human brain is well adapted to find patterns or is able to easy catch breaking those patterns .. so common formatting wouch be helpful on find issues with some spec files).
kloczek
On 10/17/2016 04:37 PM, Igor Gnatenko wrote:
Hi,
during last FPC meeting we agreed[0] that we need some standardization of macro related to builds where builddir != srcdir (and with possibility to make it builddir = srcdir).
I was working to make guidelines for ninja and meson. For ninja it doesn't matter from where you build (it's like make),
For make and ninja-build, what works depends on the recipes. I don't think there are ways to tell in an automated way if out-of-tree builds are supported or not.
(There are also out-of-tree builds which still write to the source tree.)
Florian