Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
commit b4f89570281d51f0a233cdd201cf32cc84762802 Author: Michal Minar miminar@redhat.com Date: Wed Sep 24 13:54:18 2014 +0200
doc: moved commands directly under LMI metacommand heading
doc/src/Makefile | 10 +++++++--- doc/src/scripts/Makefile | 25 ++++--------------------- 2 files changed, 11 insertions(+), 24 deletions(-)
diff --git a/doc/src/Makefile b/doc/src/Makefile index ede8b55..a51f423 100644 --- a/doc/src/Makefile +++ b/doc/src/Makefile @@ -8,11 +8,13 @@ PROJECTNAME := OpenLMITools WITH_COMMANDS ?= 0 ifeq ($(WITH_COMMANDS), 1) TAGS := $(TAGS) -t with-commands + COMMANDS ?= $(notdir $(shell find $(OPENLMI_SCRIPTS_DIR)/commands -mindepth 1 \ + -maxdepth 1 -type d | sort)) endif ALLSPHINXOPTS ?= -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . ALLSPHINXOPTS := $(TAGS) $(ALLSPHINXOPTS)
-export WITH_COMMANDS OPENLMI_SCRIPTS_DIR +export WITH_COMMANDS OPENLMI_SCRIPTS_DIR COMMANDS
.PHONY: clean deps
@@ -28,7 +30,7 @@ latexpdf-build: latex-build @echo "latexpdf build finished"
%-build: deps-% index-% - export SPHINXBUILD SRCDIR WITH_COMMANDS OPENLMI_SCRIPTS_DIR + export SPHINXBUILD SRCDIR WITH_COMMANDS OPENLMI_SCRIPTS_DIR COMMANDS ./build-with-sphinx.sh -b $* -t $*-build $(ALLSPHINXOPTS) $(BUILDDIR)/$* @echo "$* build finished. Output is in $(BUILDDIR)/$*."
@@ -119,7 +121,9 @@ metacommand-index-%: echo " scripts/usage"; \ echo " scripts/configuration"; \ if [ $(WITH_COMMANDS) != 0 ]; then \ - echo " scripts/commands"; \ + for cmd in $(COMMANDS); do \ + echo " scripts/commands/$$cmd/cmdline.rst"; \ + done; \ fi; \ echo " scripts/development"; \ ) > metacommand-index.rst diff --git a/doc/src/scripts/Makefile b/doc/src/scripts/Makefile index d72592c..1b8796a 100644 --- a/doc/src/scripts/Makefile +++ b/doc/src/scripts/Makefile @@ -8,13 +8,9 @@ else endif BUILD ?= html
-.PHONY: all devel clean devindex commands.txt commands.rst +.PHONY: all devel clean devindex commands.txt
-ifeq ($(WITH_COMMANDS), 0) all: devel commands.txt devindex -else -all: devel commands.txt commands.rst devindex -endif
devindex: ( \ @@ -46,32 +42,19 @@ else printf " * :ref:`openlmi-scripts-$${cmd}-cmd`\n"; \ done; \ ) > $@ -endif
-commands.rst: -ifeq (,$(OPENLMI_SCRIPTS_DIR)) - @echo "OPENLMI_SCRIPTS_DIR is unset!" - false -else - echo "Commands" > $@ - echo "========" >> $@ -[ -e commands ] && rm -rf commands mkdir commands - echo "Usage and developer documentations for commands of *LMI metacommand*'s" >> $@ - printf "\n.. toctree::\n" >> $@ - printf " :maxdepth: 1\n\n" >> $@ find $(OPENLMI_SCRIPTS_DIR)/commands -mindepth 1 -maxdepth 1 -type d | sort | \ while read cmdpath; \ - do \ - cmd=$$(basename $$cmdpath); \ - printf " commands/$${cmd}/cmdline.rst\n" >> $@; \ - ln -s "$${cmdpath}/doc" commands/$${cmd}; \ + do \ + ln -s "$${cmdpath}/doc" commands/$$(basename $$cmdpath); \ done endif
clean: make -C devel clean - -rm commands.txt commands.rst development.rst + -rm commands.txt development.rst -rm -rf commands
cura-tools-devel@lists.fedorahosted.org