# HG changeset patch
# User J. H. Palmieri <palmieri@math.washington.edu>
# Date 1301158868 25200
# Node ID 5802e001afcec974c39e79074d574289b3bf2533
# Parent 73b28384dbe34daf91ea4b21788f105485339961
#3537: document Sage's use of $RM
diff -r 73b28384dbe3 -r 5802e001afce doc/en/developer/producing_spkgs.rst
a
|
b
|
package. In this script, you may make th |
169 | 169 | correctly. Also, running ``gap`` or ``Singular``, for example, will |
170 | 170 | run the correct version. |
171 | 171 | |
172 | | - The environment variable ``SAGE_ROOT`` points to the root directory |
| 172 | - The environment variable :envvar:`SAGE_ROOT` points to the root directory |
173 | 173 | of the Sage installation. |
174 | 174 | |
175 | | - The environment variable ``SAGE_LOCAL`` points to the |
| 175 | - The environment variable :envvar:`SAGE_LOCAL` points to the |
176 | 176 | ``SAGE_ROOT/local`` directory of the Sage installation. |
177 | 177 | |
178 | | - The environment variables ``LD_LIBRARY_PATH`` and |
179 | | ``DYLD_LIBRARY_PATH`` both have ``SAGE_ROOT/local/lib`` at the |
| 178 | - The environment variables :envvar:`LD_LIBRARY_PATH` and |
| 179 | :envvar:`DYLD_LIBRARY_PATH` both have ``SAGE_ROOT/local/lib`` at the |
180 | 180 | front. |
181 | 181 | |
| 182 | - The script ``sage-env`` in the directory ``SAGE_ROOT/local/bin`` |
| 183 | sets a number of other environment variables before any |
| 184 | package's ``spkg-install`` is run. For example, it sets the variable |
| 185 | :envvar:`RM` to ``"rm"``, so if you want ``$RM`` to behave like ``rm |
| 186 | -f``, then you need to call ``$RM -f`` (this is done in singular's |
| 187 | ``spkg-install``, for example), or you need to redefine :envvar:`RM` |
| 188 | appropriately in ``spkg-install``. |
| 189 | |
| 190 | - The Sage Installation Guide also discusses the roles of some other |
| 191 | environment variables: see the chapter "Install from Source Code". |
| 192 | |
182 | 193 | The ``spkg-install`` script should copy your files to the appropriate |
183 | 194 | place after doing any build that is necessary. Here is a template:: |
184 | 195 | |
… |
… |
place after doing any build that is nece |
243 | 254 | |
244 | 255 | |
245 | 256 | Note that the first line is ``/usr/bin/env bash``; this is important |
246 | | for portability. Next, the script checks that ``SAGE_LOCAL`` is |
| 257 | for portability. Next, the script checks that :envvar:`SAGE_LOCAL` is |
247 | 258 | defined to make sure that the Sage environment has been set. After |
248 | 259 | this, the script may simply run ``cd src`` and then call either |
249 | 260 | ``python setup.py install`` or the autotools sequence |