Thank you for you reply! Well, I thought that it can be done somehow like this, but I don't like the solution for two reasons: 1. I have to list all the files I want to install here. This may make the Makefile.am really huge and since datafiles change much more often than source files, maintaining this makefile may become a real burden. 2. I want to declare every subdirectory as well. You can imagine that this may become really very huge and difficult to orient in.
If all of this are just platform independent files, I think that copying directories along with their content should be supported (if it is not now)... By the way, you have skipped the mailing list and have answered only to me... On Fri, 2008-08-29 at 15:33 +0200, blah wrote: > Hi, > generally: > foodir = ($datadir)/foo > foo_DATA = file_in_foo another_file_in_foo > > Should install the directory and files therein. For example, from GNU rpge: > #Makefile.am for the scm subdirectory containing the scheme libraries > > scmfiles = key-funcs.scm keys.scm mob_events.scm mob_event_test.scm > mobutils.scm stats.scm utils.guile table.guile dialog.scm > dialog-types.scm > scmdir = $(datadir)/rpge/scm > scm_DATA = $(scmfiles) > EXTRA_DIST = $(scmfiles) > > Hope this helps, > > Remco > > On 8/29/08, Matej Tyc <[EMAIL PROTECTED]> wrote: > > Thank you, > > I see that I can clarify the issue a little bit more: > > I now really think that this is more automake than autoconf related. > > There are two challenges connected with that: > > 1. I have to tell the code what is the correct path to those datafiles, > > which I had correctly accomplished by including > > AM_CPPFLAGS = -D'<some cool macro>' > > in Makefile.am > > 2. Installing some files in that directory. I have learned to use > > dist_data_DATA = <file list>, but I would like to write > > dist_data_DATA = <data_directory>. If I do that, I get this error: > > test -z "/usr/share" || /bin/mkdir -p "/usr/share" > > /bin/install -c -m 644 './garden' '/usr/share/garden' > > /bin/install: omitting directory `./garden' > > (garden is the name of the directory containing datafiles and other > > directories). I don't like the idea of long Makefile.am containing lists > > of all files and directories that have to be installed... > > 3. Distributing the datafiles - I have figured it out, it is OK. > > Do you have an idea how to deal with the second problem? > > Matej > > > > On Fri, 2008-08-29 at 06:38 -0600, Eric Blake wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA1 > > > > > > According to Matej Tyc on 8/28/2008 1:53 PM: > > > > Hello, > > > > I have a project that I adapt to use Autotools and it is a game. It has > > > > several directories with data that are required by the program that need > > > > to be installed somwhere. > > > > I have used AM_CPPFLAGS = -DDATADIR=\"$(datadir)\" trick and I have > > > > modified the source files accordingly; however the install fails with a > > > > message about omitted directories that are not copied... It is true that > > > > in the corresponding Makefile.am data_DATA=beat/ gfx/ wavs/ are > > > > directories, but I have to install those directories and I would like to > > > > do it in a smart way with as little of work as possible. > > > > Any suggestions? > > > > > > The fact that you mention AM_CPPFLAGS makes this sound more like an > > > automake question than an autoconf one. That said, you may want to look > > > into using dist-hook: > > > http://www.gnu.org/software/automake/manual/html_node/Dist.html#Dist > > > > > > - -- > > > Don't work too hard, make some time for fun as well! > > > > > > Eric Blake [EMAIL PROTECTED] > > > -----BEGIN PGP SIGNATURE----- > > > Version: GnuPG v1.4.9 (Cygwin) > > > Comment: Public key at home.comcast.net/~ericblake/eblake.gpg > > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > > > > > iEYEARECAAYFAki37aoACgkQ84KuGfSFAYBeVACg2AkFEo4yllyBKOD/X1guHzMG > > > J7oAn2klaTWiRb/VGP8AZ5iO7PcGlr7M > > > =bGlC > > > -----END PGP SIGNATURE----- > > > > > > > >
