[Top][All Lists]

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

Re: Cleanup 4/4: make install-strip in cross-compilation environments

From: Alexandre Duret-Lutz
Subject: Re: Cleanup 4/4: make install-strip in cross-compilation environments
Date: 25 Feb 2001 16:54:07 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7


 Tom> I think relying on a subdir `make' invocation expanding
 Tom> `INSTALL_PROGRAM' correctly is not too likely to work.  

 adl> I don't know.

I still don't and would really like to get more feedback on
this.  The only workaround I can think off is to select
the install program at run time.

Maybe somthing like this (not tried):

INSTALL_STRIP_PROG='`if test -n "$(STRIP)"; then echo $(INSTALL); else echo 
$(install_sh) -c -s`'

 Tom> And besides this the definition of `install_sh' in
 Tom> m4/Makefile seems wrong anyway:

 Tom> install_sh = ../automake/install-sh

 adl> I guess this is a consequence of the missing
 adl> s/ac_aux_dir/am_aux_dir/ change reported above.  In the original
 adl> patch $install_sh is based on $am_aux_dir which is always
 adl> absolute.

With the three previous patches I have this in automake's Makefile

install_sh = /home/adl/projs/cvs/automake/install-sh

 Tom> What if we change the rule to do something like this?

 Tom> install-strip:
 Tom> $(MAKE) ... INSTALL_PROGRAM=`cd somewhere && pwd`/install-sh ...

 Tom> `somewhere' would be computed by running sed on $(install_sh).

 Tom> Comments?

 adl> I see this is what is in the CVS actually.

 adl> # setting install_sh
 adl> if test -z "$install_sh"; then
 adl> for install_sh in "$ac_aux_dir/install-sh" \
 adl> "$ac_aux_dir/" \
 adl> "${am_missing_run}${ac_auxdir}/install-sh";
 adl> do
 adl> test -f "$install_sh" && break
 adl> done
 adl> # FIXME: an evil hack: we remove the SHELL invocation from
 adl> # install_sh because automake adds it back in.  Sigh.
 adl> install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
 adl> fi

 adl> _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
 adl> INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && 
pwd\`/install-sh -c -s"

 adl> Isn't there an issue with `cd $_am_dirpart' when `$install_sh'
 adl> is defined as `${am_missing_run}${ac_auxdir}/install-sh'?  

I think there is.  Moreover I don't understand why the
computation of `CDPATH=: && cd $_am_dirpart && pwd` is delayed
to install-time since $_am_dirpart is fixed at configure-time.
Or am I missing something?

The patch below assumes that `Cleanup 2/4' has been applied.

2001-02-25  Alexandre Duret-Lutz  <address@hidden>

        * m4/strip.m4 (AM_PROG_INSTALL_STRIP): Use $install_sh, verbatim,
        since we know it's an absolute path.

Index: m4/strip.m4
RCS file: /cvs/automake/automake/m4/strip.m4,v
retrieving revision 1.2
diff -u -r1.2 strip.m4
--- strip.m4    2001/02/19 00:12:15     1.2
+++ strip.m4    2001/02/25 14:42:43
@@ -33,8 +33,7 @@
-  _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
-  INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && 
pwd\`/install-sh -c -s"
+  INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"

Alexandre Duret-Lutz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]