automake
[Top][All Lists]
Advanced

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

Re: INSTALL_STRIP_FLAG is apparently hardwired.


From: Alexandre Duret-Lutz
Subject: Re: INSTALL_STRIP_FLAG is apparently hardwired.
Date: Mon, 06 May 2002 09:21:31 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

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

 >>>>>> "Harlan" == Harlan Stenn <address@hidden> writes:
 Harlan> Would it be OK to say:
 Harlan> INSTALL_STRIP_FLAG=$${INSTALL_STRIP_FLAG:-s} \
 Harlan> in lib/am/install.am?

 Tom> I wouldn't have a problem with this.  Alexandre?

I don't really understand it.  I must be missing something, but
AFAICT, INSTALL_STRIP_FLAG is not a shell variable.

What about introducing a new variable to hold the default of
INSTALL_STRIP_FLAG?

In header-vars.am:
  AM_INSTALL_STRIP_FLAG = -s    # Can be overriden by the user

and in install.am:
  install-strip:
          $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
            INSTALL_STRIP_FLAG='$(AM_INSTALL_STRIP_FLAG)' \
            `test -z '$(STRIP)' || \
              echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install

Sounds easy, but doesn't work:

1. $(INSTALL_STRIP_FLAG) is used for Libtool libraries *only* and
   I think libtool understand only `-s'.

2. _PROGRAMS are installed with $(INSTALL_PROGRAM), which is
   redefined to $(INSTALL_STRIP_PROGRAM) in the case of
   install-strip:

     INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s

   Of course we could define this as 

     INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c $(AM_INSTALL_STRIP_FLAG)

   but this won't help as install-sh understand only `-s'.

Right now, Automake never calls `strip' itself, it delegates
this task to tools that understand only the `-s' option.

We can work around this with $(install_sh) by setting STRIPPROG
appropriately (STRIPPROG='$(STRIP) $(AM_INSTALL_STRIP_FLAG)'"),
but this leaves the Libtool issue.

Also, this AM_INSTALL_STRIP_FLAG variable will be set for the
whole project, which doesn't sound terribly useful to me.  I'm
pretty sure people will soon ask for per-target strip flags (or
at least per-primary flags).
-- 
Alexandre Duret-Lutz




reply via email to

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