<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2008 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>5 The %.variables rule - second make invocation</TITLE> <META NAME="description" CONTENT="5 The %.variables rule - second make invocation"> <META NAME="keywords" CONTENT="internals"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2008"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="internals.css"> <LINK REL="next" HREF="node7.html"> <LINK REL="previous" HREF="node5.html"> <LINK REL="up" HREF="internals.html"> <LINK REL="next" HREF="node7.html"> </HEAD> <BODY BGCOLOR="#FFFFFF" text="#000000" link="#0000FF" vlink="#4444FF" alink="#3388FF"> <B> Next: <A NAME="tex2html70" HREF="node7.html">6 Second make invocation</A> </B> <B>Up: <A NAME="tex2html68" HREF="internals.html">GNUstep Makefile Package Internals</A> </B> <B> Previous: <A NAME="tex2html62" HREF="node5.html">4 The %.variables rule</A> </B> <BR> <P> <!--End of Navigation Panel--> <H1><A NAME="SECTION00060000000000000000"> 5 The %.variables rule - second make invocation</A> </H1> The rule body parses the <TT>%.variables</TT> string - for example when the rule is applied to <PRE> decrypt.all.tool.variables </PRE> then (remember that <TT>$*</TT> is the stem of the rule, <TT>decrypt.all.tool</TT> in this case) it extracts <PRE> target=decrypt operation=all type=tool </PRE> and then it runs a make subprocess, specific to that target, type and operation. In our case, the <TT>%.variables</TT> rules is executed twice, once to build <PRE> decrypt.all.tool.variables </PRE> and once to build <PRE> libDvd.all.tool.variables </PRE> so the result is to run two separate make processes: <PRE> make internal-tool-all INTERNAL_tool_NAME=decrypt TARGET=decrypt \ _SUBPROJECTS="$(decrypt_SUBPROJECTS)" \ OBJC_FILES="$(decrypt_OBJC_FILES)" \ ... make internal-library-all INTERNAL_library_NAME=libDvd TARGET=libDvd \ _SUBPROJECTS="$(libDvd_SUBPROJECTS)" \ OBJC_FILES="$(libDvs_OBJC_FILES)" \ ... </PRE> where <TT>...</TT> stands for a lot of other variables, including all variables needed to perform the final stage: <TT>OBJC_FILES</TT>, <TT>C_FILES</TT>, <TT>JAVA_FILES</TT>, <TT>ADDITIONAL_INCLUDE_DIRS</TT> etc. Note that each make subprocess will get passed different, specific, variables. If gnustep-make wants to modify these variables in some way, it does it at this stage, before passing them to the submake process. For example, some library flags are filtered through the <TT>WHICH_LIB_SCRIPT</TT>. <P> What this means is that for each target/type/operation, a separate make process is run. For example, if you have two tools, <TT>decrypt</TT> and <TT>crypt</TT>, and you want to both compile and install them, it will run four make subprocesses: <PRE> make internal-tool-all INTERNAL_tool_NAME=decrypt ... make internal-tool-all INTERNAL_tool_NAME=crypt ... make internal-tool-install INTERNAL_tool_NAME=decrypt ... make internal-tool-install INTERNAL_tool_NAME=crypt ... </PRE> This is the `second make invocation'. The make package knows that it is being invoked for the second time, because of the <TT>INTERNAL_tool_NAME</TT> being non-empty. <P> <HR><B> Next: <A NAME="tex2html70" HREF="node7.html">6 Second make invocation</A> </B> <B>Up: <A NAME="tex2html68" HREF="internals.html">GNUstep Makefile Package Internals</A> </B> <B> Previous: <A NAME="tex2html62" HREF="node5.html">4 The %.variables rule</A> </B> <!--End of Navigation Panel--> <ADDRESS> 2009-06-03 </ADDRESS> </BODY> </HTML>