forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first implementation of restructredtext documentation
git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52656 15284696-431f-4ddb-bdfa-cd5b030d7da7
- Loading branch information
Showing
43 changed files
with
1,473 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,7 @@ htmldir: | |
$(MAKE) -C drivers | ||
$(MAKE) parsubdirs | ||
|
||
restdocs: restdir | ||
|
||
restdir: $(MAKE) parsubdirs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ include $(MODULE_TOPDIR)/include/Make/Dir.make | |
|
||
default: htmldir | ||
|
||
restdocs: $(MAKE) restdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,6 @@ include $(MODULE_TOPDIR)/include/Make/Dir.make | |
|
||
default: parsubdirs | ||
|
||
restdocs: restdir | ||
|
||
restdir: parsubdirs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,7 @@ default: htmldir | |
|
||
htmldir: parsubdirs | ||
|
||
restdocs: restdir | ||
|
||
restdir: parsubdirs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
$(RESTDIR)/$(PGM).txt: | ||
@echo no REST documentation available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
include $(MODULE_TOPDIR)/include/Make/Vars.make | ||
include $(MODULE_TOPDIR)/include/Make/Rules.make | ||
include $(MODULE_TOPDIR)/include/Make/Html.make | ||
include $(MODULE_TOPDIR)/include/Make/Rest.make | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
# generic rest rules for all commands | ||
|
||
ifdef CROSS_COMPILING | ||
|
||
rest: | ||
|
||
else | ||
|
||
#check for program | ||
checkpandoc: | ||
@(type pandoc > /dev/null || (echo "ERROR: Install 'pandoc' software first (get from http://johnmacfarlane.net/pandoc/)" && exit 1)) | ||
|
||
restdesc = $(call run_grass,$(1) --rest-description < /dev/null > $(2)) || exit 0 | ||
|
||
IMGSRC := $(wildcard *.png) $(wildcard *.jpg) | ||
IMGDST := $(patsubst %,$(RESTDIR)/%,$(IMGSRC)) | ||
|
||
$(RESTDIR)/%.txt: %.html %.tmp.txt $(HTMLSRC) $(IMGDST) | $(RESTDIR) | ||
$(PYTHON) $(GISBASE)/tools/mkrest.py $* $(GRASS_VERSION_DATE) > $@; | ||
ifneq ($(strip $(IMGDST)),) | ||
.SECONDARY: $(IMGDST) | ||
endif | ||
|
||
$(RESTDIR)/%.png: %.png | $(RESTDIR) | ||
$(INSTALL_DATA) $< $@ | ||
|
||
$(RESTDIR)/%.jpg: %.jpg | $(RESTDIR) | ||
$(INSTALL_DATA) $< $@ | ||
|
||
%.tmp.txt: $(HTMLSRC) | ||
if [ "$(HTMLSRC)" != "" ] ; then $(call restdesc,$<,$@) ; fi | ||
|
||
rest: $(RESTDIR)/$(PGM).txt # checkpandoc | ||
|
||
endif | ||
|
||
.PHONY: rest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python | ||
|
||
# checks for HTML files missing DESCRIPTION section | ||
# (c) The GRASS Development Team, Markus Neteler, Glynn Clements 2003, 2004, 2005, 2006, 2009 | ||
|
||
import sys | ||
import os | ||
import string | ||
|
||
from build_rest import * | ||
|
||
os.chdir(rest_dir) | ||
|
||
sys.stdout.write(message_tmpl.substitute(rest_dir = rest_dir)) | ||
|
||
for cmd in rest_files('*'): | ||
if "DESCRIPTION" not in read_file(cmd): | ||
sys.stdout.write("%s\n" % cmd[:-5]) | ||
|
||
sys.stdout.write(r""" | ||
---------------------------------------------------------------------- | ||
""") |
Oops, something went wrong.