program_transform_name
Akim Demaille
demaille@inf.enst.fr
Wed Oct 1 01:51:00 GMT 1997
Jeffrey A Law <law@cygnus.com> writes:
> In message <199709291715.NAA18598@rio.atlantic.net>you write:
> > According to Jeffrey A Law:
> > > Don't you need to change configure/configure.in too?
> >
> > I guess it was already up-to-date; I didn't have to change it.
> My point was that I didn't see an AC_SUBST statement for
> program_transform_name and I don't think it autoconf will change
> the @program_transform_name@ into the right thing without it.
>
> However, I'm not much of an autoconf person, so I could be wrong;
> I just want someone to verify that the right thing will happen
> if we put your change in.
For the autoconf side, the only thing to do is to drop
AC_ARG_PROGRAM
somewhere, what enables the --program options to configure.
Then you need to put the @program_transform_name@ somewhere in
the Makefile.
Here are the relevant parts of autoconf's doc:
Transforming Program Names When Installing
==========================================
Autoconf supports changing the names of programs when installing
them. In order to use these transformations, `configure.in' must call
the macro `AC_ARG_PROGRAM'.
- Macro: AC_ARG_PROGRAM
Place in output variable `program_transform_name' a sequence of
`sed' commands for changing the names of installed programs.
If any of the options described below are given to `configure',
program names are transformed accordingly. Otherwise, if
`AC_CANONICAL_SYSTEM' has been called and a `--target' value is
given that differs from the host type (specified with `--host' or
defaulted by `config.sub'), the target type followed by a dash is
used as a prefix. Otherwise, no program name transformation is
done.
Transformation Rules
--------------------
Here is how to use the variable `program_transform_name' in a
`Makefile.in':
PROGRAMS=cp ls rm
install:
for p in $(PROGRAMS); do \
$(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
done
uninstall:
for p in $(PROGRAMS); do \
rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
done
Regards,
Akim
--
P-mail: Akim Demaille, 107 rue Bobillot, F-75013 Paris, France
E-mail: demaille@inf.enst.fr
V-mail: +33 (1) 45-81-78-68
More information about the Gcc
mailing list