Skip to content
Snippets Groups Projects
Commit 2cb296d2 authored by Oleg Grenrus's avatar Oleg Grenrus
Browse files

Move doc/ to the top-level of the repository

parent d8f890b8
No related branches found
No related tags found
No related merge requests found
Showing
with 29 additions and 27 deletions
......@@ -15,9 +15,9 @@ dist-*
register.sh
./cabal.config
cabal-tests.log
.python-sphinx-virtualenv/
/Cabal/dist/
/Cabal/.python-sphinx-virtualenv/
/Cabal/tests/Setup
/Cabal/Setup
/Cabal/source-file-list
......
version: 2
sphinx:
configuration: Cabal/doc/conf.py
configuration: doc/conf.py
python:
version: 3.7
install:
- requirements: Cabal/doc/requirements.txt
- requirements: doc/requirements.txt
......@@ -20,14 +20,10 @@ SOURCES=Distribution/*.hs Distribution/Simple/*.hs \
CONFIG_STAMP=dist/setup-config
BUILD_STAMP=dist/build/libHSCabal-$(VERSION).a
HADDOCK_STAMP=dist/doc/html/Cabal/index.html
USERGUIDE_STAMP=dist/doc/users-guide/index.html
SDIST_STAMP=dist/Cabal-$(VERSION).tar.gz
DISTLOC=dist/release
DIST_STAMP=$(DISTLOC)/Cabal-$(VERSION).tar.gz
# TODO: when we have sphinx-build2 ?
SPHINXCMD:=sphinx-build
COMMA=,
setup: $(SOURCES) Setup.hs
......@@ -51,20 +47,6 @@ haddock: $(HADDOCK_STAMP)
$(HADDOCK_STAMP) : $(CONFIG_STAMP) $(BUILD_STAMP)
./setup haddock
SPHINX_HTML_OUTDIR=dist/doc/users-guide
# do pip install everytime so we have up to date requirements when we build
users-guide: .python-sphinx-virtualenv $(USERGUIDE_STAMP)
$(USERGUIDE_STAMP) : doc/*.rst
mkdir -p $(SPHINX_HTML_OUTDIR)
(. ./.python-sphinx-virtualenv/bin/activate && pip install -r doc/requirements.txt && $(SPHINXCMD) doc $(SPHINX_HTML_OUTDIR))
docs: haddock users-guide
.python-sphinx-virtualenv:
python3 -m venv .python-sphinx-virtualenv
(. ./.python-sphinx-virtualenv/bin/activate)
clean:
rm -rf dist/
rm -f setup
......@@ -93,17 +75,15 @@ $(SDIST_STAMP) : $(BUILD_STAMP)
./setup sdist
dist: $(DIST_STAMP)
$(DIST_STAMP) : $(HADDOCK_STAMP) $(USERGUIDE_STAMP) $(SDIST_STAMP)
$(DIST_STAMP) : $(HADDOCK_STAMP) $(SDIST_STAMP)
rm -rf $(DISTLOC)
mkdir $(DISTLOC)
tar -xzf $(SDIST_STAMP) -C $(DISTLOC)/
mkdir -p $(DISTLOC)/Cabal-$(VERSION)/doc
cp -r dist/doc/html $(DISTLOC)/Cabal-$(VERSION)/doc/API
cp -r dist/doc/users-guide $(DISTLOC)/Cabal-$(VERSION)/doc/
cp ChangeLog.md $(DISTLOC)/Cabal-$(VERSION)/
tar --format=ustar -C $(DISTLOC) -czf $(DISTLOC)/Cabal-$(VERSION).tar.gz Cabal-$(VERSION)
mkdir $(DISTLOC)/doc
mv $(DISTLOC)/Cabal-$(VERSION)/doc/users-guide $(DISTLOC)/doc
mv $(DISTLOC)/Cabal-$(VERSION)/doc/API $(DISTLOC)/doc
mv $(DISTLOC)/Cabal-$(VERSION)/ChangeLog.md $(DISTLOC)/
rm -r $(DISTLOC)/Cabal-$(VERSION)/
......
......@@ -58,7 +58,7 @@ $(TEMPLATE_MACROS) : boot/cabal_macros.template.h cabal-dev-scripts/src/GenCabal
# generated docs
Cabal/doc/buildinfo-fields-reference.rst : phony
doc/buildinfo-fields-reference.rst : phony
cabal build --builddir=dist-newstyle-bi --project-file=cabal.project.buildinfo buildinfo-reference-generator
$$(cabal-plan list-bin --builddir=dist-newstyle-bi buildinfo-reference-generator) buildinfo-reference-generator/template.zinza | tee $@
......@@ -226,3 +226,25 @@ weeder :
.PHONY : tags
tags :
hasktags -b Cabal/Distribution Cabal/Cabal-described/src Cabal/Language cabal-install/Distribution cabal-testsuite/src
# documentation
##############################################################################
# TODO: when we have sphinx-build2 ?
SPHINXCMD:=sphinx-build
SPHINX_HTML_OUTDIR:=dist-newstyle/doc/users-guide
USERGUIDE_STAMP:=$(SPHINX_HTML_OUTDIR)/index.html
# do pip install everytime so we have up to date requirements when we build
users-guide: .python-sphinx-virtualenv $(USERGUIDE_STAMP)
$(USERGUIDE_STAMP) : doc/*.rst
mkdir -p $(SPHINX_HTML_OUTDIR)
(. ./.python-sphinx-virtualenv/bin/activate && pip install -r doc/requirements.txt && $(SPHINXCMD) doc $(SPHINX_HTML_OUTDIR))
docs: haddock users-guide
.python-sphinx-virtualenv:
python3 -m venv .python-sphinx-virtualenv
(. ./.python-sphinx-virtualenv/bin/activate)
File moved
File moved
File moved
File moved
File moved
File moved
File moved
......@@ -68,13 +68,13 @@ html_static_path = ['images']
html_use_smartypants = True
html_show_copyright = True
html_context = {
'source_url_prefix': "https://github.com/haskell/cabal/tree/master/Cabal/doc/",
'source_url_prefix': "https://github.com/haskell/cabal/tree/master/doc/",
"display_github": True,
"github_host": "github.com",
"github_user": "haskell",
"github_repo": 'cabal',
"github_version": "master/",
"conf_py_path": "Cabal/doc/",
"conf_py_path": "doc/",
"source_suffix": '.rst',
}
......
File moved
File moved
File moved
File moved
File moved
File moved
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