After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 108240 - Examples/book source files not installed by 'make install'
Examples/book source files not installed by 'make install'
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: reference documentation
2.2
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2003-03-12 19:29 UTC by Cedric Gustin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for the installation of examples source files (6.22 KB, patch)
2003-03-14 18:20 UTC, Cedric Gustin
none Details | Review
distclean problem patch (1.02 KB, patch)
2003-03-18 14:56 UTC, Cedric Gustin
none Details | Review

Description Cedric Gustin 2003-03-12 19:29:53 UTC
The examples source files (in examples/book) are referenced in many 
different places in the gtkmm book (docs/tutorial). However, the 
corresponding .cc and .h files are not installed when doing a 'make 
install'. This means that in the installed documentation (usually located 
in share/doc/gtkmm-2.0), a bunch of links are broken. Even worst than 
that, the corresponding links in the tutorial would require the examples 
directory to be installed to share/doc/examples, which is of course not 
the best solution !

My opinion is that the book/* subdirs belongs to the docs/tutorial 
directory instead of examples. This would make it much easier to create 
installation rules for the corresponding .cc and .h files.
Comment 1 Murray Cumming 2003-03-13 07:47:38 UTC
Does any other package install examples?
Comment 2 Cedric Gustin 2003-03-13 11:01:25 UTC
Yes, doxygen does it, at least on my RedHat 8.0 box. 
In /usr/share/doc/doxygen-2.*.*, there are two subdirs, examples and 
html. I think it might be interesting to have a look at the doxygen 
source code and see how Dimitri is doing it in its Makefile.am's.
Comment 3 Murray Cumming 2003-03-13 12:38:39 UTC
I see, so you are not saying that the examples should not be somewhere
in /usr/share/doc/, but that they should be inside
/usr/share/doc/gtkmm-2.0/?

Well, can't we just move the documentation down one folder so that the
links still work?
Comment 4 Cedric Gustin 2003-03-13 14:52:14 UTC
Yes, I think the examples should be in /usr/share/doc/gtkmm-
2.0/examples or whatever the prefix (usually /usr). This means that 
the examples/book subdir should be moved to docs/tutorial  and the 
links in the tutorial updated accordingly. The other solution is to 
keep the examples where they are in the distribution, install them 
in /usr/share/doc/gtkmm-2.0/examples and update the links in the 
tutorial. This is easier for CVS but it means that the example links 
will be broken if the user opens the docs/tutorial/html/index.html 
file FROM the source distribution instead of the installation 
directory.

Anyway, in both cases, should the makefile rule that install the 
examples be called from docs/tutorial/Makefile, from 
examples/Makefile or from the individual examples/book/*/Makefile ? I 
can add a simple rule called from the individual Makefiles in all 
examples subdirs but :
1. Building the examples would be required before installing the 
source files (automake requires that)
2. Because examples/Makefile in not called when doing a make in the 
root directory, this means that 'make install' will have to be called 
in both the root and examples directories.

Maybe there is an automake way of doing that but it's almost black 
magic (install-local rules, ...)

All in all, it's a bit of a mess.
Comment 5 Murray Cumming 2003-03-13 15:45:11 UTC
I was thinking of just having a docs/docs directory if that fixed it,
with docs/docs/tutorial and docs/examples/. I know it's not perfect,
but it's not too bad.
Comment 6 Cedric Gustin 2003-03-13 17:48:39 UTC
If you're talking about having /usr/share/doc/gtkmm-2.0/doc/doc, then 
this would solve the problem with a quick and dirty solution.

If you agree on moving the examples/book directory on CVS, then it 
would be easier to have docs/examples and docs/tutorial and to change 
the gtkmm-tut-with-examples.xml file. there is actually a single line 
to change, namely 

<!ENTITY path_examples_base "../../examples/book/">

to 

<!ENTITY path_examples_base "../examples/book/">

No docs/docs and only the examples used by the tutorial will be 
installed.

To summarize, what would be nice :
1. Move %root%/examples/books to %root%/docs/examples/book
2. Change the ENTITY in gtkmm-tut-with-examples.xml
3. Write a nice install rule for the examples/book source files so 
that we have /usr/share/doc/gtkmm-2.0/examples/book 
and /usr/share/doc/gtkmm-2.0/tutorial/html/index.html referencing the 
source files appropriately.

You decide...
Comment 7 Murray Cumming 2003-03-14 07:18:07 UTC
I think I'd prefer to keep the examples in the examples dir.
Comment 8 Murray Cumming 2003-03-14 15:19:33 UTC
We could consider moving the examples for gtkmm 2.4, though we'd need
some toplevel README.examples to make it clear where they are. People
often don't see the examples even where they are now, right in front
of them.
Comment 9 Cedric Gustin 2003-03-14 18:18:43 UTC
Ok, here is my patch for this examples installation problem (+ a few 
win32 related fixes). See the patched ChangeLog for details. 
Basically, what's being done is :

1. Now FAQ is installed along with the tutorial and reference
2. All those things are installed in /usr/share/doc/gtkmm-2.0/docs
3. The examples source files are installed in /usr/share/doc/gtkmm-
2.0/examples
4. The examples source files are installed when doing 'make install' 
in the examples directory. The examples binaries are created at the 
same time if it has not been done before. Of course, those binaries 
are not installed. 

This means that to install the all documentation, it is necessary to 
do a 'make install' in both the root directory and in the examples 
subdir. If one wants to avoid that, examples should be added back to 
SUBDIRS in the root Makefile.am.

Not the perfect solution, but at least it works as expected.
Comment 10 Cedric Gustin 2003-03-14 18:20:01 UTC
Created attachment 15025 [details] [review]
patch for the installation of examples source files
Comment 11 Murray Cumming 2003-03-14 23:28:11 UTC
Thanks a lot. This doesn't look as easy as I thought. I wanted to
build the examples anyway, so I have added it to the SUBDIRS. I think
it's a good solution.

Re. the extra win32 stuff - Do try to keep patches targetted. If I had
time I would be stricter.

Applied. Thanks again.
Comment 12 Murray Cumming 2003-03-15 14:05:25 UTC
make distcheck now fails in the examples dir, with "no rule to make
distclean". Any ideas?
Comment 13 Cedric Gustin 2003-03-17 10:49:59 UTC
While adding examples to SUBDIRS, you forgot to remove it from 
DIST_SUBDIRS !!!

Also, when I tried to build gtkmm-2.2.1, I realized you had increase 
the atk requirement to 1.2.0. Turns out atk on win32 is still at 
1.0.3 (I think it's a bad decision from Tor Lillqvist not to upgrade 
all gtk+ components at the same time, but we have to live with it !). 
no big deal (I just modified my atk-1.0.pc file) but I think we 
should have separate library requirements for win32 in the 
configure.in. What do you think ?

Apart from that, I will soon put the gtkmm-2.2.1 installer online, as 
soon as I have decided to stick to Inno Setup as the installer 
builder or move to NSIS (as recommended by somebody who contacted me 
privately last week).
Comment 14 Murray Cumming 2003-03-18 07:12:55 UTC
Reopening bug so someone fixes the DISTDIR thing.

I don't know how we would have a different spec file for win32. I'd 
prefer that atk was fixed. Do you know why they are using the old one?
Comment 15 Cedric Gustin 2003-03-18 07:23:24 UTC
I don't know why atk was not upgraded (laziness ?). I have also sent 
2 messages to the gimpwin-dev mailinglist complaining about missing 
symbols (like gtk_clipboard_get_type !!!) in the DLLs. I hope 
everything will be fixed in the next binary release of gtk+ on win32.
In the meantime, I don't think it's a good idea to provide on our 
gtk+ DLLs (as mentioned yesterday on the mailing list).
Comment 16 Cedric Gustin 2003-03-18 14:55:30 UTC
Here is my patch for the distclean problem. Very short indeed.
Comment 17 Cedric Gustin 2003-03-18 14:56:22 UTC
Created attachment 15097 [details] [review]
distclean problem patch
Comment 18 Murray Cumming 2003-03-19 15:40:38 UTC
This should be comitted to both "branches". Thanks. 
Comment 19 Ole Laursen 2003-03-20 20:57:29 UTC
I've applied the patch to both gtkmm 2.4 and the gtkmm 2.2 module. It
didn't apply cleanly to gtkmm 2.4 with 'patch -p0 < patchname' (no
idea why), so I had to fix it manually. Strange. Murray, it seems you
didn't patch the ChangeLog for 2.4?

Also, gtkmm 2.4 doesn't seem to build so I couldn't really test it. It
never produces configure, instead stops with 

  atk/atkmm/Makefile.am:33: variable `win32_dlls_extra_libs' not defined
  gdk/gdkmm/Makefile.am:32: variable `win32_dlls_extra_libs' not defined
  gtk/gtkmm/Makefile.am:35: variable `win32_dlls_extra_libs' not defined
  pango/pangomm/Makefile.am:32: variable `win32_dlls_extra_libs' not
defined
Comment 20 Murray Cumming 2003-03-21 10:09:12 UTC
Thank you, Ole.

> Strange. Murray, it seems you didn't patch the ChangeLog for 2.4

What didn't I put in the ChangeLog?

Re. the gtkmm 2.4 build: Did you run autogen.sh again?

Comment 21 Ole Laursen 2003-03-21 21:20:38 UTC
Ehrm, the following is in the gtkmm 2.2 ChangeLog:
 
2003-03-15  Murray Cumming  <murrayc@usa.net>
 
        * Makefile.am: Added examples to SUBDIRS so that they are
        installed by default and because I would like to make sure they
        always build. This significantly adds to the build time.
 
I somehow assumed this should be in 2.4, but I may be completely
wrong. Feel free to ignore me.

Regarding the build issue: yes, everytime I try, this happens:

ole:~/cvs/gtkmm$ ./autogen.sh
Found GNU make at /usr/bin/make... good.
Adding libtools.
Building macros.
Building makefiles.
atk/atkmm/Makefile.am:33: variable `win32_dlls_extra_libs' not defined
gdk/gdkmm/Makefile.am:32: variable `win32_dlls_extra_libs' not defined
gtk/gtkmm/Makefile.am:35: variable `win32_dlls_extra_libs' not defined
pango/pangomm/Makefile.am:32: variable `win32_dlls_extra_libs' not defined
ole:~/cvs/gtkmm$

(Cc'ing myself, I really should have done that with the other bugs too.)
Comment 22 Murray Cumming 2003-03-22 21:07:54 UTC
I think this entry covers 2 combined gtkmm 2.2 entries, but thanks for
being vigilant:

2003-03-18  Cedric Gustin  <cgustin@ibelgique.com>
   
        * Makefile.am : removed examples from DIST_SUBDIRS
  
2003-03-18  Enrico Scholz  <enrico.scholz@informatik.tu-chemnitz.de>
  
        * examples/Makefile.am_fragment:  Added DESTDIR-support.


This has been applied to glibmm 2.4 and gtkmm 2.4.

The autogen works for me. Maybe it's a problem with your autotools or
maybe it will show up for other people later. Thanks.
Comment 23 Spundun Bhatt 2003-06-28 05:38:09 UTC
The autogen.sh problem happens with me too. 
I checked out cvs head(or whatever its called that you checkout with
cvs -z3 co gtkmm). 
gtkmm]# ./autogen.sh
which: no gnumake in
(/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin)
Found GNU make at /usr/bin/gmake... good.
Adding libtools.
Building macros.
Building makefiles.
atk/atkmm/Makefile.am:33: variable `win32_dlls_extra_libs' not defined
gdk/gdkmm/Makefile.am:32: variable `win32_dlls_extra_libs' not defined
gtk/gtkmm/Makefile.am:35: variable `win32_dlls_extra_libs' not defined
pango/pangomm/Makefile.am:32: variable `win32_dlls_extra_libs' not defined

May be somebody should create separate bug about this? hth
Comment 24 Spundun Bhatt 2003-06-28 17:56:15 UTC
actually changing automake from 1.4-p6 to 1.7.2 fixed that problem