Skip to content
Snippets Groups Projects
Commit b956d43d authored by vlorentz's avatar vlorentz
Browse files

apidoc: Copy source files instead of assuming they are installed in the same dir.

This is no longer true since 0bcfadec.
parent dcbbcbfd
No related branches found
No related tags found
No related merge requests found
*-stamp
_build/
/swh-*
sources/
......@@ -3,7 +3,7 @@ SPHINXBUILD = python3 -c 'import sphinx, sys; sys.exit(sphinx.main(sys.argv))'
SOURCEDIR = .
BUILDDIR = _build
HTMLDIR = $(BUILDDIR)/html
SWHPKGDIR = `python3 -c 'import swh; print(swh.__path__[0])'`
SWHPKGDIR = sources/swh/
INSTALL_HOST = pergamon.internal.softwareheritage.org
INSTALL_DIR = /srv/softwareheritage/docs/webroot/devel
......@@ -27,8 +27,8 @@ links-stamp:
touch $@
apidoc: apidoc-stamp
apidoc-stamp: images-stamp
$(SPHINXAPIDOC) $(APIDOC_OPTS) -o $(APIDOC_DIR) $(SWHPKGDIR) $(APIDOC_SWH_EXCLUDES)
apidoc-stamp: links-stamp images-stamp
$(SPHINXAPIDOC) --implicit-namespaces $(APIDOC_OPTS) -o $(APIDOC_DIR) $(SWHPKGDIR) $(APIDOC_SWH_EXCLUDES)
touch $@
images-stamp:
......
......@@ -2,6 +2,7 @@
set -e
create_links () {
mkdir -p sources/swh/
for pymodule in $(cd ../../ && bin/ls-py-modules) ; do
if [ "$pymodule" = 'swh-docs' ] ; then
continue
......@@ -9,6 +10,9 @@ create_links () {
if [ ! -e "$pymodule" -a -d "../../${pymodule}/docs" ] ; then
ln -s "../../${pymodule}/docs" "$pymodule"
fi
if [ -d "../../${pymodule}/swh" ] ; then
cp -fr --link "../../${pymodule}/swh/" "sources/"
fi
done
}
......@@ -21,6 +25,7 @@ remove_links () {
rm "$pymodule"
fi
done
rm -rf sources
}
if [ "$1" = "--remove" ] ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment