======================================================================== Version 3.4 Notes ======================================================================== o Repaired some misfeatures in the CMS interface - The symbol 'CMS' is no longer defined. - If the %CMSGEN directive is encountered, the symbol 'CMSGEN' is defined as "/GEN=". Otherwise, it is an empty string, but is still available as a symbol. - If the %CMSLIB directive is encountered, the symbol 'CMSLIB' is defined to have the same value as the %CMSLIB directive. Otherwise, it is UNDEFINED. o The help file was updated. ======================================================================== Version 3.3 Notes ======================================================================== o Dynamic data structures The data structures are almost all dynamically allocated, to allow large makefiles to be interned. The only significant static structures are the input buffer, which is limited to 256 characters by default, and the input line expansion buffer, which is limited to 2560 characters. o Generalized wildcarding in default rules The '*' in a default rule does not have to be the first character in the rule any more. Only one asterisk may be present in the rule, but it may occur anywhere in the string and will be properly replaced by the root matching name at runtime. ======================================================================== Version 3.2 Notes ======================================================================== 0. Data Structures ------------------ The data structures were re-written so that (hopefully) a significant improvement in the speed of parsing and making will be observed. Many strings that were malloc'ed on the fly are now character arrays on the stack. I'm pretty sure this is more efficient than lots of repetitive calls to malloc(). Where I was uncertain about the maximum length of a string, I left it as a dynamically allocated string. The 'File' structure retains more information about the file so that it is unnecessary to access the file more than once for any reason. 1. The Command Interface ------------------------ The command interface for MAKE uses DCL qualifiers instead of UNIX switches. MAKE/HELP will produce the list of acceptable qualifiers. 2. Default Rules ---------------- Rules are added to the head of the default rules list, so that if a redundant default rule is encountered it supersedes the old copy, since lists are searched from head to tail. Multiple default rules for a given target are allowed. This means that a .OBJ may depend on .C OR .MAR OR .CLD. Just list each rule separately. The first rule that matches the target AND has an existing matching prerequisite is 'made'. If no matching rule is found that has a prerequisite that exists, the first rule (if any) that matched the target is used. If more than one default rule matches, the LAST one in the makefile(s) is used. 3. Target Line syntax --------------------- Target lines have a new extension to the syntax. The allowable delimiters for targets and prerequisites are whitespace (old) and commas (new). This allows one to define a symbol as a list of object modules separated by commas, so that the symbol may be used in both the target line and the link command. The colon separating the targets from the prerequisites must still be followed by at least one whitespace character if there are any prerequisites. 4. Symbol Definitions --------------------- Additional definitions of a symbol supersede the old value. All whitespace at the beginning of the symbol definition is eaten. Internally, superseding a symbol frees the old value's storage and allocates new storage for the new value. 5. Continuation Lines --------------------- Continuation lines are handled in a much cleaner manner. The allowable continuation characters are the backslash '\' and the hyphen '-'. Upon digesting an input line, both are converted to a backslash. When target lines are parsed, all backslashes are converted to spaces, so it is important not to continue a line in the middle of a target name. When DCL command lines are added to the output file, backslashes are converted to hyphens and the line is broken after the hyphen. If a line is both a DCL data line ('$' at the end) and a continued line ('-' at the end), the proper syntax is '-$', since internally the '$' is parsed and removed first. 6. Directives ------------- Directives are commands to MAKE embedded in the makefile which give it certain information. They must be ALL CAPS. The directive '%INCLUDE' will cause MAKE to parse the specified file. '%CMSLIB' will indicate to MAKE the name of a CMS library to use as a default in cases of missing specifications. Directives must begin in the first column of a line. This is the complete list of directives: %INCLUDE Read in and parse an additional makefile %CMSLIB Establish a default CMS library for CMS target %CMSGEN Select a specific generation %DEBUG Turn on debugging (like MAKE/DEBUG) %NODEBUG Turn off debugging %SPAWN Cause commands to spawn (like MAKE/SPAWN) %NOSPAWN Cause commands to execute in current process 7. Specifying CMS Elements -------------------------- The file specification syntax has been augmented to support CMS modules. Following a normal file specification with a '~' indicates that the file is located in a CMS library. Any characters following the tilde are interpreted as the CMS library. For example, to specify module FOO.C in CMS library FOO_DEV:[TEST], the correct 'file name' would be 'FOO.C~FOO_DEV:[TEST]'. Alternatively, the '%CMSLIB' directive can be used to set the default CMS library and the 'file name' would be 'FOO.C~' (the directive would be '%CMSLIB FOO_DEV:[TEST]'). If no %CMSGEN directive is encountered, the highest generation of the element(s) will be examined. The symbol '${CMS}' is ALWAYS available to the user. If no %CMSGEN directive has been encountered, the 'CMS' symbol value is "CMS". If you define a CMS generation, the symbol 'CMS' is set to "CMS/GEN=" where is the value from the %CMSGEN directive. 8. Filenames With Qualifiers Attached ------------------------------------- It seems to happen often that I'd like to have a symbol defined as the list of files linked into my executable, and I'd like to use the symbol in the target line and the link command. With options files and object libraries you must have a qualifier in the link command to denote the special nature of those files, but if you put the qualifier on the name of the file in the symbol definition, the target parsing would choke. Well, by golly I fixed it! In parse_target_line(), I discard "/" and anything following it in a filename. For example, the makefile might look like this: OBJS = foo.obj,foo.opt/opt foo.exe: ${OBJS} link ${OBJS}