diff options
| author | Thomas Haller <thaller@redhat.com> | 2020-06-02 17:47:30 +0200 |
|---|---|---|
| committer | Thomas Haller <thaller@redhat.com> | 2020-06-11 10:53:49 +0200 |
| commit | 7682e76de5e0c8d12867fc95a92150c1318775b8 (patch) | |
| tree | 4a9cf1666d7929a98cddcf80124d4ae68b778098 /docs | |
| parent | 2f78a824d885e1aaced6bc48128ce2e57461d3cd (diff) | |
| download | NetworkManager-7682e76de5e0c8d12867fc95a92150c1318775b8.tar.gz | |
docs: fix dependency of "nm-settings*xml" to "common.ent"
"man/nm-settings%.xml" really should depend on "common.ent".
The reason is that XSL files like "man/nm-settings.xsl" include
"common.ent".
The previous code already tried to express that, but for some
reasons this dependency was not honored. Fix that.
However, that uncovers another problem with gtk-doc.make. If we do
that without the workaround for "docs/api/Makefile.am", then
$ ./autogen.sh && make V=1 SHELL='sh -x' distcheck
breaks.
The reason is not clear to me. The new dependency leads to rebuild
"man/nm-settings-keyfile.xml". But that is worse, somehow the file
"$(top_srcdir)/man/nm-settings-keyfile.xml" ends up being read-only.
Afterwards, gtk-doc.make does
setup-build.stamp:
-$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ;
then \
files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
if test "x$$files" != "x" ; then \
for file in $$files ; do \
destdir=`dirname $(abs_builddir)/$$file`; \
test -d "$$destdir" || mkdir -p "$$destdir"; \
test -f $(abs_srcdir)/$$file && \
cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true;
\
done; \
fi; \
fi
$(AM_V_at)touch setup-build.stamp
so that the files in build dir are also read-only. Then, make distcheck
goes ahead and builds the files once again, which fails.
You are welcome to understand why this workaround is necessary. Please
then create a better fix.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api/Makefile.am | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am index 44933bc980..376cf613a0 100644 --- a/docs/api/Makefile.am +++ b/docs/api/Makefile.am @@ -8,7 +8,7 @@ GENERATED_FILES = if BUILD_DOCS settings-spec.xml: settings-spec.xsl $(top_builddir)/libnm/nm-settings-docs.xml - $(AM_V_GEN) xsltproc --output $@ $^ + $(AM_V_GEN) (! test -f $@ || chmod u+w $@) && xsltproc --output $@ $^ # Top-level SGML file includes (depends on) settings-spec.xml $(DOC_MAIN_SGML_FILE): settings-spec.xml @@ -104,6 +104,25 @@ endif include $(top_srcdir)/gtk-doc.make +# workaround setup-build.stamp from gtk-doc.make, which copies +# the file as read-only. That breaks later build steps, as the +# file can no longer be written. Instead, copy the file with `cp -f` +# only. +setup-build.stamp: + -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file`; \ + test -d "$$destdir" || mkdir -p "$$destdir"; \ + test -f $(abs_srcdir)/$$file && \ + ( cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file ; \ + chmod u+w $(abs_builddir)/$$file ) || true; \ + done; \ + fi; \ + fi + $(AM_V_at)touch setup-build.stamp + #################################### EXTRA_DIST += version.xml.in settings-spec.xsl meson.build $(GENERATED_FILES) |
