automake
[Top][All Lists]
Advanced

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

Re: how to install data directories


From: Matej Tyc
Subject: Re: how to install data directories
Date: Sat, 30 Aug 2008 15:04:58 +0200

Thank you for your reply,
I guess that it does the job concerning instalation, but in this world,
nothing is usually perfect :-):
1. What about `make uninstall`? Will the files be removed if they were
installed in that way?
2. This requires the user to write shell scripts in Makefile.am, which
is, if I understand this correctly, a file mainly for declaration of
intentions that should be as readable as possible. I think that it is
highly inapropriate to write a low-level script to achieve a really
trivial and common task.
If it is not possible to do in any other way, than it is a challenge for
Automake developers. For instance computer games often have very complex
and dynamic game data file structure and if a game developer would like
to use autotools, he would have to spend quite a lot of time on figuring
out how to setup configure.ac and Makefile.am instead of actually
developing something. 

And a second one: What about a wiki? I relly miss that! Manuals are
good, but solutions of problems like this one should be summarized in
some centralized place so others could learn from it and maintain it as
autotools evolve...

On Fri, 2008-08-29 at 18:17 +0200, Remco Bras wrote:
> Hi,
> ah yes, that is a problem, in that case,
> you could do something like this in Makefile.am:
> 
> dirs = some_data_dir some_other_data_dir
> install-data-local:
>       for d in $(dirs); hing. \
>         do\
>             cp -Rv $d $(datadir)\
>         done
> 
> Would this solution be acceptable?
> 
> -Remco
>       
> 
> Op Friday 29 August 2008 17:16:49 schreef u:
> > 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 <address@hidden> 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             address@hidden
> > > > > -----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-----
> 
> 





reply via email to

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