- No idea whats up with the QUIET_* variables as most of them dont seem to get used
- $(RM), $(CP), $(MKDIR) and $(ECHO) are unnecessary - these variables are for programs that are not portable. These 4 are some of the few portable ones.
- It only builds and installs a single executable (without extension), no library, no headers
- The install target does not honour DESTDIR, but distributors can get away with prepending it to PREFIX. For programs that use the PREFIX at build time, thats not okay.
Makefile portability is hard. Take this makefile and try to build on FreeBSD or cross-compiling for Windows (where executables have a suffix). Or cross-compiling in general.
interesting! how much of this is already implemented with implicit rules? is there any documentation about how to adapt this to one's own projects? how does a user trigger the verbosity on and off for example, is it `-DV=1 -Dsilent=0` to get all the nice debugging?
Some things seem hardcoded and some things are not, e.g. $LANG specifies the file extension (not language) of the input files, but the assumption is that each of these files winds up as a .o, so there's some tweaking required for your projects.
- $(RM), $(CP), $(MKDIR) and $(ECHO) are unnecessary - these variables are for programs that are not portable. These 4 are some of the few portable ones.
- It only builds and installs a single executable (without extension), no library, no headers
- The install target does not honour DESTDIR, but distributors can get away with prepending it to PREFIX. For programs that use the PREFIX at build time, thats not okay.
Makefile portability is hard. Take this makefile and try to build on FreeBSD or cross-compiling for Windows (where executables have a suffix). Or cross-compiling in general.