[ install, docs ] Add a new makefile target to install libdocs (#1884)

This commit is contained in:
Kamiλ Shakirov 2021-08-31 23:41:03 +06:00 committed by GitHub
parent 0e4168edbf
commit 2428b356f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 8 deletions

View File

@ -43,11 +43,10 @@
* Added `--list-packages` CLI option.
### Library Changes
### Library changes
#### Prelude
Changed
- Removed `Data.Strings`. Use `Data.String` instead.
@ -73,6 +72,12 @@ Changed
relations (functions of type `ty -> ty -> Type`), and orders are
defined simply as bundles of these properties.
### Installation changes
* Added a new makefile target to install Idris 2 library documentation. After `make install`, type
`make install-libdocs` to install it. After that, the index file can be found here: ``idris2
--libdir`/docs/index.html`.``
## v0.4.0
### Syntax changes

View File

@ -77,7 +77,12 @@ If you have the latest *released* version of Idris 2
- `make all`
- `make install`
### 4: (Optional) Self-hosting step
### 4: (Optional) Installing Idris 2 library documentation
After `make install`, type `make install-libdocs` to install Idris 2 library documentation. After
that, the index file can be found here: ``idris2 --libdir`/docs/index.html`.``
### 5: (Optional) Self-hosting step
As a final step, you can rebuild from the newly installed Idris 2 to verify
that everything has worked correctly. Assuming that `idris2` is in your
@ -88,19 +93,19 @@ that everything has worked correctly. Assuming that `idris2` is in your
`make all IDRIS2_BOOT='idris2 --codegen racket' && make install`
if using Racket.
### 5: Running tests
### 6: Running tests
After `make all`, type `make test` to check everything works. This uses the
executable in `./build/exec`.
### 6: (Optional) Enabling incremental compilation
### 7: (Optional) Enabling incremental compilation
If you are working on Idris, incremental compilation means that rebuilds are
much faster, at the cost of runtime performance being slower. To enable
incremental compilation for the Chez back end, set the environment variable
`IDRIS2_INC_CGS=chez`, or set the `--inc chez` flag in `idris2.ipkg`.
### 7: (Optional) Installing the Idris 2 API
### 8: (Optional) Installing the Idris 2 API
You'll only need this if you're developing support tools, such as an external
code generator. To do so, once everything is successfully installed, type:
@ -111,7 +116,7 @@ The API will only work if you've completed the self-hosting step, step 4, since
the intermediate code versions need to be consistent throughout. Otherwise, you
will get an `Error in TTC: TTC data is in an older format` error.
### 8: (Optional) Shell Auto-completion
### 9: (Optional) Shell Auto-completion
Idris2 supports tab auto-completion for Bash-like shells.

View File

@ -186,7 +186,7 @@ install-support:
mkdir -p ${PREFIX}/${NAME_VERSION}/support/racket
mkdir -p ${PREFIX}/${NAME_VERSION}/support/gambit
mkdir -p ${PREFIX}/${NAME_VERSION}/support/js
install -m 644 support/docs/* ${PREFIX}/${NAME_VERSION}/support/docs
install -m 644 support/docs/styles.css ${PREFIX}/${NAME_VERSION}/support/docs
install -m 644 support/racket/* ${PREFIX}/${NAME_VERSION}/support/racket
install -m 644 support/gambit/* ${PREFIX}/${NAME_VERSION}/support/gambit
install -m 644 support/js/* ${PREFIX}/${NAME_VERSION}/support/js
@ -208,6 +208,16 @@ install-with-src-libs:
${MAKE} -C libs/network install-with-src IDRIS2?=${TARGET} IDRIS2_PATH=${IDRIS2_BOOT_PATH}
${MAKE} -C libs/test install-with-src IDRIS2?=${TARGET} IDRIS2_PATH=${IDRIS2_BOOT_PATH}
install-libdocs: libdocs
mkdir -p ${PREFIX}/${NAME_VERSION}/docs/{prelude,base,contrib,network,test}
cp -r libs/prelude/build/docs/* ${PREFIX}/${NAME_VERSION}/docs/prelude
cp -r libs/base/build/docs/* ${PREFIX}/${NAME_VERSION}/docs/base
cp -r libs/contrib/build/docs/* ${PREFIX}/${NAME_VERSION}/docs/contrib
cp -r libs/network/build/docs/* ${PREFIX}/${NAME_VERSION}/docs/network
cp -r libs/test/build/docs/* ${PREFIX}/${NAME_VERSION}/docs/test
install -m 644 support/docs/* ${PREFIX}/${NAME_VERSION}/docs
.PHONY: bootstrap bootstrap-build bootstrap-racket bootstrap-racket-build bootstrap-test bootstrap-clean
# Bootstrapping using SCHEME

24
support/docs/index.html Normal file
View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Idris Packages</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body class="index">
<header>
<strong>Idris2Doc</strong>
<nav><a href="index.html">Index</a></nav>
</header>
<div class="container">
<h1>Idris Packages</h1>
<ul class="names">
<li><a class="code" href="prelude/index.html">prelude</a></li>
<li><a class="code" href="base/index.html">base</a></li>
<li><a class="code" href="contrib/index.html">contrib</a></li>
<li><a class="code" href="network/index.html">network</a></li>
<li><a class="code" href="test/index.html">test</a></li>
</ul>
</div>
</body>
</html>