automake
[Top][All Lists]
Advanced

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

Re: PATCH(2): make install-strip in cross-compilation environments


From: Alexandre Duret-Lutz
Subject: Re: PATCH(2): make install-strip in cross-compilation environments
Date: 19 Feb 2001 10:32:39 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>> "Tom" == Tom Tromey <address@hidden> writes:

 >>>>>> "adl" == Alexandre Duret-Lutz <address@hidden> writes:
 adl> 2001-01-28  Alexandre Duret-Lutz  <address@hidden>
 adl> * m4/strip.m4: New file.
 adl> * m4/Makefile.am (m4data_DATA): Add strip.m4.
 adl> * m4/init.m4: Call AM_PROG_INSTALL_STRIP.
 adl> * m4/missing.m4 (AM_AUX_DIR_EXPAND): New function.
|adl> (AM_MISSING_INSTALL_SH, AM_MISSING_HAS_RUN): Use $am_aux_dir instead
|adl> of $ac_aux_dir, and require AM_AUX_DIR_EXPAND.
|adl> * m4/depend.m4 (AM_DEP_TRACK): Likewise.
|
\ I believe this part of the patch has not been applied
  (conflicts with Akim's changes on 01-16).

 adl> * automake.in (handle_merge_targets): In the install-strip rule,
 adl> set INSTALL_PROGRAM to INSTALL_STRIP_PROGRAM, and INSTALL_PROGRAM_ENV
 adl> to INSTALL_STRIP_PROGRAM_ENV; don't use INSTALL_STRIP_FLAG.
 adl> * progs.am (address@hidden@PROGRAMS): Adapt to use INSTALL_PROGRAM_ENV,
 adl> don't use INSTALL_STRIP_FLAG any longer.
|adl> * header-vars.am (INSTALL_STRIP_FLAG): Remove.
|adl> (INSTALL_PROGRAM_ENV): New variable.
|
\ Likewise (but this isn't harmful).

 Tom> I tried this out.  How can it work?

Not very well, apparently :)

[...]

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

I don't know.

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

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

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

 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?

I see this is what is in the CVS actually.

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

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


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

I hope I'm wrong here, because I'm starting to be afraid by all
the complications implied by this small issue.  I wonder if it
wouldn't have been simplier to just call strip explicitly right
after install.
-- 
Alexandre Duret-Lutz



reply via email to

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