diff options
author | kennyballou <kballou@onyx.boisestate.edu> | 2013-06-24 17:53:06 -0600 |
---|---|---|
committer | kennyballou <kballou@onyx.boisestate.edu> | 2013-06-24 17:53:06 -0600 |
commit | 2f14355ddecdc11cdccef6dfb50b612e6f469cfa (patch) | |
tree | 9e4ff05f6a95dff3371103b4bae85f8d18c19ba0 | |
parent | 2633043635ef2e2ce480d937fe79f65a793a2aa4 (diff) | |
download | xnt-2f14355ddecdc11cdccef6dfb50b612e6f469cfa.tar.gz xnt-2f14355ddecdc11cdccef6dfb50b612e6f469cfa.tar.xz |
Update build reference documentation
* use sphinx `autofunction` to include the relevant functions / sections
into the build reference page
* Merge and update notes about the build modules
-rw-r--r-- | docs/source/buildreference.rst | 97 | ||||
-rw-r--r-- | xnt/build/make.py | 12 | ||||
-rw-r--r-- | xnt/build/tex.py | 3 |
3 files changed, 43 insertions, 69 deletions
diff --git a/docs/source/buildreference.rst b/docs/source/buildreference.rst index e277162..005e6fa 100644 --- a/docs/source/buildreference.rst +++ b/docs/source/buildreference.rst @@ -20,44 +20,21 @@ Make Apache Ant ---------- -.. _xnt.build.make.ant: -.. function:: ant(path="", target="", flags=None, pkeys=None, pvalues=None) +.. autofunction:: xnt.build.make.ant + :noindex: - Invoke Apache Ant in either the current working directory or the specified - directory using the empty (default) target or the specified target, passing - a list of *flags* to the invocation. Where *flags* is a list of valid - flags for *ant*. - - *pkeys* and *pvalues* will be zipped together and append to the command - in the form: *-Dpkey=pvalue*. Gnu Make -------- -.. _xnt.bulid.make.make: -.. function:: make(path="", target="", flags=None, pkeys=None, pvalues=None) - - Invoke Gnu Make (*make*) in either the current working directory or the - specified directory using the empty (default) target or the specified - target, passing a list of *flags* to the invocation. Where *flags* is a - list of valid flags for *make*. - - *pkeys* and *pvalues* will be zipped together and append to the command - in the form: *pkey=pvalue*. +.. autofunction:: xnt.build.make.make + :noindex: (.NET)Ant --------- -.. _xnt.build.make.nant: -.. function:: nant(path="", target="", flags=None, pkeys=None, pvalues=None) - - Invoke NAnt in either the current working directory or the specified - directory using the empty (default) target or the specified target, passing - a list of *flags* to the invocation. Where *flags* is a list of valid flags - for *nant*. - - *pkeys* and *pvalues* will be zipped together and append to the command - in the form: *-D:pkey=pvalue*. +.. autofunction:: xnt.build.make.nant + :noindex: Compiler Collection =================== @@ -68,38 +45,33 @@ If they are not, an error will be thrown (by subprocess) gcc/g++ ------- -.. _xnt.build.cc.gcc: -.. function:: gcc(src, flags=None) +.. autofunction:: xnt.build.cc.gcc + :noindex: - Compile `src` with the `gcc` to the default `out` (:ref:`defaultOut`) of - that source. Passing `flags` as given. +.. autofunction:: xnt.build.cc.gcc_o + :noindex: -.. _xnt.build.cc.gcc_o: -.. function:: gcc_o(src, o, flags=None) +.. autofunction:: xnt.build.cc.gpp + :noindex: - Compile `src` with `gcc` to the out file specified by `o`. Passing `flags` - as given. +.. autofunction:: xnt.build.cc.gpp_o + :noindex: -.. _xnt.build.cc.gpp: -.. function:: gpp(src, flags=None) +Javac +----- - Compile `src` with `g++` to the default `out` (:ref:`defaultOut`) of that - source. Passing `flags` as given. +.. autofunction:: xnt.build.cc.javac + :noindex: -.. _xnt.bulid.cc.gpp_o: -.. function:: gpp_o(src, o, flags=None) - Compile `src` with `g++` to the out file specified by `o`. Passing `flags` - as given. +NVCC +---- -Javac ------ - -.. _xnt.build.cc.javac: -.. function:: javac(src, flags=None) +.. autofunction:: xnt.build.cc.nvcc + :noindex: - Compile `src` with `javac` to the default out file for the source. Passing - `flags` as given. +.. autofunction:: xnt.build.cc.nvcc_o + :noindex: Notes ----- @@ -130,21 +102,8 @@ Tex Building LaTeX documents can be confusing and sometimes tricky to do correctly. -pdflatex --------- - -.. _xnt.build.tex.pdflatex: -.. function:: pdflatex(document, path="./", bibtex=False, makeglossary=False) - - Use `pdflatex` to build a LaTeX PDF document. Can optionally execute steps - to properly build in `bibtex` references and/ or glossaries. - - Where *document* is the master tex file of the document and *path* is the - full or relative path to exectue `pdflatex` in. - -.. _xnt.build.tex.clean: -.. function:: clean(path="./", remove_pdf=False) +.. autofunction:: xnt.build.tex.pdflatex + :noindex: - Clean up generated output files of `pdflatex` and similar. Currently, the - function removes `out`, `log`, `aux`, `toc`, `tol`, `tof`, `tot`, `bbl`, - and `blg`. Conditionally, it will remove the generated `pdf` as well. +.. autofunction:: xnt.build.tex.clean + :noindex: diff --git a/xnt/build/make.py b/xnt/build/make.py index 28c17b0..9319d05 100644 --- a/xnt/build/make.py +++ b/xnt/build/make.py @@ -24,6 +24,10 @@ from xnt.tasks import which def ant(target, path="", flags=None, pkeys=None, pvalues=None): """Wrapper around Apache Ant + Invoke Apache Ant in either the current working directory or the specified + directory using the specified target, passing a list of *flags* to the + invocation. Where *flags* is a list of valid flags for *ant*. + `pkeys` and `pvalues` are zipped to form a key/value pair passed to Ant as property values @@ -44,6 +48,10 @@ def ant(target, path="", flags=None, pkeys=None, pvalues=None): def make(target, path="", flags=None, pkeys=None, pvalues=None): """Wrapper around GNU Make + Invoke Gnu Make (*make*) in either the current working directory or the + specified directory using the specified target, passing a list of *flags* + to the invocation. Where *flags* is a list of valid flags for *make*. + `pkeys` and `pvalues` are zipped together to form a key/value pair that are passed to Make as property values. @@ -62,6 +70,10 @@ def make(target, path="", flags=None, pkeys=None, pvalues=None): def nant(target, path="", flags=None, pkeys=None, pvalues=None): """Wrapper around .NET Ant + Invoke NAnt in either the current working directory or the specified + directory using the specified target, passing a list of *flags* to the + invocation. Where *flags* is a list of valid flags for *nant*. + `pkeys` and `pvalues` are zipped together to form a key/ value pair to pass to NAnt as property values. diff --git a/xnt/build/tex.py b/xnt/build/tex.py index f5e6396..5ff5e3e 100644 --- a/xnt/build/tex.py +++ b/xnt/build/tex.py @@ -30,6 +30,9 @@ def pdflatex(document, makeglossary=False): """Generate PDF LaTeX Document + Use `pdflatex` to build a LaTeX PDF document. Can optionally execute steps + to properly build `bibtex` references and/ or glossaries. + :param document: Name of tex file (with or without `.tex` extension) :param path: Directory of tex file, if different than current directory :param bibtex: Flag to or not to add bibtex. Default: False |