forked from nexusformat/definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.make.txt
111 lines (72 loc) · 2.67 KB
/
README.make.txt
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
The GNU "make" program and Python are used to build the
NeXus documentation. The default build assembles
the HTML version. You have the choice to
build the documentation in two places:
* in the source tree
* out of the source tree
.. TODO: documentation how to build PDF version
In-Tree documentation
=====================
To build the NeXus documentation within the
source tree, go to the root directory
(the directory where this README file is located),
and type::
make clean
make
The HTML documentation is located in this folder::
./manual/build/html/
Out-of-Tree documentation
=========================
There are two ways to build out-of-source.
Outside the source tree
-----------------------
To build the NeXus documentation outside the
source tree,
#. create the target directory for the documentation to be built::
mkdir /some/where/else
#. note the definitions source directory
(the directory where this README file is located)::
export SOURCE_DIR=/path/to/nexus/definitions
#. copy the source to the target using this NeXus Python tool::
cd /some/where/else
python $(SOURCE_DIR)/utils/build_preparation.py $(SOURCE_DIR)
#. build the documentation::
make clean
make
The HTML documentation is located in this folder::
/some/where/else/manual/build/html/
Inside the source tree, in a temporary directory
------------------------------------------------
Alternatively, as is a common practice with `cmake <https://cmake.org/>`_,
you can build *out-of-source* (sort of) in a temporary
``$(SOURCE_DIR)/build`` directory. For this, the *Makefile*
has the *builddir* rule::
export SOURCE_DIR=/path/to/nexus/definitions
cd $(SOURCE_DIR)
make builddir
cd build
make clean
make
This is all done with one make command::
export SOURCE_DIR=/path/to/nexus/definitions
cd $(SOURCE_DIR)
make makebuilddir
The HTML documentation is located in this folder::
$(SOURCE_DIR)/build/manual/build/html/
Windows
=======
Windows development needs more instructions.
Use the *cmd.exe* shell to build the documentation, not
the Windows powershell or there will be Python problems.
Python errors
-------------
On Windows, if the following error is output to the console
after typing ``make html`` in the ``$(SOURCE_DIR)/manual`` directory:
'python' is not recognized as an internal or external command,
operable program or batch file.
it may be necessary to add Python to the ``PATH`` environment
variable, such as one of these lines::
set PATH=C:\Python27;%PATH%
set PATH=D:\Apps\Anaconda;%PATH%
Try to avoid installing Python on a directory path that has
embedded spaces. Long series of tedious problems with that.