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 <http://www.gnu.org/software/autoconf/manual/html_node/Transforming-Names.html>. For general files, I'd just EXTRA_DIST = foo bar install-data-local: $(INSTALL_DATA) $(srcdir)/foo $(DESTDIR)$(dddappdir)/Foo $(INSTALL_DATA) $(srcdir)/bar $(DESTDIR)$(dddappdir)/Bar uninstall-data-local: -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" Add: install-data-hook: install-dddappDATA-post uninstall-hook: uninstall-dddappDATA-pre > I've search automake manual, but could not find it touch this issue. <http://sources.redhat.com/automake/automake.html#Install> <http://sources.redhat.com/automake/automake.html#Extending> Hope that helps. Cheers, Ralf