3 ms·
In my experience, make is coupled to Unix. Make is not coupled to C. However, implementations typically include magic that is heavily biased toward building C
by Silhouette 13y ago
In my experience, make is coupled to Unix. Make is not coupled to C.
However, implementations typically include magic that is heavily biased toward building C and C++ code. As someone who works on a lot of projects, some using those languages and some not, I tend to think it's rather too magical at times. Personally, I'd prefer to have that kind of magic explicitly stated in some standard file that comes with the tool, so that file can be included with a one-liner for those projects that want it but there is nothing implicit going on by default.
- mturmon 13y agoI think "magic" is much too loaded a way to characterize it. The rule applicable to C pertains to building foo.o from foo.c. It amounts to two lines in a Makefile: %.o: %.c $(COMPILE.c) $(OUTPUT_OPTION) $< where COMPILE.c and the other variable is predefined to trivial values. There are other rules useful for C++, and for yacc, etc., but they are just as simple. You can cancel all the implicit rules with "-r", or cancel selected implicit rules by naming them in the Makefile like this: %.o : %.c ; All this is in the make manual, which is quite good: https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html https://www.gnu.org/software/make/manual/html_node/Catalogue...