diff --git a/Makefile.am b/Makefile.am index 2a003a21a8..b146aae57e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,10 +10,10 @@ ACLOCAL_AMFLAGS = -I ./config SUBDIRS = src include if HWLOC_BUILD_STANDALONE SUBDIRS += utils tests -if HWLOC_BUILD_DOXYGEN +# We need doc/ if HWLOC_BUILD_DOXYGEN, or during make install if HWLOC_INSTALL_DOXYGEN. +# There's no INSTALL_SUBDIRS, so always enter doc/ and check HWLOC_BUILD/INSTALL_DOXYGEN there SUBDIRS += doc endif -endif # Do not let automake automatically add the non-standalone dirs to the # distribution tarball if we're building in embedded mode. diff --git a/doc/Makefile.am b/doc/Makefile.am index 9380bb8b10..5d2fda3011 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -84,6 +84,7 @@ dox_inputs = $(DOX_CONFIG) \ # building standalone. # +if HWLOC_BUILD_DOXYGEN BUILT_SOURCES = $(BUILT_IMAGES) images/diagram.png: $(srcdir)/images/diagram.fig @@ -101,6 +102,7 @@ images/diagram.eps: $(srcdir)/images/diagram.fig exit 1; \ fi $(FIG2DEV) -L eps $< $@ +endif # # Rules for running doxygen. It depends on the built images and the @@ -109,6 +111,7 @@ images/diagram.eps: $(srcdir)/images/diagram.fig # of nested structurre/union declarations. # +if HWLOC_BUILD_DOXYGEN $(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES) rm -fr $(DOX_DIR) $(DOXYGEN) $(DOX_CONFIG) @@ -139,11 +142,14 @@ $(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES) @mv $(DOX_MAN_DIR)/man3/hwloc* $(DOX_MAN_DIR)/man3/HWLOC* $(DOX_DIR)/man.tmp/ @rm -rf $(DOX_MAN_DIR)/man3 @mv $(DOX_DIR)/man.tmp $(DOX_MAN_DIR)/man3 +endif # # Rules for building the PDF # +if HWLOC_BUILD_DOXYGEN + # The Doxygen config is set to generate a4 latex -- no transformation # is necessary. $(DOX_A4PDF): $(DOX_TAG) @@ -183,6 +189,7 @@ $(DOX_LETTERPDF): $(DOX_TAG) fi; \ done; \ mv letter-refman.pdf $(DOCDIR)/$(DOX_LETTERPDF) +endif # # Note that we want to use our own doxygen.css file; not the one that @@ -195,10 +202,12 @@ $(DOX_LETTERPDF): $(DOX_TAG) # pre-bundled in a tarball). # +if HWLOC_BUILD_DOXYGEN all-local: $(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 # # Un/install the generated PDF and man pages (just like BUILD_DOXYGEN, @@ -660,9 +669,11 @@ man3_openfabrics_DATA = \ $(DOX_MAN_DIR)/man3/hwloc_ibv_get_device_cpuset.3 \ $(DOX_MAN_DIR)/man3/hwloc_ibv_get_device_osdev_by_name.3 -# end of manpages(3) if HWLOC_INSTALL_DOXYGEN +# end of manpages(3) if HWLOC_BUILD_DOXYGEN endif +if HWLOC_BUILD_DOXYGEN + # Put in these rules to force the generation of the man pages and get # all the dependencies right. Additionally, this forces a # serialization during parallel builds (e.g., "make -j X") to ensure @@ -717,6 +728,7 @@ $(DOX_MAN_DIR): $(DOX_TAG) # built at the same time during a parallel build (e.g., "make -j X"). # So arbitrarily make the A4 PDF dependent upon the Letter PDF. $(DOX_A4PDF): $(DOX_TAG) $(DOX_LETTERPDF) +endif # # Make sure that the documentation example works