The -bk patch-set contains a number of reasonably backwards-compatible bug-fixes and improvements for GNU make. It is released against the official GNU make; the part before -bkN indicates GNU make version ('cvs' stands for CVS snapshot). The latest version is available from ftp://kolpackov.net/pub/projects/make/bk/ To apply the patch-set execute something like this in the source directory: $ cat ../cvs-bkN/*.patch | patch -p1 You can also apply individual patches with the following command: $ cat ../cvs-bkN/*-.patch | patch -p1 Below is the list of patches with descriptions included in this release. Since cvs-bk5: ~ implicit-double-expansion.patch Two new features: * Special ($@, $<, etc) and target/pattern-specific variables are now available in second expansion. See examples/vdep for an example of how this can be used. * New special variable $- is recognized during second expansion which instructs make to remove prerequisites of the target under consideration that did not come from this implicit rule. Now you can write something like this: foo.o: foo.c foo.h %.o: %.c.md5 $$(addsuffix\ .md5,$$^) $$- $(CC) -o $@ -c $(<:.md5=) Which will change prerequisites `foo.c' and `foo.h' to become `foo.c.md5' and `foo.h.md5' respectively. See examples/md5 for details. + pattern-specific-export.patch Fixes bug that manifests itself in exported pattern-specific variables not being exported. See tests/pattern-specific-export for details. Since cvs-bk4: + not-default.patch New special target .NOT_DEFAULT. Prerequisites of this target are not considered for default target. Note that you have to specify that target is not default before actually defining the it, e.g., the following will not work: foo: bar .NOT_DEFAULT: foo ~ dontcare-inheritance.patch Updated to work properly with the recent changes to the "dontcare" machinery. With this patch and changes from Paul (in cvs head) both bugs described in http://mail.gnu.org/archive/html/bug-make/2004-02/msg00014.html are fixed. - first-prerequisite.patch Fixed in the main trunk. Since cvs-bk3: + first-prerequisite.patch This patch fixes a bug that manifests itself by an order-only prerequisite ending up in $< automatic variable. See http://mail.gnu.org/archive/html/bug-make/2004-04/msg00018.html for more information. + pattern-specific-expansion.patch The following makefile prints 'B' instead of 'A'. a := A %bar : arg := $a %bar : ; @echo $(arg) a := B foobar: The patch adds additional expansion at pattern definition point for simple variables (i.e. declared with :=). Also note that you can inhibit this additional expansion if you want to: %bar : arg := $a $$a With this change the makefile above prints 'A B'. See http://mail.gnu.org/archive/html/bug-make/2004-04/msg00005.html for more information. + realpath.patch Implements $(realpath ) function. See realpath(3) for details. ~ no-implicit-phony.patch Experience has shown that some build systems depend on the implicit phony logic (well, actually their developers simply forget to declare phony targets explicitly). Thus the no-implicit-phony feature is now off by default and should be turned on explicitly. There are two ways to do this: 1. Use command line flag --no-implicit-phony 2. Use MAKEFLAGS variable from inside a makefile. The corresponding makefile fragment might look like this ifneq ($(findstring --no-implicit-phony,$(MAKEFLAGS)),) MAKEFLAGS += --no-implicit-phony endif Since cvs-bk2: + no-implicit-phony.patch This patch inhibits make's ability to assume targets are phony. For example consider the following makefile: foo.o: foo.c @echo building foo.o foo.c: foo.ext foo.ext: @echo building foo.ext Even though there is no actual rule to build 'foo.c' make assumes that this target is phony and is "somehow" updated . With this patch installed make will issue an error unless 'foo.c' is explicitly declared phony. See http://mail.gnu.org/archive/html/help-make/2004-02/msg00028.html for additional information. Since cvs-bk1: + lastword.patch Implements $(lastword ) function which is similar to $(firstword). See http://savannah.gnu.org/patch/?func=detailitem&item_id=2483 for more information. + implicit-double-expansion.patch Implements double expansion in implicit rules. Now make expands prerequisites of an implicit rule twice: first time when make reads the file and second time when make tries to match an implicit rule after the stem (%) substitution. Note that you need to escape '$' if you want the expansion to be delayed. Also you need to escape spaces if you don't want them to be treated as a prerequisite separator. The following example hopefully gives an idea how this could be useful: /%.o : $$(notdir\ %.c) | $$(dir\ /%). gcc -c -o $@ $< .PRECIOUS: %/. %/. : mkdir -p $* $(CURDIR)/i386/foo.o : + dontcare-inheritance.patch This is a somewhat partial fix for the problem described in the following thread: http://mail.gnu.org/archive/html/bug-make/2004-02/msg00014.html In particular the following makefile works as one would expect: -include bar hello: @echo hello bar : foo cp foo bar + version.patch Adds -bkN to the make version and an additional copyright clause.