Next: Part IV: Appendices Up: 5 Management under UNIX Prev: 5.3 Description of commands Contents

5.4 Up-date of the MODULEF library source code

5.4.1 Reception - Reading the data

In order to perform the MODULEF up-date with Unix, we will deliver a file containing the up-date ( $MR/ascii/sta/etc/ by e-mail.

This file must be stored in the directory $MR/ascii/sta/etc

5.4.2 Up-date


The re-update is performed using the UNIX command patch. This command considers the differences ([note] produced, for example, by command diff) between files and applies these differences to the original file, thus creating a new version.

A C program ( prepatch) which reads file (containing the differences) and calls command patch has been written.

Command patch is used with options -c et -N ; these options allow us to enforce the command to interpret the modifications as output from command diff, and ignore the modifications once they have been applied.

All the messages generated during the call of the patch procedure are stored in file patch.log.


Now that you have received the package, go to directory containing the Makefile of the re-update:

cd $MR/ascii/com.util/patch

The Makefile assumes that variable MR is initialized correctly in the current environment; if this is not the case at the time when the make command is called, add the option:

-e MR= name of the directory where MODULEF has been installed

During execution of the Makefile, updating the MODULEF source code, it is assumed that the patch command is not available on your machine. The Makefile performing the update can therefore correspond to two situations:

To find out whether the patch command exists, enter:

which patch and/or man patch

Depending on the two possibilities, we will now indicate the way in which the Makefile must be called:

The command exists already:
It suffices, when calling the Makefile, to indicate the complete name of the patch command in variable PATCH:
make -e PATCH=`which patch`

The patch command does not exist yet:
The update will be performed in two steps:
  1. creation of command patch:
    during the first step, it is advisable to login at the root so that the patch command will be accessible to all thereafter;
     su root
     make patch -e Install=install

    The patch command is then stored in directory /usr/local/bin (in general), and the man is installed.

    If you cannot login at the root, you need to execute command:

    make patch

    The patch command is then created in directory


  2. update



5.4.3 Complementary information about UNIX command: patch

The command's source and complementary information are given in directory:

$MR/ascii/com.util/patch/patch-2.0.12u7 (file README).

If, on HP/Apollo or Sun4, the Makefile to create the patch is interrupted during execution of command file Configure, you can try to restart the Makefile (make patch) by first executing the command:

make init_apollo if you work on HP/Apollo
make init_sun4 if you work on Sun4

Execution of target init_xx will enable you to avoid executing command file Configure (see documentation on patch command), and we then use a configuration which was established beforehand.

Next: Part IV: Appendices Up: 5 Management under UNIX Prev: 5.3 Description of commands Contents