[Top][All Lists]

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

handling --program-transform(s) in hooks

From: Karl Berry
Subject: handling --program-transform(s) in hooks
Date: Sun, 4 May 2014 18:11:49 GMT

Question: how best to respect --program-suffix, --program-prefix,
--program-transform-name in user-defined rules for installing?

Details: For Texinfo, I install makeinfo as a symlink to texi2any in the
install-exec-hook (like the example in the Extending node of the
automake manual):

        rm -f $(DESTDIR)$(bindir)/makeinfo
        -$(LN_S) texi2any $(DESTDIR)$(bindir)/makeinfo

However, clearly this ignores any specified program transformations.
Glenn (Morris, cc'd) reported as follows:

    I configured texinfo-5.2 like this:
    ./configure --program-suffix"-5"

    make install created a broken link in bin/:
    makeinfo -> texi2any

    This should be:
    makeinfo-5 > texi2any-5

True enough.  So my question is, how best to deal with it?  I mean, I
can look at the output and hack the same sed invocations that automake
inserts into into my install rule.  But I wonder if there is
a better way, perhaps using something other than install-exec-hook.
Any advice?  Other Automake-using programs to look at for emulation
purposes?  (I looked at a few without much luck.)

I see that Emacs does stuff like this:

  # Program name transformation.
  TRANSFORM = @program_transform_name@

  # What emacs should be called when installed.
  EMACS_NAME = `echo emacs | sed '$(TRANSFORM)'`

which seems sensible enough, but Emacs only uses autoconf, not automake.
Not sure that using @program_transform_name@ is the best way to go.

In any case, I suggest this issue be addressed in either the Renaming or
Extending node of the manual (with a pointer from the other one).  At
least, those are the places I found that seemed likely to be relevant.
If it's in the manual somewhere else, please let me know.  I couldn't
find anything specific about this in general web searches,
stackexchange, etc., either, which surprised me, since surely this come
up before in all these many years.  Perhaps I couldn't figure out the
right thing to search for.


reply via email to

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