]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
Fix make dist during make distcheck
authorBrice Goglin <Brice.Goglin@inria.fr>
Wed, 22 Jan 2014 15:22:57 +0000 (16:22 +0100)
committerBrice Goglin <Brice.Goglin@inria.fr>
Wed, 22 Jan 2014 16:17:42 +0000 (17:17 +0100)
It wants to generate doxygen docs, but it doesn't by default
since it builds from a tarball. Force --enable-doxygen to fix that.

By the way, no need to double-check that doc/readme were generated
before building the tarball. config/distscript.csh is called on dist
and it does things as expected.

Also add a better error message when make dist fails because
PDFs do not exist yet, and doxygen isn't available.

Ideally, we'd just remove distscript.csh to make things much simpler
but I don't want to break more things today.

Makefile.am
doc/Makefile.am

index 5e669991b964b6cd4d5c3885f4a21b32195e877d..119c1e9778d8a19a3a4bd5757d8253dd5be42c93 100644 (file)
@@ -42,29 +42,11 @@ EXTRA_DIST = \
         config/distscript.csh
 
 if HWLOC_BUILD_STANDALONE
-#
-# Double check that we generated both the doxygen docs and a new copy
-# of the top-level README file.
-#
-cannot-dist:
-       @echo "ERROR: Did not build both of the doxygen docs and README."
-       @echo "ERROR: This tarball is not complete!"
-       @echo "ERROR: Cowardly refusing to complete successfully..."
-       @exit 1
-
-# Refuse to make dist if we can't make the doxygen stuff (note that
-# BUILD_DOXYGEN will automatically be false if we're not building
-# standalone).
-if !HWLOC_BUILD_DOXYGEN
-dist-hook: cannot-dist
-else
-if !HWLOC_BUILD_README
-dist-hook: cannot-dist
-else
 dist-hook:
        csh "$(top_srcdir)/config/distscript.csh" "$(top_srcdir)" "$(distdir)" "$(HWLOC_VERSION)"
-endif HWLOC_BUILD_README
-endif HWLOC_BUILD_DOXYGEN
+
+# make sure configure/make-dist during distcheck gets doxygen force-enabled
+AM_DISTCHECK_CONFIGURE_FLAGS = --enable-doxygen
 endif HWLOC_BUILD_STANDALONE
 
 #
index 9bfee66b2e846a61e16c87316ef1f05ebba8b378..e7a5954084059105e2fee463c256b8d8d4d1d84e 100644 (file)
@@ -201,6 +201,13 @@ $(DOX_LETTERPDF): $(DOX_TAG)
           fi; \
        done; \
        mv letter-refman.pdf $(DOCDIR)/$(DOX_LETTERPDF)
+
+else
+$(DOX_A4PDF) $(DOX_LETTERPDF): no-build-pdfs
+no-build-pdfs:
+       @echo "ERROR: You do not have the 'doxygen' executable (or any related dependency) to build the PDF docs."
+       @echo "ERROR: Cannot continue."
+       @exit 1
 endif
 
 #