Skip to content

Commit

Permalink
Fix doc install when standalone but not buildin...
Browse files Browse the repository at this point in the history
Fix doc install when standalone but not building the doc

We still need to enter doc/ during make install (if standalone),
even if building doc is disabled.

So always enter doc/ (if standalone) and check in there what to
do depending on whether HWLOC_BUILD_DOXYGEN and/or HWLOC_INSTALL_DOXYGEN
are set.

Ideally, we would only enter doc/ if HWLOC_BUILD_DOXYGEN,
or doing if make install with HWLOC_INSTALL_DOXYGEN,
but that's not easy to do.

This reverts:
r4676:
  Stop protecting things with HWLOC_BUILD_DOXYGEN (almost)
r4686:
  We don't enter doc/ unless standalone, but the reverse isn't true
  (doc can be disabled in standalone). So make sure we only enter
  doc/ when standalone and doc is enabled.

We're back to what we did in v1.5.

This commit was SVN r5045.

The following SVN revision numbers were found above:
  r4676 --> dcabb1a
  r4686 --> 5389d21
  • Loading branch information
bgoglin committed Nov 12, 2012
1 parent bb8d962 commit 329ace4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 13 additions & 1 deletion doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 329ace4

Please sign in to comment.