|
|
Make Concept thoughtsMerge makefiles with IDE project filesAll IDEs have project files hierarchy like .vcproj in Visual Studio. The same thing is in Makefile world: all make-based source trees have Makefile hierarchy. There is functionality in IDEs to generate makefiles and some make-systems in turn have functionality to convert their makefiles into IDE project files. The example is CMake that can convert its makefiles to Visual Studio project files and Visual Studio can create MS Nmake makefiles. The two hierarchies are separate and it is not convenient:
Pattern rules vs. alternativesIn standart make pattern rules and alternative functionality is mixed. For example%.o : %.cpp %.o : %.care the alternatives to make .o files from .cpp or .c files. But what if we want to have alternatives for explicit targets. For example a.obj : a.cpp ; a.obj : a.c ;We cannot do this because standart make does not have alternative functionality for explicit targets. And what if we want to have a pattern rule just to have a pattern which is not the alternative: %.dir :; cd $* ; make # (this is cd to % and run make)We also cannot do this because standart make treat each pattern rule as an alternative and process them differently from non-alternate explicit rules. To understand this you can analyze the output of the following two pieces of code by GNU make: a:b.o; %.o:c; # pattern rule a:b.o; b.o:c; # explicit ruleGNU make does not report an error for pattern targets because it does not know for what alternative to report an error. This makes harder for the user to understand an error for pattern targets. The decision of this problem could be extending syntax which splits alternative and pattern functionality.
The website was built by Fastmake and Genshi template engine.
Authorship and copyright (C) Vitaly Grechko vitaly@grechko.ru 2008-2010
|