GNOME Bugzilla – Bug 655350
[PATCH] Use srcdir to find C/ pages
Last modified: 2013-07-13 16:18:08 UTC
Created attachment 192670 [details] [review] Proposed patch During a distcheck (or any time builddir != srcdir), yelp.m4 doesn't correctly find the C/ pages. I believe the attached patch fixes that.
I've never had any problems building with builddir != srcdir, and I run distcheck with the current code all the time. In the rule for $(_HELP_LC_FILES), this line is supposed to take care of this: if test -f "C/$(notdir [$]@)"; then d="../"; else d="$(abs_srcdir)/"; fi; That is, if the file exists in the builddir, use it. Otherwise, read the files from $(abs_srcdir). This supports the case where you actually generate your page files. (It occurs to me now, though, that this might not work right when you have a mix of generated and static files. That's a separate problem that will require more work.) What kinds of errors are you getting when you use a builddir? I just built gnome-user-docs inside a builddir, and everything worked correctly. I need to reproduce the problem before I can take action.
I get the following when I distcheck my project, deja-dup: make[3]: Entering directory `/home/mike/Code/deja-dup/20/deja-dup-19.92/_build/help' GEN deja-dup-help.pot I/O warning : failed to load external entity "C/backup-auto.page" Traceback (most recent call last):
+ Trace 228459
doc = Document(filename, messages)
ctxt = libxml2.createFileParserCtxt(filename)
if ret is None:raise parserError('xmlCreateFileParserCtxt() failed')
make[3]: *** [deja-dup-help.pot] Error 1 make[3]: Leaving directory `/home/mike/Code/deja-dup/20/deja-dup-19.92/_build/help' make[2]: *** [update-pot] Error 2 make[2]: Leaving directory `/home/mike/Code/deja-dup/20/deja-dup-19.92/_build' make[1]: *** [distdir] Error 2 make[1]: Leaving directory `/home/mike/Code/deja-dup/20/deja-dup-19.92/_build' make: *** [distcheck] Error 1 Using my patch (and re-autogening) fixes this for me. (Also, distcheck failed if I didn't add DISTCLEANFILES=deja-dup-help.pot, which maybe yelp.m4 should do automatically.) You can test this yourself with the deja-dup module in jhbuild.
Created attachment 227781 [details] [review] Fix make pot I finally got around to figuring out why it works for you but not me. Because I was running make pot as part of a dist-hook. The pot target did not have support for srcdir != builddir. So here's a patch to add that.
That's not quite right. $(AM_V_GEN) shouldn't be put after a line continuation like that, and $(_HELP_LC_VERBOSE) is only meant for outputting a message for building the various lang directories. Actual code modifications look right though. Fixed and committed.