tools-make/Master
Adam Fedor 7954dc3422 Apple compiler checking, other fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@19806 72102866-910b-0410-8b05-ffd578937521
2004-08-01 02:33:45 +00:00
..
aggregate.make Pass GNUSTEP_BUILD_DIR to submake invocations 2003-10-13 23:23:49 +00:00
application.make Clean in the build directory 2003-10-13 23:24:25 +00:00
bundle.make Clean in the build directory 2003-10-13 23:24:25 +00:00
clibrary.make Clean in the build directory 2003-10-13 23:24:25 +00:00
ctool.make Clean in the build directory 2003-10-13 23:24:25 +00:00
documentation.make Extracted from top-level documentation.make 2002-02-22 01:20:42 +00:00
framework.make Define FRAMEWORK_NAME here 2002-11-06 13:19:39 +00:00
gswapp.make Clean in the build directory 2003-10-13 23:24:25 +00:00
gswbundle.make Clean in the build directory 2003-10-13 23:24:25 +00:00
java-tool.make Tidied comments 2002-10-22 00:32:03 +00:00
java.make Tidied comments 2002-10-22 00:32:03 +00:00
library.make Clean in the build directory 2003-10-13 23:24:25 +00:00
objc.make Clean in the build directory 2003-10-13 23:24:25 +00:00
palette.make Clean in the build directory 2003-10-13 23:24:25 +00:00
README Fixed some grammar typos 2002-01-30 18:59:43 +00:00
resource-set.make Do absolutely nothing on all, clean and distclean 2002-03-05 11:35:10 +00:00
rpm.make Use PACKAGE_VERSION instead of VERSION for versions of packages. 2004-01-14 19:00:41 +00:00
rules.make Documentation building fix. 2004-05-07 09:33:34 +00:00
service.make Clean in the build directory 2003-10-13 23:24:25 +00:00
source-distribution.make Apple compiler checking, other fixes 2004-08-01 02:33:45 +00:00
subproject.make Clean in the build directory 2003-10-13 23:24:25 +00:00
test-application.make Clean in the build directory 2003-10-13 23:24:25 +00:00
test-library.make Clean in the build directory 2003-10-13 23:24:25 +00:00
test-tool.make Fixed distclean, broken by a typo in last changes 2003-10-15 15:59:30 +00:00
tool.make Fixed distclean, broken by a typo in last changes 2003-10-15 15:59:30 +00:00

The 'Master' invocation is the first time that 'make' is run on any
GNUmakefile in your project.

During the 'Master' invocation, gnustep-make determines exactly what
it needs to build.  For example, in the following GNUmakefile -

include $(GNUSTEP_MAKEFILES)/common.make

LIBRARY_NAME = libquantum
TOOL_NAME = create destroy

create_OBJC_FILES = create.m
destroy_OBJC_FILES = destroy.m
libquantum_OBJC_FILES = quantum.m

include $(GNUSTEP_MAKEFILES)/library.make
include $(GNUSTEP_MAKEFILES)/tool.make

the 'Master' invocation will determine that we need to perform the
following logically separated operations - 

type:library name:libquantum operation:all
type:tool    name:create     operation:all
type:tool    name:destroy    operation:all

It will then run an 'Instance' invocation for each of these tasks.
The 'Instance' invocation is a submake invocation, with some special
variables set telling it exactly what task it needs to perform out of
all the available ones.  The 'Instance' invocation will read the same
user GNUmakefile(s) as the 'Master' invocation, but will use different
system makefiles.  The 'Instance' invocation will actually include and
use all the code to perform the required tasks.

The role of the 'Master' invocation is very limited.  It needs to
determine which 'Instance' invocations to run, and then exit.

Please note that we have a 'Master' invocation per each GNUmakefile in
your project.  We have an 'Instance' invocation per each logically
separate thing to do in your project.

You might wonder why we use 'Instance' invocations at all, and why we
don't actually perform each instance task inside the 'Master'
invocation itself.  The explanation is very technical ... in a few
words, we can't because of limitations of make.  The problem is that
if you have multiple instances of the same type, say multiple
libraries or multiple tools or multiple yyys (or all of them), each
one might require an arbitrarily complex makefile code to be built,
which should change according to the value of xxx_ANY_VARIABLE_HERE,
where xxx is the library/tool/yyy name.  So we have the problem that
we need to execute the same makefile code with an arbitrary value of
xxx, for each xxx.  That is difficult to do in the same make
invocation, because the make grammar doesn't contain any looping
construct allowing us to include the same makefile multiple times, one
for each value of xxx.  What we do to work around this problem is, we
run a separate submake invocation per instance to be built.