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 409060 - Hardcodes OMF files location to be below $(srcdir) / Does not permit out of tree builds with .omf.in files
Hardcodes OMF files location to be below $(srcdir) / Does not permit out of t...
Status: RESOLVED FIXED
Product: gnome-common
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Gnome Common Maintainer(s)
Gnome Common Maintainer(s)
: 505534 (view as bug list)
Depends on:
Blocks: 315320 414139
 
 
Reported: 2007-02-17 20:43 UTC by Loïc Minier
Modified: 2012-08-01 22:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix out of tree builds of generated files with omf.make (858 bytes, patch)
2007-02-17 20:44 UTC, Loïc Minier
none Details | Review
Fix out of tree builds of generated files with omf.make (take 2) (1.11 KB, patch)
2007-02-19 20:10 UTC, Loïc Minier
committed Details | Review

Description Loïc Minier 2007-02-17 20:43:06 UTC
Hi,

omf.make hardcodes $(srcdir) in the path to omf files; this prevents building modules such as gtk-doc out-of-tree (builddir != srcdir) because the OMF files are AC_SUBSTed to set the @VERSION@.

(See bug 315320 for this particular build failure of gtk-doc.)

I'm going to attach a patch trying to scrollkeeper-preinstall files in the current builddir (.) and falling back to $(srcdir) when these are missing.

Bye,
Comment 1 Loïc Minier 2007-02-17 20:44:08 UTC
Created attachment 82754 [details] [review]
Fix out of tree builds of generated files with omf.make
Comment 2 Loïc Minier 2007-02-19 20:10:21 UTC
Created attachment 82909 [details] [review]
Fix out of tree builds of generated files with omf.make (take 2)

Hmm, there was a missing ";" in the first patch; here's a fixed patch which also fixes another instance of a similar problem which I discovered when building gnome-panel.
Comment 3 Christian Persch 2007-06-08 21:31:06 UTC
 omf_timestamp: $(omffile)
 	-for file in $(omffile); do \
-	  scrollkeeper-preinstall $(docdir)/$(docname).xml $(srcdir)/$$file $$file.out; \
+	  absfile=$(srcdir)/$$file; \
+	  test -r $$file && absfile=$$file; \
+	  scrollkeeper-preinstall $(docdir)/$(docname).xml $$absfile $$file.out; \
 	done; \

Couldn't that be done more simply by

for file in $^; do \
  scrollkeeper-preinstall $(docdir)/$(docname).xml $$file $$file.out; \
done

(and the same on install-data-hook-omf ) ?
Comment 4 Loïc Minier 2007-06-08 22:00:53 UTC
(In reply to comment #3)
> for file in $^; do \
>   scrollkeeper-preinstall $(docdir)/$(docname).xml $$file $$file.out; \
> done

It's easier to read for sure!  The two questions I see are:
- Would $file be correctly located both when in srcdir and when in builddir?
- Is $^ a GNU Make extension?
Comment 5 Christian Persch 2007-06-08 22:22:53 UTC
I haven't actually tested this :) but I think it will work correctly wherever the srcdir is. Does $$file.out need the whole path, or just the basename ? 

The make info documentation doesn't say anything about $^ being a GNU extension, but and a quick google search didn't reveal anything either...
Comment 6 Loïc Minier 2007-06-08 22:29:03 UTC
(In reply to comment #5)
> I haven't actually tested this :) but I think it will work correctly wherever
> the srcdir is. Does $$file.out need the whole path, or just the basename ? 

I think $file.out should always be from basename since it must be in builddir.
Comment 7 Christian Persch 2007-06-08 23:07:14 UTC
It could use $$(basename $$file).out then (not sure about the $-quoting). Care to try? :)
Comment 8 Kjartan Maraas 2007-10-03 10:56:20 UTC
Loïc, did you have a chance to try this?
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2008-03-20 12:48:34 UTC
*** Bug 505534 has been marked as a duplicate of this bug. ***
Comment 10 David King 2012-08-01 22:17:01 UTC
Comment on attachment 82909 [details] [review]
Fix out of tree builds of generated files with omf.make (take 2)

Pushed to master as commit 960b1bde8d156f61340500a260402264c5320603, thanks.