Hey Diego,

Thanks.  Never realized b/c the only time I build is when I build for
production I build via rpmbuild and it always sets --prefix &
--exec-prefix.  Only one tiny nit, I added an extra DISTCLEANFILES line
to make sure distcheck doesn't break.

Al

On Mon, 2011-09-26 at 03:55 -0700, Diego Elio Pettenò wrote:
> This was reported in Gentoo as bug #383793: ipmimonitoring is generated
> referring to /usr/local even if configured with --prefix=/usr . This was
> caused by the broken expansion of the sbin path in configure.ac.
> 
> To resolve the issue, this change no longer consider ipmimonitoring to be
> expanded by configure itself, but is rather processed at build time with
> sed so that make takes care of the expansion.
> 
> The file is also not distributed (since it needs to be regenerated
> depending on configure options), but its sources are.
> 
> Signed-off-by: Diego Elio Pettenò <[email protected]>
> ---
>  configure.ac                 |    8 --------
>  ipmi-sensors/src/Makefile.am |    6 +++++-
>  2 files changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 7da69db..8232ab6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -135,7 +135,6 @@ AC_CONFIG_FILES([
>          ipmi-sensors/Makefile
>          ipmi-sensors/ipmi-sensors.8.pre
>          ipmi-sensors/src/Makefile
> -        ipmi-sensors/src/ipmimonitoring
>          ipmi-sensors-config/Makefile
>          ipmi-sensors-config/ipmi-sensors-config.8.pre
>          ipmi-sensors-config/src/Makefile
> @@ -755,13 +754,6 @@ dnl Check for variables
>  
>  dnl Macro definitions
>  
> -dnl Misc substitutions
> -dnl Must expand nested unquoting
> -IPMIMONITORINGSBINDIR_TMP1="`eval echo ${sbindir}`"
> -IPMIMONITORINGSBINDIR_TMP2="`echo $IPMIMONITORINGSBINDIR_TMP1 | sed 
> 's/^NONE/$ac_default_prefix/'`"
> -IPMIMONITORINGSBINDIR="`eval echo $IPMIMONITORINGSBINDIR_TMP2`"
> -AC_SUBST([IPMIMONITORINGSBINDIR])
> -
>  dnl Check for random number paths
>  
>  dnl Option to disable checking for /dev/urandom and /dev/random
> diff --git a/ipmi-sensors/src/Makefile.am b/ipmi-sensors/src/Makefile.am
> index 53d6f71..abadb71 100644
> --- a/ipmi-sensors/src/Makefile.am
> +++ b/ipmi-sensors/src/Makefile.am
> @@ -43,6 +43,10 @@ ipmi_sensors_SOURCES = \
>       ipmi-sensors-output-common.c \
>       ipmi-sensors-simple-output.c
>  
> +ipmimonitoring: ipmimonitoring.in
> +     sed -e 's:@IPMIMONITORINGSBINDIR@:$(sbindir):' $< > $@
> +     chmod +x ipmimonitoring
> +
>  $(top_builddir)/common/src/toolcommon/libtoolcommon.la : 
> force-dependency-check
>       @cd `dirname $@` && $(MAKE) `basename $@`
>  
> @@ -75,4 +79,4 @@ $(top_builddir)/libfreeipmi/src/libfreeipmi.la : 
> force-dependency-check
>  
>  force-dependency-check:
>  
> -EXTRA_DIST = ipmimonitoring
> +EXTRA_DIST = ipmimonitoring.in
-- 
Albert Chu
[email protected]
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



_______________________________________________
Freeipmi-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/freeipmi-devel

Reply via email to