Re: [RFC] Standardizing RPM macro for out-of-tree builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, October 18, 2016 11:24:02 AM CEST Igor Gnatenko wrote:
> > Is this strictly %meson related?  Could the generalizing be done in
> > `redhat-rpm-macros` within %meson_ namespace so we can avoid touching all
> > packages?
>
> Actually it's related for any buildsystem with supports (or even
> requires out-of-tree building).

Hms, I'm not sure...  Autotooled projects have VPATH builds (info
automake) usually optional, and it usually requires maintainer uses
`make distcheck` at least during release time (otherwise VPATH build
likely get broken with time).  I don't see much benefits in changing
something which works now, or risk something..

> > Though I'm not aware of the actual PoC, neither what boilerplate typing
> > needs to be done for every %meson package, probably worth sharing ...
>
> mkdir build
> pushd build
>   %meson ..

The '..' is parent dir here I bet...

> popd
> %ninja_build -C build
> %ninja_install -C build

... TBH, I don't see a big issues here. :)  Can can simplify this by:

    mkdir build
    pushd build
    %meson ..
    %ninja_build
    %ninja_install
    popd

?

> instead of this I would prefer to have
> %meson
> %meson_build
> %meson_install

But, yes this sounds cool.

> In case of angelscript it's:
> mkdir build
> pushd build
>   %meson ../sdk/angelscript/projects/meson/
> popd
> %ninja_build -C build
> %ninja_install -C build
>
> With some macro it would be just
> %global __srcdir sdk/angelscript/projects/meson

Without knowing background peculiarities, this sounds wrong to me.  Can we
have this named like %meson_srcdir? From the "namespace" reasons ..

Or at least %vpath_builddir?  So particular language specific macros could
take %vpath_builddir in future?  %__srcdir does not say what it is used for.

> %meson
> %meson_build
> %meson_install

Though I'm not sure you need to have the %__srcdir at all.  Can't you have
parametrized %meson_vpath macro instead of %mason (so you say where build
directory actually is)?

> but this applies for other buildsystems. For example, currently with
> CMake almost everyone does
> mkdir %{_target_platform}
> pushd %{_target_platform}
>   %cmake ..
> popd
> %make_build -C %{_target_platform}
> %make_install -C %{_target_platform}

Similarly here, if there was %vpath_builddir, %cmake could have been
hacked to support that.

Pavel
_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux