29.2 List of Needed Programs

  29.2.1 The Aldor Compiler
  29.2.2 Noweb and Perl
  29.2.3 Common UNIX Programs
  29.2.4 The LATEX Environment

Additionally to the programs given in Section 28.1, the following chunks list paths to programs that we need for building an ALLPROSE project. All these programs should be made accessible through the PATH environment variable.

In short, the necessary programs are GNU make, a working Aldor compiler, Perl, Noweb, a LATEX environment, and some common UNIX commands.

Convention 22 ALLPROSE has only been tested with the GNU version of MAKE. We use the GNU features freely and do not expect that ALLPROSE runs with a non-GNU MAKE.

29.2.1 The Aldor Compiler

The variable ALDORROOT should be defined in the environment, see Section 29.1. The following variable points to the Aldor compiler executable.

425necessary programs 348+   (346 422)  350b  427b
ALDOR=$(ALDORROOT)/bin/aldor

Defines:
ALDOR, used in chunks 356, 443b, 444, and 451a.
ALDORROOT, used in chunks 357, 423a, 439, and 540.

In fact, we require all the programs that are necessary to produce an executable from an Aldor source file. Consult the Aldor User Guide for more details. For example, you should be able to compile and execute the following program via

aldor -grun -laldor hello.as

427ahello.as 427a
#include "aldor"
#include "aldorio"
main(): () == {
        stdout << "Hello World" << newline;
}
main();

29.2.2 Noweb and Perl

Since ALLPROSE builds on Noweb, it should be installed and accessible. Furthermore Perl, grep and cp should be available, see Section 28.1.

Instead of shell scripting we use Perl in several places. At the time of writing version 5.8.4 was used.

427bnecessary programs 348+   (346 422)  425  428
export PERL=perl

Defines:
PERL, used in chunks 363, 365–68, 370, 371, 377, 407, 409, 410, 412b, 419, 429a, 431, 433a, 436, 457, 464b, 466, 546, 547, 551, and 553.

29.2.3 Common UNIX Programs

We use some programs that are commonly available in a UNIX like operating system.

428necessary programs 348+   (346 422)  427b  429a
CMP=cmp#                        compare two files
  #cmp (GNU diffutils) 2.8.1
  #Copyright (C) 2002 Free Software Foundation, Inc.
MDparent=mkdir --parents#       make directory and parent directories, too
  #mkdir (coreutils) 5.2.1
  #Written by David MacKenzie.
RMrecursive=rm -rf#             remove recursively and don’t ask
RM=rm -f#                       actually this is a default of MAKE
  #rm (coreutils) 5.2.1
  #Written by Paul Rubin, David MacKenzie, Richard Stallman, and Jim Meyering.
FIND=find#                      search for files in a directory hierarchy
  #GNU find version 4.1.20
AR=ar#                          actually this is a default of MAKE
ARREPLACE=$(AR) rv#             replace a file in the archive by a new one
AREXTRACT=$(AR) x#              extract a file from the archive
  #GNU ar 2.15
RANLIB=ranlib#                  write  an object-file index into the archive
  #GNU ranlib 2.15

Defines:
AREXTRACT, used in chunk 444.
ARREPLACE, used in chunks 443b and 444.
FIND, used in chunks 401 and 410.
MDparent, used in chunks 352, 373a, 405, and 415b.
RANLIB, used in chunk 443a.
RMrecursive, used in chunks 352, 401b, 407, and 415b.

We simulate the a program similar to the touch program via PERL. The only difference is that we do not modify the date of the file if the file already exists.

429anecessary programs 348+   (346 422)  428  429b
CREATEIFNOTTHERE=$(PERL) -e’$$A=$$ARGV[0];if(! -f $$A){open(F,">$$A");close F}’

Defines:
CREATEIFNOTTHERE, used in chunks 362 and 412a.

Uses PERL 427b.

29.2.4 The LATEX Environment

In order to compile the documentation it is vital to have a reasonably recent version of LATEX installed. ALLPROSE is able to produce a .dvi file via LATEX, a .pdf file via PDFLATEX, and a website via TEX4ht.

429bnecessary programs 348+   (346 422)  429a  430a
LATEX=latex
PDFLATEX=pdflatex
MAKEINDEX=makeindex
BIBTEX=bibtex

Defines:
BIBTEX, used in chunk 378b.
LATEX, used in chunks 374a, 380, and 386b.
MAKEINDEX, used in chunks 380 and 386a.
PDFLATEX, used in chunks 374b, 380, and 386b.

The TEX4ht software compiles the .tex file via LATEX and finally postprocesses the resulting .dvi file by the two programs TEX4HT and T4HT to get the final .html file(s). See the Makefile target html for the calling sequence. We need the plain TEX command in order to generate the index for the .html output.

430anecessary programs 348+   (346 422)  429b  430b
HTLATEX=latex
TEX4HT=tex4ht
T4HT=t4ht
TEX=tex

Defines:
HTLATEX, used in chunks 375 and 386.
T4HT, used in chunk 375.
TEX, used in chunk 386a.
TEX4HT, used in chunk 375.

Of course, for viewing the compiled files a viewer is necessary. These programs are, however, not vital to produce the documentation.

430bnecessary programs 348+   (346 422)  430a  433a
DVIVIEWER=xdvi
PDFVIEWER=acroread
DVIPS=dvips
PSVIEWER=gv
HTMLVIEWER=firefox

Defines:
DVIPS, used in chunk 373b.
DVIVIEWER, used in chunk 374a.
HTMLVIEWER, used in chunk 375.
PDFVIEWER, used in chunk 374b.
PSVIEWER, used in chunk 373b.