tools-make/Master
Nicola Pero 55bdf21640 Filter away CVS and .svn files when building .tar.gz dist files; create GNUSTEP_OBJ_DIR before putting the rpm file-list in it when building RPMs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@23481 72102866-910b-0410-8b05-ffd578937521
2006-09-13 04:17:52 +00:00
..
aggregate.make * Update FSF Address. 2005-05-22 03:20:14 +00:00
application.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
bundle.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
clibrary.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
ctool.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
documentation.make * Update FSF Address. 2005-05-22 03:20:14 +00:00
framework.make * Master/source-distribution.make (svn-tag): Add comment line 2006-03-27 15:19:12 +00:00
gswapp.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
gswbundle.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
java-tool.make * Update FSF Address. 2005-05-22 03:20:14 +00:00
java.make * Update FSF Address. 2005-05-22 03:20:14 +00:00
library.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
objc.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
palette.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
README Fixed some grammar typos 2002-01-30 18:59:43 +00:00
resource-set.make * Update FSF Address. 2005-05-22 03:20:14 +00:00
rpm.make Filter away CVS and .svn files when building .tar.gz dist files; create GNUSTEP_OBJ_DIR before putting the rpm file-list in it when building RPMs 2006-09-13 04:17:52 +00:00
rules.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
service.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
source-distribution.make Filter away CVS and .svn files when building .tar.gz dist files; create GNUSTEP_OBJ_DIR before putting the rpm file-list in it when building RPMs 2006-09-13 04:17:52 +00:00
subproject.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
test-application.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
test-library.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
test-tool.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +00:00
tool.make Reviewed, optimized and simplified make clean and distclean; tidied up the rpm building; removed obsolete stlocaltz.sh file 2006-09-13 04:01:28 +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.