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 99283 - should improve example Makefile.am
should improve example Makefile.am
Status: RESOLVED DUPLICATE of bug 124438
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on: 52458 81353
Blocks:
 
 
Reported: 2002-11-22 16:28 UTC by Sven Neumann
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sven Neumann 2002-11-22 16:28:34 UTC
The example Makefile.am that comes with gtk-doc has some major flaws that
aren't that easy to fix. I'd suggest a complete rewrite...

To understand why I'm saying this, try to generate a dist tarball in a
project that uses a Makefile.am based on the example. If you do this with
automake >= 1.6, you'll notice that it fails for a couple of reasons.
First, the example Makefile.am has some install hooks but it is missing
uninstall targets for these. 'make dist' will complain that not all
installed files are removed when people use 'make uninstall'. This is
rather annoying and should definitely be fixed. Here are the lines I added
in The GIMP:

uninstall-local:
        (installfiles=`echo $(srcdir)/html/*`; \
        for i in $$installfiles; do \
          rm -f $(DESTDIR)$(TARGET_DIR)/`basename $$i`; \
        done; \
        rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml)


After this change, make dist proceeds but fails later since the rules from
the example Makefile try to generate files in the source tree which is
read-only if you use automake >= 1.6. This should probably be fixed as well.
Comment 1 Matthias Clasen 2002-11-26 10:24:38 UTC
Adding some bugs which are also about standard Makefile deficiencies
as 
dependencies.
Comment 2 Jan Kratochvil 2003-01-29 08:29:23 UTC
Some own patches; they have some drawbacks, just to give pinpoints to additional bugs/misfeatures:
# s/EXTRA_DIST =/EXTRA_DIST +=/
# s/tmpl-build.stamp:/tmpl-build.stamp $(srcdir)/tmpl/*.sgml:/
#       Prevent: No rule to make target `tmpl/*.sgml', needed by `sgml-build.stamp'.  Stop.
#       Fixes gtk-doc-0.9/setting-up.txt/:
#               (Note that due to make being awkward the build
#               may fail the first time, but if you run make again it should work.)
# s/gtkdoc-scanobj/gtkdoc-scangobj/
#       Note that if your project is targeted at GTK+ 2.0 rather
#       than GTK+ 1.2.x, then you will have to change it so it
#       runs gtkdoc-scangobj rather than gtkdoc-scanobj.
# s/: scan-build.stamp/ $(DOC_MODULE)-sections.txt &/
#       Prevent: No rule to make target `$(DOC_MODULE)-sections.txt', needed by `distdir'.  Stop.
# s/gtkdoc-scan --module=/rm -f $(SCANOBJ_FILES) \&\& &/
#       Do not forget to rebuild some files.

# Create sgml/sgml/ to satisfy sgml/-based includes from sgml/MODULE-doc.top
# Prevent: sgml.stamp defined both conditionally and unconditionally
if ENABLE_GTK_DOC
sgml.stamp: sgml/sgml
sgml/sgml:
        @$(LN_S) ./ $@
endif
Comment 3 James Henstridge 2003-02-12 15:10:38 UTC
The new template makefile I am working on (gtk-doc.make in CVS), I
have added the extra distclean and uninstall rules.  I have a work
around for the readonly source dir (chmod u+w), but it would be good
to work out a real solution.

With the new setup, it will be possible to have a short makefile in
your module that includes the common part, so you don't need to
maintain the common section.
Comment 4 Damon Chaplin 2004-02-15 15:42:07 UTC

*** This bug has been marked as a duplicate of 124438 ***