From 86ac87ee6389725a817d25c23c38c8b8f4a9fe74 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 24 Mar 2023 17:09:24 +0000 Subject: [PATCH] macros: Simplify customisation of configure/make/make install Signed-off-by: Michael Tremer --- macros/build.macro | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/macros/build.macro b/macros/build.macro index f8e14812e..4eedd6a91 100644 --- a/macros/build.macro +++ b/macros/build.macro @@ -145,8 +145,17 @@ build configure = [ -x "%{DIR_APP}/%{CONFIGURE_SCRIPT}" ] && %{DIR_APP}/%{CONFIGURE_SCRIPT} %{configure_options} - # These variables are used if you have to add some targets - # directly to the make command. + # GNU Make Stuff + __make = make -O + + # Default "make" command + make_build = %{__make} %{PARALLELISMFLAGS} %{make_build_targets} + + # Default "make install" command + make_install = %{__make} DESTDIR=%{BUILDROOT} %{make_install_targets} + + # These variables are used if you have to add some targets directly to the make command + # LEGACY: DO NOT USE ANY MORE make_build_targets = make_install_targets = install @@ -187,10 +196,11 @@ build # Remove any RPATH stuff from locally installed libtool %{MACRO_FIX_LIBTOOL} - # Run custom commands. + # Run custom commands %{configure_cmds} - make %{PARALLELISMFLAGS} %{make_build_targets} + # Run build + %{make_build} # Run more custom commands. %{build_cmds} @@ -214,6 +224,7 @@ build def _install [ -d "%{DIR_BUILD}" ] && cd %{DIR_BUILD} + # Create BUILDROOT mkdir -pv %{BUILDROOT} %{install} @@ -221,25 +232,17 @@ build %{MACRO_INSTALL_FILES} %{MACRO_PYTHON_COMPILE} - # Cleanup perl modules. + # Cleanup perl modules %{perl_cleanup} %{install_post} end def install - make DESTDIR=%{BUILDROOT} %{make_install_targets} + # Install + %{make_install} - # Run custom commands. + # Run custom commands %{install_cmds} end - - # XXX to be removed soon - def install_post - end - - # Enable strict processing of build-id by default. - # The build will fail if a file is missing its build-id. - debuginfo_strict_build_id = true - debuginfo_options = end -- 2.39.5