summaryrefslogtreecommitdiff
path: root/INSTALL.txt
blob: fad7d94e46544776ed1284fb3aa8e8fdb549385b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
AsciiDoc Installation
=====================

NOTE: The current version of AsciiDoc requires *Python 2.4 or newer*
to run.  If you don't already have an up-to-date version of Python
installed it can be downloaded from the official Python website
http://www.python.org/.

The latest AsciiDoc downloads can be found on the AsciiDoc website
http://www.methods.co.nz/asciidoc/downloads.html and at the
SourceForge http://sourceforge.net/projects/asciidoc/.

Prepackaged AsciiDoc installation
---------------------------------
The AsciiDoc
http://www.methods.co.nz/asciidoc/downloads.html[downloads page]
lists AsciiDoc packages for various Linux distributions.


Distribution tarball installation
---------------------------------
If your flavor or UNIX or Linux does not have a packaged AsciiDoc
distribution or if you prefer to install the latest AsciiDoc version
from source use the `configure` shell script in the tarball root
directory.

The `autoconf(1)` generated `configure` script creates a make file
that is tailored for your system. To install:

[subs="attributes"]
  $ tar -xzf asciidoc-{revision}.tar.gz
  $ cd asciidoc-{revision}
  $ ./configure
  $ sudo make install

To install the documentation:

  $ sudo make docs

To uninstall AsciiDoc:

  $ sudo make uninstall

If Vim is installed on your system the AsciiDoc Vim syntax highlighter
and filetype detection scripts will be install in the global Vim
configuration file directory (`asciidoc.vim` in the `syntax` directory
and `asciidoc_filetype.vim` in the `ftdetect` directory).

.Building the distribution
*********************************************************************
The AsciiDoc distribution tarball is built using
http://www.a-a-p.org/[A-A-P] (a software build system written by Bram
Moolenaar). The AsciiDoc A-A-P scripts are:

`./common.aap`:: Included in all scripts.
`./main.aap`:: Builds distribution tarball and zip files.
`./doc/main.aap`:: Builds distribution documentation.
`./examples/website/main.aap`:: Builds AsciiDoc website.

It's arguable that build and install should be done with a single tool
but I wrote the A-A-P build scripts before the installer (because I
find make/autoconf tedious). The make/autoconf installer was added as
the canonical installer for packagers and for users who don't have
pre-built AsciiDoc packages and/or don't want to install from the
Mercurial repository.

*********************************************************************


Installing from the Mercurial repository
----------------------------------------
This is an easy way to install AsciiDoc if you don't have an up to
date packaged version or want to get the latest version from the
trunk:

- Make sure you have http://www.selenic.com/mercurial/[Mercurial]
  installed, you can check with:

  $ hg --version

- Go to the directory you want to install AsciiDoc into and download
  the repository.  This example gets the {revision} tagged release:

[subs="attributes"]
  $ cd ~/bin
  $ hg clone -r {revision} http://hg.sharesource.org/asciidoc asciidoc-{revision}

- Create a symlink to the AsciiDoc script in a search `PATH` directory
  so it's easy to execute `asciidoc` from the command-line, for
  example:

[subs="attributes"]
  $ ln -s ~/bin/asciidoc-{revision}/asciidoc.py ~/bin/asciidoc

Use the Mercurial `pull` command to update your AsciiDoc repository.


Microsoft Windows installation
------------------------------
To install the zip formatted distribution just unzip the contents to a
new folder:

[subs="attributes"]
  $ mkdir asciidoc
  $ cd asciidoc
  $ unzip ../asciidoc-{revision}.zip


Testing your installation
-------------------------
Test out asciidoc by changing to the AsciiDoc application directory
and convert the User Guide document (`./doc/asciidoc.txt`) to XHTML
(`./doc/asciidoc.html`):

  $ python asciidoc.py doc/asciidoc.txt

link:testasciidoc.html[testasciidoc] offers a more extensive set of
conformance tests.