|
| 1 | +# gmake-proxy |
| 2 | + |
| 3 | +`gmake-proxy` consists of a single `BSDmakefile` that can be dropped into any project |
| 4 | +with an existing `Makefile` relying on syntax specific to GNU make. Instead of seeing |
| 5 | +and endless wall of errors as bmake attempts (and fails) to parse the gmake-specific, |
| 6 | +with this `BSDmakefile` in place, `make` will silently proxy all commands (and even |
| 7 | +attempt to forward commandline options in a compatibile manner) to GNU make if `gmake` |
| 8 | +is found. |
| 9 | + |
| 10 | +If `gmake` is not installed, this makefile will emit the appropriate error message |
| 11 | +informing the end user that `gmake` is required to compile the project in question. |
| 12 | + |
| 13 | +## How this works |
| 14 | + |
| 15 | +Since the split from the original AT&T `make`, both GNU's `make` and the BSD `make` |
| 16 | +have adopted different syntax to improve and expand the makefile syntax. These |
| 17 | +syntaxes changes are largely incompatible with one another. While the BSD makefile |
| 18 | +syntax is typically seen as being cleaner and clearer (and `bmake` can handle paths |
| 19 | +with spaces), the GNU variant of the makefile syntax is by far the more popular of |
| 20 | +the two in random open source projects found around the web. |
| 21 | + |
| 22 | +Fortunately, both GNU `make` and BSD `make` default to a different makefile name that, |
| 23 | +if present, will be used instead of a file named `Makefile` in the project root. For |
| 24 | +BSD `make`, that filename is `BSDmakefile`, while for GNU `make`, that name is is |
| 25 | +`GNUmakefile`. |
| 26 | + |
| 27 | +This project consists of a single `BSDmakefile` that can be dropped into any directory |
| 28 | +containing either a `GNUmakefile` or (as is most common) a platform-agnostic `Makefile` |
| 29 | +that incorrectly contains GNU-specific syntax/code. This `BSDmakefile` will attempt |
| 30 | +to intercept the user's build command and forward it to a GNU `make` instance, relying |
| 31 | +on the presence of GNU `make` installed under the name `gmake`. |
| 32 | + |
| 33 | +## Copyright and authorship |
| 34 | + |
| 35 | +`gmake-proxy` is written and developed by Mahmoud Al-Qudsi of NeoSmart Technologies. |
| 36 | +This project is (aptly) released to the general public under the terms of the two-clause |
| 37 | +BSD license (aka "the simplified BSD license" or "the FreeBSD license"). Please see the |
| 38 | +`LICENSE` file for the full text of the license. |
| 39 | + |
| 40 | +(Code licensed under the BSD license may be freely used in GPL projects, unfortunately |
| 41 | +the converse is not true.) |
0 commit comments