]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
doc: further simplify doc/Makefile.am
authorBrice Goglin <Brice.Goglin@inria.fr>
Fri, 24 Jan 2014 09:40:31 +0000 (10:40 +0100)
committerBrice Goglin <Brice.Goglin@inria.fr>
Fri, 24 Jan 2014 11:06:15 +0000 (12:06 +0100)
When doxygen and readme are buildable, we always build them.
When not, we just do nothing and let config/distscript.csh fail later.

Makefile.am
doc/Makefile.am

index 45915252d11288734df10720c0b6be483fea0e45..0a7f3964ba43b0e8afcc42855829cd4f00a6a13a 100644 (file)
@@ -47,13 +47,12 @@ dist-hook:
 endif HWLOC_BUILD_STANDALONE
 
 #
-# Build the top-level README file
+# Build the documenation and top-level README file
 #
-
 if HWLOC_BUILD_STANDALONE
 .PHONY: doc readme
 doc readme:
-       $(MAKE) -C doc readme
+       $(MAKE) -C doc
 endif HWLOC_BUILD_STANDALONE
 
 if HWLOC_BUILD_STANDALONE
index 32ce5d0e3072a46e2bf579a8d9f3f942ec25a1a9..3290c9186d5d0647710726ef1df40f74e05e6e26 100644 (file)
@@ -208,12 +208,21 @@ $(DOX_LETTERPDF): $(DOX_TAG)
 # pre-bundled in a tarball).
 #
 
-all-local: $(DOX_TAG)
+all-local-html: $(DOX_TAG)
        if test -d $(DOX_HTML_DIR) -a -f $(DOX_HTML_DIR)/doxygen.css; then \
            cp -f $(srcdir)/doxygen.css $(DOX_HTML_DIR); \
        fi
 
-endif HWLOC_BUILD_DOXYGEN
+doc: $(DOX_TAG)
+
+else !HWLOC_BUILD_DOXYGEN
+
+# When we don't have doxygen, nothing to do
+all-local-html:
+doc:
+
+endif !HWLOC_BUILD_DOXYGEN
+# there are also a bunch of doxygen-build-dependencies later in this file
 
 
 
@@ -798,6 +807,8 @@ MAINTAINERCLEANFILES = $(DOX_TAG) \
     $(DOX_LETTERPDF) \
     $(DOX_HTML_README)
 
+if HWLOC_BUILD_README
+
 #
 # Rules for creating the top-level README file.  There does not appear
 # to be an easy way to know if AC_PATH_PROG found something in
@@ -807,21 +818,19 @@ MAINTAINERCLEANFILES = $(DOX_TAG) \
 # Just like BUILD_DOXYGEN, BUILD_README will automatically be false if
 # we're not building standalone.
 #
-
-if HWLOC_BUILD_README
-doc readme: all $(HWLOC_top_srcdir)/README
+readme: $(HWLOC_top_srcdir)/README
 $(HWLOC_top_srcdir)/README: $(DOX_HTML_README)
        LC_ALL=C $(HWLOC_W3_GENERATOR) $(DOX_HTML_README) | $(SED) -n -e 's/^   //' -e '/^Introduction$$/,$$p' > $@
        rm -f $(DOX_HTML_README)
 $(DOX_HTML_README): $(DOX_HTML_DIR)
-       rm -f $@
+       rm $@
        sed -n -f $(srcdir)/README.sed $(DOX_HTML_DIR)/index.html > $@
+
 else
-doc readme: no-build-readme
-$(HWLOC_top_srcdir)/README: no-build-readme
 
-no-build-readme:
-       @echo "ERROR: You do not have the 'w3m' or 'lynx' executables to build the README, or do not have the 'doxygen' executable to build the docs."
-       @echo "ERROR: Cannot continue."
-       @exit 1
+# When we don't have what's needed to build the README, nothing to do
+readme: doc
+
 endif
+
+all-local: doc readme all-local-html