Next: 3 From the internal-all Up: GNUstep Makefile Package Internals Previous: 1 Introduction

2 From `make' to the internal-all rule

Imagine for example that in your GNUmakefile you include both tool.make and library.make, as in the following example:
include $(GNUSTEP_MAKEFILES)/common.make

TOOL_NAME = decrypt
decrypt_OBJC_FILES = decrypt.m

LIBRARY_NAME = libDvd
libDvd_OBJC_FILES = decss.m

include $(GNUSTEP_MAKEFILES)/tool.make
include $(GNUSTEP_MAKEFILES)/library.make
Then you type `make' on the command line. We want to understand what happens.

Make will process your GNUmakefile, which includes tool.make, and that will include rules.make. In rules.make make finds the first rule (the one which is executed), which is

all:: before-all internal-all after-all
This means that make will build by default that target all, and that building that target requires building the before-all, internal-all and after-all targets. We ignore the before-all and after-all targets for now, and only concentrate on the core target, which is internal-all.



Richard Frith-Macdonald 2013-07-26