`target.mk' contains canned rules for all the standard targets described in Section See section Standard targets. 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.
All of these rules are "double-colon" rules, thus
install :: $(HS_PROG) ...how to install it...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. This means that you can, for example, define both `HS_PROG' and `LIBRARY', which will generate two rules for `install'. When you type `gmake install' both rules will be fired, and both the program and the library will be installed, just as you wanted.