From 7b59dcb8b809c638967474f0ff010b81c68f2500 Mon Sep 17 00:00:00 2001 From: tqchen Date: Fri, 21 Aug 2015 07:59:06 -0700 Subject: [PATCH] minor --- Makefile | 4 ++-- doc/conf.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 21c6360a2..8c9d9f403 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ export CXX = g++ endif export MPICXX = mpicxx export LDFLAGS= -Llib -lrt -export WARNFLAGS= -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas +export WARNFLAGS= -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -std=c++0x export CFLAGS = -O3 -msse2 $(WARNFLAGS) ifndef WITH_FPIC @@ -72,5 +72,5 @@ doc doxygen: cd include; doxygen ../doc/Doxyfile; cd - clean: - $(RM) $(OBJ) $(MPIOBJ) $(ALIB) $(MPIALIB) *~ src/*~ include/*~ include/*/*~ wrapper/*~ + $(RM) $(OBJ) $(MPIOBJ) $(ALIB) $(MPIALIB) $(SLIB) *~ src/*~ include/*~ include/*/*~ wrapper/*~ diff --git a/doc/conf.py b/doc/conf.py index 64df5dba1..1ce1b4825 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,6 +38,7 @@ source_parsers = { } # Version information. import rabit + version = rabit.__version__ release = rabit.__version__ @@ -148,11 +149,24 @@ def run_doxygen(folder): except OSError as e: sys.stderr.write("doxygen execution failed: %s" % e) + +def run_build_lib(folder): + """Run the doxygen make command in the designated folder.""" + try: + retcode = subprocess.call("cd %s; make" % folder, shell=True) + if retcode < 0: + sys.stderr.write("build terminated by signal %s" % (-retcode)) + except OSError as e: + sys.stderr.write("build execution failed: %s" % e) + + def generate_doxygen_xml(app): """Run the doxygen make commands if we're on the ReadTheDocs server""" read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' if read_the_docs_build: run_doxygen('..') + run_build_lib('..') + rabit._loadlib() def setup(app): # Add hook for building doxygen xml when needed