[Top][All Lists]

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

Re: separating source and install name

From: Ralf Wildenhues
Subject: Re: separating source and install name
Date: Thu, 12 Apr 2007 21:12:17 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Perrog,

* Perrog wrote on Thu, Apr 12, 2007 at 08:59:11PM CEST:
> I want to write a complex makefile that separate the source (or build
> name) and install name. I.e the original name of one file is say
> Ddd_config, and I want to install it as Ddd. The way install works
> makes it natural. How do I do that with automake? Should I add a new
> target rule, and how should that rule look like?

If all to-be-name-transformed files are programs (listed in a *_PROGRAMS
variable), then you can use Autoconf's program_transform_name, see

For general files, I'd just
  EXTRA_DIST = foo bar
        $(INSTALL_DATA) $(srcdir)/foo $(DESTDIR)$(dddappdir)/Foo
        $(INSTALL_DATA) $(srcdir)/bar $(DESTDIR)$(dddappdir)/Bar
        -rm -f $(DESTDIR)$(dddappdir)/Foo $(DESTDIR)$(dddappdir)/Bar

Or you can do your approach as post-processing of normal install:

> dddapp_DATA = Ddd_config
> # post-install hook
> install-dddappDATA-post:
>  mv "$(DESTDIR)$(dddappdir)/Ddd_config" $(DESTDIR)$(dddappdir)/Ddd"
> uninstall-dddappDATA-pre:
>  mv "$(DESTDIR)$(dddappdir)/Ddd" "$(DESTDIR)$(dddappdir)/Ddd_config"

  install-data-hook: install-dddappDATA-post
  uninstall-hook: uninstall-dddappDATA-pre

> I've search automake manual, but could not find it touch this issue.


Hope that helps.


reply via email to

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