From f5f310ac975c10f20892cf7f4af82a5414d28899 Mon Sep 17 00:00:00 2001 From: Ryota MIBU Date: Mon, 15 Jun 2015 19:06:48 +0900 Subject: [PATCH] Ensure 'make' can be execute in top dir. JIRA: PROMISE-4 Change-Id: I52044f54f0ab8eee5a9a5dcf6392cacae8a2692e Signed-off-by: Ryota MIBU --- Makefile | 24 ++++++++++++ etc/conf.py | 41 +++++++++++++++++++++ .../{resource_management => }/01-intro.rst | 0 .../{resource_management => }/02-usecase.rst | 0 requirements/{resource_management => }/03-arch.rst | 0 requirements/{resource_management => }/04-gap.rst | 0 requirements/{resource_management => }/05-impl.rst | 0 .../{resource_management => }/06-summary.rst | 0 .../{resource_management => }/07-schemas.rst | 0 .../{resource_management => }/glossary.rst | 0 .../{resource_management => }/images/figure1.png | Bin .../{resource_management => }/images/figure2.png | Bin .../{resource_management => }/images/figure3.png | Bin .../{resource_management => }/images/figure4.png | Bin .../{resource_management => }/images/figure5.png | Bin .../{resource_management => }/images/figure6.png | Bin requirements/{resource_management => }/index.rst | 0 requirements/resource_management/Makefile | 18 --------- requirements/resource_management/conf.py | 21 ----------- 19 files changed, 65 insertions(+), 39 deletions(-) create mode 100644 Makefile create mode 100755 etc/conf.py rename requirements/{resource_management => }/01-intro.rst (100%) rename requirements/{resource_management => }/02-usecase.rst (100%) rename requirements/{resource_management => }/03-arch.rst (100%) rename requirements/{resource_management => }/04-gap.rst (100%) rename requirements/{resource_management => }/05-impl.rst (100%) rename requirements/{resource_management => }/06-summary.rst (100%) rename requirements/{resource_management => }/07-schemas.rst (100%) rename requirements/{resource_management => }/glossary.rst (100%) rename requirements/{resource_management => }/images/figure1.png (100%) rename requirements/{resource_management => }/images/figure2.png (100%) rename requirements/{resource_management => }/images/figure3.png (100%) rename requirements/{resource_management => }/images/figure4.png (100%) rename requirements/{resource_management => }/images/figure5.png (100%) rename requirements/{resource_management => }/images/figure6.png (100%) rename requirements/{resource_management => }/index.rst (100%) delete mode 100644 requirements/resource_management/Makefile delete mode 100755 requirements/resource_management/conf.py diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7d4dd23 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +BUILDDIR := build + +.PHONY: clean html pdf default + +default: pdf + +clean: + rm -rf $(BUILDDIR) plantuml.jar + +html: plantuml.jar | $(BUILDDIR) + sphinx-build -b html -c etc -d $(BUILDDIR)/doctrees \ + requirements $(BUILDDIR)/requirements/html + +pdf: plantuml.jar | $(BUILDDIR) + sphinx-build -b latex -c etc -d $(BUILDDIR)/doctrees \ + requirements $(BUILDDIR)/requirements/latex + $(MAKE) -C $(BUILDDIR)/requirements/latex \ + LATEXOPTS='--interaction=nonstopmode' all-pdf + +$(BUILDDIR): + mkdir -p $(BUILDDIR) + +plantuml.jar: + wget 'http://downloads.sourceforge.net/project/plantuml/plantuml.jar' diff --git a/etc/conf.py b/etc/conf.py new file mode 100755 index 0000000..e24d33a --- /dev/null +++ b/etc/conf.py @@ -0,0 +1,41 @@ +import datetime +import sys +import os + +try: + __import__('imp').find_module('sphinx.ext.numfig') + extensions = ['sphinx.ext.numfig'] +except ImportError: + # 'pip install sphinx_numfig' + extensions = ['sphinx_numfig'] + +# plantuml +extensions.append('sphinxcontrib.plantuml') +plantuml = ['java', '-jar', 'plantuml.jar'] + +# numfig: +number_figures = True +figure_caption_prefix = "Fig." + +source_suffix = '.rst' +master_doc = 'index' +pygments_style = 'sphinx' +html_use_index = False + +pdf_documents = [('index', u'Promise', u'Promise Project', u'OPNFV')] +pdf_fit_mode = "shrink" +pdf_stylesheets = ['sphinx','kerning','a4'] +#latex_domain_indices = False +#latex_use_modindex = False + +latex_elements = { + 'printindex': '', +} + +project = u'Promise: Resource Management' +copyright = u'%s, OPNFV' % datetime.date.today().year +version = u'1.0.0' +release = u'1.0.0' + +# TODO(r-mibu): remove the following line to index.rst +latex_appendices = ['07-schemas'] diff --git a/requirements/resource_management/01-intro.rst b/requirements/01-intro.rst similarity index 100% rename from requirements/resource_management/01-intro.rst rename to requirements/01-intro.rst diff --git a/requirements/resource_management/02-usecase.rst b/requirements/02-usecase.rst similarity index 100% rename from requirements/resource_management/02-usecase.rst rename to requirements/02-usecase.rst diff --git a/requirements/resource_management/03-arch.rst b/requirements/03-arch.rst similarity index 100% rename from requirements/resource_management/03-arch.rst rename to requirements/03-arch.rst diff --git a/requirements/resource_management/04-gap.rst b/requirements/04-gap.rst similarity index 100% rename from requirements/resource_management/04-gap.rst rename to requirements/04-gap.rst diff --git a/requirements/resource_management/05-impl.rst b/requirements/05-impl.rst similarity index 100% rename from requirements/resource_management/05-impl.rst rename to requirements/05-impl.rst diff --git a/requirements/resource_management/06-summary.rst b/requirements/06-summary.rst similarity index 100% rename from requirements/resource_management/06-summary.rst rename to requirements/06-summary.rst diff --git a/requirements/resource_management/07-schemas.rst b/requirements/07-schemas.rst similarity index 100% rename from requirements/resource_management/07-schemas.rst rename to requirements/07-schemas.rst diff --git a/requirements/resource_management/glossary.rst b/requirements/glossary.rst similarity index 100% rename from requirements/resource_management/glossary.rst rename to requirements/glossary.rst diff --git a/requirements/resource_management/images/figure1.png b/requirements/images/figure1.png similarity index 100% rename from requirements/resource_management/images/figure1.png rename to requirements/images/figure1.png diff --git a/requirements/resource_management/images/figure2.png b/requirements/images/figure2.png similarity index 100% rename from requirements/resource_management/images/figure2.png rename to requirements/images/figure2.png diff --git a/requirements/resource_management/images/figure3.png b/requirements/images/figure3.png similarity index 100% rename from requirements/resource_management/images/figure3.png rename to requirements/images/figure3.png diff --git a/requirements/resource_management/images/figure4.png b/requirements/images/figure4.png similarity index 100% rename from requirements/resource_management/images/figure4.png rename to requirements/images/figure4.png diff --git a/requirements/resource_management/images/figure5.png b/requirements/images/figure5.png similarity index 100% rename from requirements/resource_management/images/figure5.png rename to requirements/images/figure5.png diff --git a/requirements/resource_management/images/figure6.png b/requirements/images/figure6.png similarity index 100% rename from requirements/resource_management/images/figure6.png rename to requirements/images/figure6.png diff --git a/requirements/resource_management/index.rst b/requirements/index.rst similarity index 100% rename from requirements/resource_management/index.rst rename to requirements/index.rst diff --git a/requirements/resource_management/Makefile b/requirements/resource_management/Makefile deleted file mode 100644 index dbf00e2..0000000 --- a/requirements/resource_management/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -BUILDDIR = build - -.PHONY: clean html pdf all - -all: html pdf - -clean: - rm -rf $(BUILDDIR)/* plantuml.jar - -html: plantuml.jar - sphinx-build -b html -d $(BUILDDIR)/doctrees . $(BUILDDIR)/html - -pdf: plantuml.jar - sphinx-build -b latex -d $(BUILDDIR)/doctrees . $(BUILDDIR)/latex - $(MAKE) -C $(BUILDDIR)/latex all-pdf - -plantuml.jar: - wget 'http://downloads.sourceforge.net/project/plantuml/plantuml.jar' diff --git a/requirements/resource_management/conf.py b/requirements/resource_management/conf.py deleted file mode 100755 index 93c3e16..0000000 --- a/requirements/resource_management/conf.py +++ /dev/null @@ -1,21 +0,0 @@ -import datetime - -extensions = ['sphinxcontrib.plantuml'] -plantuml = ['java', '-jar', 'plantuml.jar'] - -source_suffix = '.rst' -master_doc = 'index' -pygments_style = 'sphinx' -html_use_index = False - -pdf_documents = [('index', u'Promise', u'Promise Project', u'OPNFV')] -plantuml_latex_output_format = 'eps' -pdf_fit_mode = "shrink" -pdf_stylesheets = ['sphinx','kerning','a4'] -latex_elements = {'printindex': ''} -latex_appendices = ['07-schemas'] - -project = u'Promise: Resource Management' -copyright = u'%s, OPNFV' % datetime.date.today().year -version = u'0.0.1' -release = u'0.0.1' -- 2.16.6