[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to interpret commands between colon and first tab ?
From: |
Paul Smith |
Subject: |
Re: How to interpret commands between colon and first tab ? |
Date: |
Mon, 23 Nov 2015 12:04:26 -0500 |
On Mon, 2015-11-23 at 17:57 +0100, Ewan Delanoy wrote:
> Hello all, I'm rather new to make (only used it without reading the
> manual so far).
> The "all" target in a makefile for gcc5-2.0 looks like below. Notice
> that this code snippet contains
> no tab at all after the colon (the first tab is much further in the
> code). I could not find in the
> GNU make manual a mention of how make treats those particular regions
> in the makefile.
> all:
The above introduces a rule "all:" which has no prerequisites and no
recipe (because the next non-whitespace, non-comment line is not
indented by a TAB).
> #### host and target specific makefile fragments come in here.
> # The -mdynamic-no-pic ensures that the compiler executable is built
> without
> # position-independent-code -- the usual default on Darwin. This fix
> speeds
> # compiles by 3-5%. Don't add it if the compiler doesn't also support
> # -mno-dynamic-no-pic to undo it.
These rest are just variable assignments, using the ":=" simple variable
assignment syntax.
> DARWIN_MDYNAMIC_NO_PIC := \
> `case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
> $(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null
> \
> && echo -mdynamic-no-pic ;; esac`
> DARWIN_GCC_MDYNAMIC_NO_PIC := \
> `case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
> $(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null
> \
> || echo -mdynamic-no-pic ;; esac`