#+ # # .. _makefile_non_sphinx: # # =================== # makefile_non_sphinx # =================== # # génération des manuels à partir des fichiers non assimilables directement # par sphinx # # SEE ALSO # ======== # # :ref:`builddoc` # # :ref:`Makefile` # # :ref:`` # # TODO # ==== # # check man_troff # # improve dependencies # # sort manuals in alphanumeric order # # EVOLUTIONS # ========== # # $Id$ # # $URL$ # # - fplod 20120319 # # * sort manuals in alphanumeric order # thanks to # http://morlockhq.blogspot.fr/2008/09/bash-tip-reverse-sorting-lists-revisted.html # * fix ferret and odv errors # # - fplod 20120306 # # * creation from adm/makefile # * start fix for ../../src/paper01/fig\*/\*.pro # * start fix for ../../src/test/\*.m # #- # LIST_SRCSH = \ $(shell find ../.. ! \( -name '.svn' -prune \) -name "*.sh" ; \ echo "Makefile"; \ echo "makefile_non_sphinx" \ | sort) LIST_SRCSH_RST = \ $(shell echo "$(LIST_SRCSH)" | \ sed -e "s+../../adm/website+source/manuals+g" \ -e "s+../../adm+source/manuals+g" \ -e "s+../../src+source/manuals+g" \ -e "s+../../docs/docs_dev+source/manuals+g" \ -e "s+Makefile+source/manuals/Makefile.rst+g" \ -e "s+makefile_non_sphinx+source/manuals/makefile_non_sphinx.rst+g" \ -e "s+\.sh+.sh.rst+g") LIST_SRCIDL = \ $(shell find ../.. ! \( -name '.svn' -prune \) -name "*.pro" | sort) LIST_SRCIDL_RST = \ $(shell echo "$(LIST_SRCIDL)" | \ sed \ -e "s+../../src/paper01/fig10+source/manuals+g" \ -e "s+../../src/paper01/fig11+source/manuals+g" \ -e "s+../../src/paper01/fig12+source/manuals+g" \ -e "s+../../src/paper01/fig13+source/manuals+g" \ -e "s+../../src/paper01/fig14+source/manuals+g" \ -e "s+../../src/paper01/fig15+source/manuals+g" \ -e "s+../../src/paper01/fig16+source/manuals+g" \ -e "s+../../src/paper01/fig1+source/manuals+g" \ -e "s+../../src/paper01/fig2+source/manuals+g" \ -e "s+../../src/paper01/fig3+source/manuals+g" \ -e "s+../../src/paper01/fig4+source/manuals+g" \ -e "s+../../src/paper01/fig5+source/manuals+g" \ -e "s+../../src/paper01/fig6+source/manuals+g" \ -e "s+../../src/paper01/fig7+source/manuals+g" \ -e "s+../../src/paper01/fig8+source/manuals+g" \ -e "s+../../src/paper01/fig9+source/manuals+g" \ -e "s+../../src+source/manuals+g" \ -e "s+\.pro+.pro.rst+g") LIST_SRCMATLAB = \ $(shell find ../.. ! \( -name '.svn' -prune \) -name "*.m" | sort) LIST_SRCMATLAB_RST = \ $(shell echo "$(LIST_SRCMATLAB)" | \ sed -e "s+../../src/test+source/manuals+g" \ -e "s+../../src+source/manuals+g" \ -e "s+\.m+.m.rst+g") LIST_SRCFERRET = \ $(shell find ../.. ! \( -name '.svn' -prune \) -name "*.jnl" | sort) LIST_SRCFERRET_RST = \ $(shell echo "$(LIST_SRCFERRET)" | \ sed -e "s+../../src/test+source/manuals+g" \ -e "s+\.jnl+.jnl.rst+g") LIST_SRCODV = \ $(shell find ../.. ! \( -name '.svn' -prune \) -name "*.cmd" | sort) LIST_SRCODV_RST = \ $(shell echo "$(LIST_SRCODV)" | \ sed -e "s+../../src/test+source/manuals+g" \ -e "s+\.cmd+.cmd.rst+g") LIST_RST = \ $(shell echo $(LIST_SRCSH_RST) \ $(LIST_SRCIDL_RST) \ $(LIST_SRCFERRET_RST) \ $(LIST_SRCODV_RST) \ $(LIST_SRCMATLAB_RST) | tr ' ' '\n' | sort | tr '\n' ' ') .PHONY : \ help \ clean \ all help : echo "$(LIST_RST)" @echo "Following commands are available to build outputs :" @echo "\$$ make -f makefile_non_sphinx clean" @echo "\$$ make -f makefile_non_sphinx all" clean : -@rm -f $(LIST_RST) 2> /dev/null -@rm source/manuals/manuals_non_sphinx.rst 2> /dev/null all : \ source/manuals/manuals_non_sphinx.rst source/manuals/manuals_non_sphinx.rst : \ $(LIST_RST) @echo ".. _manuals_non_sphinx:" > $@ @echo " " >> $@ @echo "non sphinx manuals" | tr [:print:] = >> $@ @echo "non sphinx manuals" >> $@ @echo "non sphinx manuals" | tr [:print:] = >> $@ @echo " " >> $@ @echo ".. toctree::" >> $@ @echo " :maxdepth: 1" 1>> $@ @echo " :glob:" 1>> $@ @echo " " >> $@ @for file in $(LIST_RST); \ do \ echo " $$(basename $${file} .rst)"; \ done >> $@ @echo " " >> $@ source/manuals/%.sh.rst : ../../adm/%.sh @extract_rst.sh -i $< -l sh -o $@ source/manuals/%.sh.rst : ../../adm/website/%.sh @extract_rst.sh -i $< -l sh -o $@ source/manuals/%.sh.rst : ../../src/%.sh @extract_rst.sh -i $< -l sh -o $@ source/manuals/%.sh.rst : ../../docs/docs_dev/%.sh @extract_rst.sh -i $< -l sh -o $@ source/manuals/makefile_non_sphinx.rst : ../../docs/docs_dev/makefile_non_sphinx @extract_rst.sh -i $< -l sh -o $@ source/manuals/Makefile.rst : ../../docs/docs_dev/Makefile @extract_rst.sh -i $< -l sh -o $@ source/manuals/%.pro.rst : ../../src/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig1/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig2/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig3/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig4/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig5/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig6/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig7/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig8/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig9/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig10/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig11/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig12/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig13/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig14/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig15/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.pro.rst : ../../src/paper01/fig16/%.pro @extract_rst.sh -i $< -l IDL -o $@ source/manuals/%.m.rst : ../../src/%.m @extract_rst.sh -i $< -l matlab -o $@ source/manuals/%.m.rst : ../../src/test/%.m @extract_rst.sh -i $< -l matlab -o $@ source/manuals/%.jnl.rst : ../../src/test/%.jnl @extract_rst.sh -i $< -l ferret -o $@ source/manuals/%.cmd.rst : ../../src/test/%.cmd @extract_rst.sh -i $< -l sh -o $@ %.sh.rst : %.sh @extract_rst.sh -i $< -l sh -o $@ %.pro.rst : %.pro @extract_rst.sh -i $< -l IDL -o $@ %.m.rst : %.m @extract_rst.sh -i $< -l matlab -o $@