From: jbj Date: Tue, 19 Jan 1999 17:23:32 +0000 (+0000) Subject: Create %configure macro. X-Git-Tag: rpm-4.4-release~3181 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=efd78aab74e2ef3a101bbfc4c2c6082418d15468;p=platform%2Fupstream%2Frpm.git Create %configure macro. CVS patchset: 2722 CVS date: 1999/01/19 17:23:32 --- diff --git a/macros.in b/macros.in index 821896d..83646e0 100644 --- a/macros.in +++ b/macros.in @@ -22,6 +22,7 @@ %__chown %(which chown) %__gzip %(which gzip) %__install %(which install) +%__libtoolize %(which libtoolize) %__make %(which make) %__mkdir %(which mkdir) %__patch %(which patch) @@ -96,3 +97,22 @@ %_target_cpu %{_host_cpu) %_target_vendor %{_host_vendor) %_target_os %{_host_os) + +#============================================================================== +# ---- specfile macros. +# Macro(s) here can be used reliably for reproducible builds. +# (Note: Above is the goal, below are the macros under development) +# +# The configure macro does the following: +# +# optionally change to a subdirectory. +# attempt to update onfig.guess and config.sub. +# run configure with correct prefix, platform, and CFLAGS. +# optionally restore current directory. +# +%configure(C:) \ + %{C:%{-C:pushd %{-C*}}} \ + %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \ + CFLAGS="%{optflags}" ./configure %{_build} --prefix=%{_prefix} \ + %{C:%{-C:popd }} + diff --git a/tests/macros.in b/tests/macros.in index d294a8b..3fd8e21 100644 --- a/tests/macros.in +++ b/tests/macros.in @@ -22,6 +22,7 @@ %__chown %(which chown) %__gzip %(which gzip) %__install %(which install) +%__libtoolize %(which libtoolize) %__make %(which make) %__mkdir %(which mkdir) %__patch %(which patch) @@ -96,3 +97,22 @@ %_target_cpu %{_host_cpu) %_target_vendor %{_host_vendor) %_target_os %{_host_os) + +#============================================================================== +# ---- specfile macros. +# Macro(s) here can be used reliably for reproducible builds. +# (Note: Above is the goal, below are the macros under development) +# +# The configure macro does the following: +# +# optionally change to a subdirectory. +# attempt to update onfig.guess and config.sub. +# run configure with correct prefix, platform, and CFLAGS. +# optionally restore current directory. +# +%configure(C:) \ + %{C:%{-C:pushd %{-C*}}} \ + %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \ + CFLAGS="%{optflags}" ./configure %{_build} --prefix=%{_prefix} \ + %{C:%{-C:popd }} +