JUTIL_BLDMAKE is a utility that will build a Makefile for BASIC code including dependencies for INCLUDEs (recursive)
Note: Makefiles are dependent on individual source file changes. As such, the "BP" and "INCLUDE" files must be directories. Such files will be converted to directories if not already.
Most PICK applications use INCLUDE statements for storing common logic. Often these include definitions for record structures, COMMON blocks.
If any one of these includes change you would typically want to recompile all programs that use these includes.
This is where the Makefile Builder comes in. Using an existing application environment it discovers the INCLUDE statements used in the cataloged programs and subroutines and builds a Makefile with dependencies that recognise if an INCLUDE is changed the Makefile will know which programs need recompiling/cataloging.
The Makefile Builder requires the a ,OBJECT data level for all BP files.
e.g. BP]MOBJECT
and that both the BP file and OBJECT be directories. A utility is provided to do that for you:
CONVBP2DIR BP_file
additionally JUTIL_BLDMAKE has an option to automatically do this (see below).
You will need access to GNU make of non-Windows or nmake.exe for Windows.
Run make to build the project.
This will generate bins and libs which you will need to add to your PATH and JBCOBJECTLIST respectively so that you can build your Makefiles.
- Change directory to the top tree where "BP" source files are located.
- Create bin/lib directories if not already in existence. (You may need to clear these for a clean Makefile result...see step 3.)
- If you cleaned out your local bin/lib directories: BASIC/CATALOG all source to the local bin/lib
- Set PATH and JBCOBJECTLIST such that these local bin/lib will correctly detect the cataloged programs. (this may already be the case for an existing project)
- set JUTLMAKEBINS and JUTLMAKELIBS to the project's bin and lib path (So as to restrict the bin/lib discovery to only the project and not what is in the full PATH/JBCOBJECTLIST)
- Run JUTIL_BLDMAKE (with appopriate options)
Syntax: JUTIL_BLDMAKE {-options}
Where options:
-[?,h,H] help/syntax
-v Verbose
-f<makefilename> (default: Makefile)
-o Overwrite
-m Ignore missing errors
-s Build new catalog metadata
-C Convert BP files (convert to dir, create OBJECT directory if missing)
| Program | Description |
|---|---|
| JUTIL_GETCATS | Discovers cataloged programs/subroutines (called by JUTIL_BLDMAKE -s) |
| JUTIL_BASIC | Compiles all code discovered by JUTIL_CATS |
| JUTIL_CATALOG | Catalogs all code discovered by JUTIL_CATS |
| JUTIL_CHECKBAS | Checks if the code is compiled (including checking if the object is newer than the source) |
| CONVBP2DIR | Converts a BP hashed file to a DIR type and creates a BP,OBJECT director if applicable |
This utility generates JUTLCATS and JUTLLIBS and additionally writes out two files to the current directory:
- executes_found
- subroutines_found
These two files are not meant to be definitive discoveries of programs and subroutines EXECUTEd or CALLed but can be useful for getting an overview of what is in use. The only entries written out are those that are quoted (for EXECUTE) or not @subname (in the case of CALL).
As well as compiling the source it populates a BASICFAILS file/directory with any failures.