Skip to contentSkip to conversation

more fixes for out of tree builds

PATCH Marco d'Itri 5 participants 10 messages Nov 9, 2009 – Nov 10, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

These are needed to support out of tree builds, but I do not know the correct way to properly fix the bugs in Makefile.am.

Signature · 2 lines
ciao,
Marco
extras/gudev/docs/Makefile.in +1 -0
@@ -300,6 +300,7 @@ GPATH = $(srcdir)
 TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
 
 # This includes the standard gtk-doc make rules, copied by gtkdocize.
+srcdir := $(builddir)
 
 # Other files to distribute
 # e.g. EXTRA_DIST += version.xml.in
libudev/docs/Makefile.in +1 -0
@@ -292,6 +292,7 @@ GPATH = $(srcdir)
 TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
 
 # This includes the standard gtk-doc make rules, copied by gtkdocize.
+srcdir := $(builddir)
 
 # Other files to distribute
 # e.g. EXTRA_DIST += version.xml.in
Makefile.in +1 -0
@@ -2912,6 +2912,7 @@ install-data-local:
 @ENABLE_EXTRAS_TRUE@	ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck
 
 @ENABLE_EXTRAS_TRUE@extras/keymap/keys.txt: /usr/include/linux/input.h
+@ENABLE_EXTRAS_TRUE@	@$(MKDIR_P) extras/keymap
 @ENABLE_EXTRAS_TRUE@	$(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
 
 @ENABLE_EXTRAS_TRUE@extras/keymap/keys-from-name.gperf: extras/keymap/keys.txt
#1 lore raw
Quoted 1 line · Marco d'Itri

These are needed to support out of tree builds,

Why isn't "make distcheck" failing then?

Quoted 2 lines

but I do not know the
correct way to properly fix the bugs in Makefile.am.

Hmm, that looks a bit too weird, doesn't it?

Quoted 1 line

+srcdir := $(builddir)

Thanks,
Kay

#2 lore raw
In reply to Marco d'Itri
Quoted 2 lines · Marco d'Itri

These are needed to support out of tree builds, but I do not know the correct way to properly fix the bugs in Makefile.am.

Find the part in Makefile.am that declares the keys.txt rule and add the line? It should like exactly the line you patched without the leading @SOME_AM_CONDITIONAL@ markers.

--
Dan

#3 lore raw
In reply to Marco d'Itri
Quoted 3 lines · Kay Sievers
Quoted 1 line · Marco d'Itri

These are needed to support out of tree builds,

Why isn't "make distcheck" failing then?

Did you try it with a read only source tree?

Quoted 2 lines

Hmm, that looks a bit too weird, doesn't it?

Quoted 1 line

+srcdir := $(builddir)

Maybe, but without something like that the building process will create files in the source tree.
Ubuntu uses a similar workaround, this is a known gtk-doc bug.

Signature · 2 lines
ciao,
Marco
#4 lore raw
In reply to Marco d'Itri
Quoted 10 lines · Marco d'Itri

These are needed to support out of tree builds, but I do not know the correct way to properly fix the bugs in Makefile.am.

Signature · 2 lines
ciao,
Marco

extras/gudev/docs/Makefile.in GPATH = $(srcdir) · line 303

Quoted 4 lines
extras/gudev/docs/Makefile.in +1 -0
@@ -300,6 +300,7 @@ GPATH = $(srcdir)
 TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
 
 # This includes the standard gtk-doc make rules, copied by gtkdocize.
+srcdir := $(builddir)

From my point of view gtk-doc.make is broken by design for people who need to support out-of-tree builds and who don't want to store generated stuff (docs/{tmpl,xml,html}) in the source code repository.

I have spent one evening to fix gtk-doc.make for util-linux-ng, see
http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commitdiff;hä2b25eb1536697ba283772f5452e7495cb4024b;hp•9ac815b67a43f9b5f70a1dc294d2cf3a61fc2c

.. it's not perfect, but works for me.

Karel

Signature · 1 line
 Karel Zak  <[email protected]>
#5 lore raw
In reply to Marco d'Itri
Quoted 6 lines · Marco d'Itri
Quoted 3 lines · Kay Sievers
Quoted 1 line · Marco d'Itri

These are needed to support out of tree builds,

Why isn't "make distcheck" failing then?

Did you try it with a read only source tree?

Yes, be careful with "make distcheck", it does not check for all problems. Don't forget that "make distcheck" works with source code from tarball and for example gtk-doc by default add many generated files to the tarball. The best test is:

git clean -xfd
./autogen.sh
mkdir -p ../build
cd ../build
./configure
make

.. and try "ls -la ../udev/libudev/docs/ | wc -l" before and after the make command :-)

Quoted 5 lines
Quoted 2 lines

Hmm, that looks a bit too weird, doesn't it?

Quoted 1 line

+srcdir := $(builddir)

Maybe, but without something like that the building process will create files in the source tree.
Ubuntu uses a similar workaround, this is a known gtk-doc bug.

:-(

The number of non-gtk libraries is slowly growing. It would be nice to found a real solution... fix gtk-doc or found something better than gtk-doc.

Karel

Signature · 1 line
 Karel Zak  <[email protected]>
#6 lore raw
In reply to Marco d'Itri
Quoted 20 lines · Karel Zak
Quoted 6 lines · Marco d'Itri
Quoted 3 lines · Kay Sievers
Quoted 1 line · Marco d'Itri

These are needed to support out of tree builds,

Why isn't "make distcheck" failing then?

Did you try it with a read only source tree?

 Yes, be careful with "make distcheck", it does not check for all problems. Don't forget that "make distcheck" works with source code from tarball and for example gtk-doc by default add many generated files to the tarball. The best test is:

   git clean -xfd
   ./autogen.sh
   mkdir -p ../build
   cd ../build
   ./configure
   make

Quoted 2 lines

 .. and try "ls -la ../udev/libudev/docs/ | wc -l" before and after the make command :-)

Yeah, I guess, that stuff is supposed to get DIST'd in the tarball, and should usually not be touched there during build. Running split builds directly from the git tree might not make much sense with gtk-doc.

Quoted 11 lines
Quoted 5 lines
Quoted 2 lines

Hmm, that looks a bit too weird, doesn't it?

Quoted 1 line

+srcdir := $(builddir)

Maybe, but without something like that the building process will create files in the source tree.
Ubuntu uses a similar workaround, this is a known gtk-doc bug.

 :-(

 The number of non-gtk libraries is slowly growing. It would be nice to found a real solution... fix gtk-doc or found something better than gtk-doc.

Yeah, there is a lot of stuff that would be nice to see fixed, also many of the warnings of the generated code and the over-verbose output during the build.

Kay

#7 lore raw
In reply to Marco d'Itri

Karel Zak [2009-11-09 23:43 +0100]:

Quoted 2 lines

need to support out-of-tree builds and who don't want to store generated stuff (docs/{tmpl,xml,html}) in the source code repository.

Well, not quite "by design", but gtk-doc.make is indeed broken for this. The Ubuntu package does

          # fix gtk-doc breakage with separate build tree
          sed -i 's/srcdir/builddir/g' gtk-doc.make

before autoreconf, which does the trick.

Please also see

https://bugzilla.gnome.org/show_bug.cgi?idH5806

Martin

Signature · 3 lines
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org
#8 lore raw
In reply to Marco d'Itri
Quoted 6 lines · Martin Pitt

Karel Zak [2009-11-09 23:43 +0100]:

Quoted 2 lines

need to support out-of-tree builds and who don't want to store generated stuff (docs/{tmpl,xml,html}) in the source code repository.

Well, not quite "by design", but gtk-doc.make is indeed broken for this. The Ubuntu package does

I don't think so. For example gtkdoc-scan assumes all files in the output directory (see /usr/bin/gtkdoc-scan, lines 100-110). This is problem, because for example sections are defined in the $(srcdir)/$(DOC_MODULE)-sections.txt.

Quoted 2 lines
          # fix gtk-doc breakage with separate build tree
          sed -i 's/srcdir/builddir/g' gtk-doc.make

Is it correct? All your setting in $(srcdir) (for example lits of sections, some extra xml files, ...) will be invisible for gtk-doc.

Quoted 5 lines

before autoreconf, which does the trick.

Please also see

https://bugzilla.gnome.org/show_bug.cgi?idH5806

pretty old bug, it seems we all depend on unmaintained tool :-(

Karel

Signature · 1 line
 Karel Zak  <[email protected]>
#9 lore raw
In reply to Marco d'Itri

Karel Zak [2009-11-10 11:36 +0100]:

Quoted 5 lines
Quoted 2 lines
          # fix gtk-doc breakage with separate build tree
          sed -i 's/srcdir/builddir/g' gtk-doc.make

Is it correct? All your setting in $(srcdir) (for example lits of sections, some extra xml files, ...) will be invisible for gtk-doc.

Oh, I just got it to build, and the generated HTML looks reasonable, so I stopped fiddling with it at that point and just made sure that there was an upstream bug report. I'm by no way a gtc-doc expert.

Quoted 3 lines
Quoted 1 line

https://bugzilla.gnome.org/show_bug.cgi?idH5806

pretty old bug, it seems we all depend on unmaintained tool :-(

Unfortunately..

Martin

Signature · 2 lines
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)