PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: Configuration Macros[Next]: HOOK_MSG_MAKING
\ -> Configuration -> Configuration Macros -> HOOK_DEPENDSON


Using this configuration macro it is possible to tweek the contents of a generated dependancy file by adjusting the stored information before the file is written.

This hook is only called if dependancy checking is turned on, you can use the GetDependancyInfo() routine to access the same information whether or not checking is on.

The rexx code has access to:

Example Filter #1

An example of a hook which ensures that no output dependancies are recorded follows:

   ;--- Don't generate any output dependanies -------------------------------
   DepOut.0  = 0;

   ;--- Clear specific input dependancy -------------------------------------
;;;DepIn.1 = '';          ;;Changing to blank saves having to compress array

   ;--- Don't create dependancy file after all ------------------------------
;;;DepDrop = "Changed my Mind";

Since in this case PPWIZARD does not know about the output dependancies you can safely manipulate or delete these without ppwizard remaking them. In general I don't recommend this approach but it is another option for you.

Example Filter #2

The following code shows how you can ensure that any absolute filenames used in input dependancies are converted into relative directories where they are within the current directory tree.

I needed to do this where the output is generated to a network drive (as is the dependancy file) but the input files are located somewhere on the users drive. If I didn't have the hook, someone else getting the source out of PVCS and making it will always recreate the files whether or not they have "changed".

   ;--- Clear specific input dependancy -------------------------------------
   @@CurrentDir = translate(directory());
   @@Len = length(@@CurrentDir);
   do  @@I = 1 to DepIn.0
       @@File = DepIn.@@I
       if  left(@@File, 1) <> '*' then
           ;--- A "real" file -----------------------------------------------
           @@FileU = DepIn.@@I
           if  left(@@FileU, @@Len) = @@CurrentDir then
               @@File = '.' || substr(@@File, @@Len+1);
       DepIn.@@I = @@File;

email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: Configuration Macros[Next]: HOOK_MSG_MAKING

My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Saturday May 28 2022 at 2:55pm