Except for the files mentioned in the clean target (in particular except GPL, README, and ChangeLog), we can generate any code from a corresponding .nw file.
The Makefile appears as an extra target in order to maintain the necessary tabulators in a Makefile.
Note the redefinition of CODEFILES in src/Makefile.nw and test/Makefile.nw.
The variable CODEFILES is only connected to the generated of the code files. The variable ASFILES does not depend on CODEFILES. However, CODEFILES depends on ASFILES.
Due to a bug in Noweb 2.10c we need to run the .nw files through the filter tools/nwescape.pl.nw.
Makefiles should be generated from the .nw source by passing the -t8 option to NOTANGLE, because Makefiles must contain tabs (ASCII 09) in rules and by default NOTANGLE replaces tabs by spaces. We introduce here a general rule which generates a file from its corresponding .nw file. Furthermore, we assume that any Makefile in ALLPROSE starts with the letters Makefile. For such patterns we set a pattern-specific variable NOTANGLETABS. By default NOTANGLETABS is empty for non-Makefiles.
There are already rules in Makefile.nw for the targets Makefile.def and Makefile.inc. We exclude them here in order to avoid needless warnings from MAKE.