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: Tom Tromey
Subject: Re: PATCH(2): make install-strip in cross-compilation environments
Date: 16 Feb 2001 20:45:25 -0700

>>>>> "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.
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.

I tried this out.  How can it work?

I re-ran the resulting automake on automake itself.
In the top level Makefile I see this:

    INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
    INSTALL_STRIP_PROGRAM_ENV = STRIPPROG='strip'
    install_sh = ../automake/install-sh
    install-strip:
            $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_STRIP_PROGRAM)' \
              INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install


I think relying on a subdir `make' invocation expanding
`INSTALL_PROGRAM' correctly is not too likely to work.  And besides
this the definition of `install_sh' in m4/Makefile seems wrong anyway:

    install_sh = ../automake/install-sh

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

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

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

Comments?

Tom



reply via email to

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