Changes made at DMAKE v4.0 by Steffen.Kaiser@FH-Rhein-Sieg.DE: Note: None of these changes has been discussed with Danis Vadura. I lost contact with him and several mails returned with failure. Compiled with: Borland C++ v4.52,& v5. The patches includes the following enhancements: 1) I enabled all warnings, except "no prototype", and elimited most of them. This revealed some bugs with sizeof(int) != sizeof(long), e.g. the non-function .FIRST attribute. 2) Changed the .ROOT target into: .ROOT : .INIT .TARGETS .DONE This was mentioned in the manual, but not implemented, yet. Both the .INIT and the .DONE target are made regardless of the "real" targets to be made. 3) Added the "delayed execution" feature. The percent rule: %.obj .SWAP : %.c ; $(CC) $(CFLAGS) -c $< can issue the C compiler many times. Both the swapping and the spawning of the compiler itself can be very time consuming. E.g. when the files "lib.c", "tmplist.c", and "dbug.c" are to compile, the compiler is invoked three times, including swapping, loading, and compiling three times. By specifying: %.obj .SWAP .DELAYED : %.c ; $(CC) $(CFLAGS) -c @$(mktmp $<) the targets are not made induvidually, but the execution of the compiler is delayed until a recipe is to be made, which does not match this recipe. E.g. when the files "lib.c", "tmplist.c", and "dbug.c" are to compile, the compiler is invoked one time, including swapping, and loading one time and compiling three times. Note: The prerequisites must be ordered that way that they are inferred immediately following each other, e.g. the rules: %.obj .DELAYED : %.asm ; $(AS) $(ASFLAGS) @$(mktmp $<) %.obj .SWAP .DELAYED : %.c ; $(CC) $(CFLAGS) -c @$(mktmp $<) target : 1.asm 2.c 3.asm 4.c define the prerequesites in an order, which causes DMAKE to execute each compiling step induvidually (4 calls). But the rule: target : 1.asm 3.asm 2.c 4.c needs two steps, one to compile "1.asm" and "3.asm" and the second to compile "2.c" and "4.c". All the standard macros: $@, $*, $>, %&, $<, $?, and $^ are preserved and contain a list of the particular macro for each delayed target separated by a single space. Depending on the structure of the makefile the values of $?, $&, and $^ might be worthless. 4) Added a new macro modifier: ? If the macro expands to zero length, it's replaced by the modifier's argument, e.g.: MACRO := MACRO1 := $(MACRO:?default) $(MACRO1) expands to default. MACRO := value MACRO1 := $(MACRO:?default) $(MACRO1) expands to value. Without this change a triple macro substitution would be quite hard: MACRO = $(VALUE1:?$(VALUE2):?default) Had to be written: MACRO = $(null,$(VALUE1) $(MACRO_1) $(VAULE1)) MACRO_1 = $(null,$(VALUE2) $(MACRO_DEFAULT) $(VALUE2)) MACRO_DEFAULT = default