Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix out-of-tree builds and distcheck #282

Merged
merged 2 commits into from
Jun 18, 2015
Merged

Conversation

martinpitt
Copy link
Contributor

Fix out-of-tree builds and distcheck when Python is enabled. (Issue #215)

zonque and others added 2 commits June 18, 2015 08:20
When calling the build commands from another directory than the toplevel:

  mkdir build
  cd build
  ../configure [...]

... the compilation fails with the following error:

 GEN      man/systemd.directives.xml
Traceback (most recent call last):
  File "../tools/make-directive-index.py", line 313, in make_page
    _extract_directives(directive_groups, formatting, page)
  File "../tools/make-directive-index.py", line 191, in _extract_directives
    t = xml_parse(page)
  File "/home/martin/upstream/systemd/tools/xml_helper.py", line 30, in xml_parse
    doc = tree.parse(page, _parser)
  File "lxml.etree.pyx", line 3301, in lxml.etree.parse (src/lxml/lxml.etree.c:72453)
  File "parser.pxi", line 1791, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:105915)
  File "parser.pxi", line 1817, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:106214)
  File "parser.pxi", line 1721, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:105213)
  File "parser.pxi", line 1122, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:100163)
  File "parser.pxi", line 580, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:94286)
  File "parser.pxi", line 690, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:95722)
  File "parser.pxi", line 618, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:94754)
OSError: Error reading file 'man/bootup.xml': failed to load external entity "man/bootup.xml"

That is because the file names in the XML_FILES array are not relative
to $(top_srcdir), and hence ../tools/make-directive-index.py is called
with non-existant arguments.

To fix this, call patsubst when generating SOURCE_XML_FILES from
NON_INDEX_XML_FILES.
It depends on man/custom-entities.ent which is (and needs to be) a built file,
so we need to always build man/systemd.directives.xml as well.

We also need to drop this from update-man-list so that it doesn't get disted
from Makefile-man.am.

Fixes distcheck failure.

systemd#215
@zonque
Copy link
Member

zonque commented Jun 18, 2015

Yeah, after more thinking, I'd say this is correct. Long term, we should kill all the dist'ing of man pages, because shipping static files that are partly generated at configure time is plain stupid. but let's keep that for later.

zonque added a commit that referenced this pull request Jun 18, 2015
Fix out-of-tree builds and distcheck
@zonque zonque merged commit 5617dde into systemd:master Jun 18, 2015
@keszybz keszybz mentioned this pull request Jun 30, 2015
keszybz added a commit that referenced this pull request Jul 2, 2015
Update Makefile-man.am after recent changes and fix regeneration of Makefile-man.am
Fixes fallout from #282.
tblume pushed a commit to tblume/systemd-testsuite-suse that referenced this pull request Mar 8, 2016
Update Makefile-man.am after recent changes and fix regeneration of Makefile-man.am
Fixes fallout from systemd/systemd#282.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants