Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Generate External Packages chapter for the reference manual
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed May 3, 2020
1 parent d74cbcb commit 6257875
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ distclean: build-clean
bootstrap-clean:
rm -rf config configure build/make/Makefile-auto.in
rm -f src/doc/en/installation/*.txt
rm -rf src/doc/en/reference/spkg/*.rst

# Remove absolutely everything which isn't part of the git repo
maintainer-clean: distclean bootstrap-clean
Expand Down
2 changes: 1 addition & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ save () {
# Create configure tarball
echo "Creating $NEWCONFBALL..."
mkdir -p upstream
tar zcf "$NEWCONFBALL" configure config/* build/make/Makefile-auto.in src/doc/en/installation/*.txt
tar zcf "$NEWCONFBALL" configure config/* build/make/Makefile-auto.in src/doc/en/installation/*.txt src/doc/en/reference/spkg/*.rst

# Update version
echo "$NEWCONFVERSION" >$PKG/package-version.txt
Expand Down
1 change: 1 addition & 0 deletions src/doc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
/en/reference/*/sagenb
/en/reference/sage
/en/reference/sagenb
/en/reference/spkg/*.rst
/output
/en/installation/*.txt
28 changes: 28 additions & 0 deletions src/doc/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,31 @@ for SYSTEM in arch debian fedora cygwin homebrew; do
echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM.txt
echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt
done

OUTPUT_DIR="src/doc/en/reference/spkg"
mkdir -p "$OUTPUT_DIR"
echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/"*.rst"
OUTPUT_INDEX="$OUTPUT_DIR"/index.rst
cat > "$OUTPUT_INDEX" <<EOF
External Packages
=================
.. toctree::
:maxdepth: 1
EOF
for PKG_SCRIPTS in build/pkgs/*; do
if [ -d "$PKG_SCRIPTS" ]; then
PKG_BASE=$(basename "$PKG_SCRIPTS")
if [ -f "$PKG_SCRIPTS"/SPKG.rst ]; then
# Instead of just copying, we may want to call
# a version of sage-spkg-info to format extra information.
cp "$PKG_SCRIPTS"/SPKG.rst "$OUTPUT_DIR"/$PKG_BASE.rst
echo >> "$OUTPUT_INDEX" " $PKG_BASE"
fi
fi
done
cat >> "$OUTPUT_INDEX" <<EOF
.. include:: ../footer.txt
EOF
1 change: 1 addition & 0 deletions src/doc/en/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Interfaces
General Information
===================

* :doc:`External Packages <spkg/index>`
* :doc:`References <references/index>`
* :doc:`History and License <history_and_license/index>`
* :ref:`genindex`
Expand Down
1 change: 1 addition & 0 deletions src/doc/en/reference/spkg/conf.py

0 comments on commit 6257875

Please sign in to comment.