4 ms·
There are some dangerous and subtle problems with this tutorial. In order to handle long options and empty short options, when searching MAKEFLAGS you really n
by o11c 1y ago
There are some dangerous and subtle problems with this tutorial.
In order to handle long options and empty short options, when searching MAKEFLAGS you really need to do:
ifneq (,$(findstring t,$(firstword -$(MAKEFLAGS))))
If you need compatibility with the ancient version of `make` shipped by default on OS X, not that it is missing a lot of functions and features, some subtly.
Most other problems are either obvious typos or due to violating best-practice style, so I won't go into them.
Note also that `load` is actually more portable than `guile`, but make sure you use the correct compiler in case you're cross-compiling the main project.
***
Really you should just read Paul's Rules of Makefiles [1], then the GNU make manual [2]. Some of the other manuals related to GNU build tools are also relevant even if you aren't using the particular tool. I also have a demo project [3] if you just want something that works and isn't complicated.
[1]: https://make.mad-scientist.net/papers/rules-of-makefiles/ https://make.mad-scientist.net/papers/rules-of-makefiles/
[2]: https://www.gnu.org/software/make/manual/ https://www.gnu.org/software/make/manual/
[3]: https://github.com/o11c/makefile-demo https://github.com/o11c/makefile-demo