[Top][All Lists]

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

Re: Installing a list of files with dynamically generated names

From: Ralf Wildenhues
Subject: Re: Installing a list of files with dynamically generated names
Date: Mon, 18 Jul 2011 08:01:48 +0200

Hi Benoit,

On Fri, Jul 15, 2011 at 10:01:04PM -0700, tsuna wrote:
> I use the GWT compiler and it produces dynamically generated file
> names (they contain MD5 sums and they depend on what code is getting
> compiled, so they change often).  I get it to put all its output files
> in a given directory so I know where they are.  During `make install'
> I need to install these files somewhere under $pkgdatadir.  I couldn't
> find a way to tell Automake to install these files, since I can't
> formulate their names in, am I missing something?  I ended
> up writing a install-data-local rule which is pretty much a
> copy-pasted-edited version of an install rule otherwise generated by
> Automake, except that instead of using a make variable to get the list
> of files to install, I use `find -L outputdir \! -type d`.  Is there a
> better way?

Probably not.  If you don't need to flatten directory structure, and the
number of files is not too large, you can use something like

  $(mkinstalldirs) $(DESTDIR)$(foodir)
  cd outputdir && $(INSTALL_DATA) * $(DESTDIR)$(foodir)

as recent Autoconfs will take care to find an install program that can
install multiple files at once.

If you want to be super-GCS-compliant, you can prepend your commands with

Hope that helps.


reply via email to

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