1 I wrote a makefile today: I do not like make, but it is widespread.
2 makefiles do not need to be huge and ugly,
4 because they are generated by automake or similar.
6 At first, I used POSIX make,
7 thinking it would be fine for a small project like minish;
8 then I rewrote it using GNU make,
9 because POSIX make does not support phony targets.
10 If a makefile contains the line
11 .PHONY: target1 target2 target3
12 then target1, target2 and target 3 are phony:
13 they do not refer to some files, but rather to an action.
14 This is useful, for example, for all, install, and clean,
15 so that those action can be performed
16 even if there are files with thus named.
18 There is no install target yet,
19 because minish is not yet ready to be installed.
21 The makefile is called GNUmakefile
22 to make clear that it is not a POSIX makefile.
23 If you run make but you are not using GNU make,
24 it will not find a makefile.
26 Even if the makefile is GNU-specific,
27 the minish source code is still POSIX C.
29 I also fixed a small bug,
30 in which _POSIX_SOURCE was defined instead of _POSIX_C_SOURCE.
32 I discovered, but not fixed, another bug:
33 when minish-once is not found, minish loops,
34 because only its child terminates.
37 https://fabianstumpf.de/articles/makefiles.htm
38 https://simson.net/ref/1997/recursive_make.pdf
39 https://ewontfix.com/3/
40 https://ewontfix.com/9/