Here's how to understand the rule. It is complicated by the fact that you don't want all of these rules to be active in every Makefile . Rather than have a plethora of tiny files which you can include selectively, there is a single file, target.mk , which selectively includes rules based on whether you have defined certain variables in your Makefile . This section explains what rules you get, what variables control them, and what the rules do. Hopefully, you will also get enough of an idea of what is supposed to happen that you can read and understand any wierd special cases yourself.
GNU make treats double-colon rules as separate entities.
If there are several double-colon rules for the same target it takes each in turn and fires it if its dependencies say to do so. When you type gmake install both rules will be fired, and both the program and the library will be installed, just as you wanted. This guarantee can be important. Generally, put the most independent sub-directory first, and the most dependent last. For example, we want to build ghc 's Prelude libraries with and without profiling, with and without concurrency, and so on, so that there is an appropriately-built library archive to link with when the user compiles his program.