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.

429necessary programs 352+   (350 427)  354b  431b
ALDOR=$(ALDORROOT)/bin/aldor

Defines:
ALDOR, used in chunks 360, 447b, 448, and 455a.
ALDORROOT, used in chunks 361, 428a, 443a, and 543.

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

431ahello.as 431a
#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.

431bnecessary programs 352+   (350 427)  429  432
export PERL=perl

Defines:
PERL, used in chunks 367, 369–72, 375, 376, 382, 412, 414, 415, 417b, 424, 433a, 435, 437a, 440, 461, 468b, 470, 548, 549, 553, and 555.

29.2.3 Common UNIX Programs

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

432necessary programs 352+   (350 427)  431b  433a
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 448.
ARREPLACE, used in chunks 447b and 448.
FIND, used in chunks 406 and 415.
MDparent, used in chunks 356, 378a, 410, and 420b.
RANLIB, used in chunk 447a.
RMrecursive, used in chunks 356, 406b, 412, and 420b.

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.

433anecessary programs 352+   (350 427)  432  433b
CREATEIFNOTTHERE=$(PERL) -e’$$A=$$ARGV[0];if(! -f $$A){open(F,">$$A");close F}’

Defines:
CREATEIFNOTTHERE, used in chunks 366 and 417a.

Uses PERL 431b.

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.

433bnecessary programs 352+   (350 427)  433a  434a
LATEX=latex
PDFLATEX=pdflatex
MAKEINDEX=makeindex
BIBTEX=bibtex

Defines:
BIBTEX, used in chunk 383b.
LATEX, used in chunks 379a, 385, and 391b.
MAKEINDEX, used in chunks 385 and 391a.
PDFLATEX, used in chunks 379b, 385, and 391b.

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.

434anecessary programs 352+   (350 427)  433b  434b
HTLATEX=latex
TEX4HT=tex4ht
T4HT=t4ht
TEX=tex

Defines:
HTLATEX, used in chunks 380 and 391.
T4HT, used in chunk 380.
TEX, used in chunk 391a.
TEX4HT, used in chunk 380.

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

434bnecessary programs 352+   (350 427)  434a  437a
DVIVIEWER=xdvi
PDFVIEWER=acroread
DVIPS=dvips
PSVIEWER=gv
HTMLVIEWER=firefox

Defines:
DVIPS, used in chunk 378b.
DVIVIEWER, used in chunk 379a.
HTMLVIEWER, used in chunk 380.
PDFVIEWER, used in chunk 379b.
PSVIEWER, used in chunk 378b.