[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Meaning of @:
From: |
Ewan Delanoy |
Subject: |
Re: Meaning of @: |
Date: |
Thu, 26 Nov 2015 14:36:59 +0100 |
If I understand correctly, the $(MAKE) after the colon will never get
executed, so
there's no point in putting it there (except perhaps as a somewhat
cryptic comment)
Envoyé: jeudi 26 novembre 2015 à 14:03
De: "David Boyce" <address@hidden>
À: "Ewan Delanoy" <address@hidden>
Cc: help-make <address@hidden>
Objet: Re: Meaning of @:
The colon is not a make feature at all but a shell construct. It’s a
“do-nothing” command; the result is similar to commenting out the
line, except that in this case the $(unstage) action would still take
place since it’s separated by a semicolon.
BTW this is a badly written makefile because “;” should almost never
be used in a make recipe since it throws away exit status. A good
recipe uses && to separate commands which might fail. Consider the
canonical typo example: “cd /tmpp; rm -rf *” vs “cd /tmpp && rm -rf
*”.
On Thu, Nov 26, 2015 at 4:55 AM, Ewan Delanoy <address@hidden>
wrote:
>
>
> Below is the "bootstrap" rule in gcc5.2.0's Makefile. What I don't
> get is the meaning
> of the @: at the beginning of the seventh line. I couldn't find it in
> the manual.
> I only know that @ before a shell command makes that command executed
> but not displayed,
> but why add the : ?
>
>
> .PHONY: bootstrap bootstrap-lean
> bootstrap:
> echo stage3 > stage_final
> @r=`${PWD_COMMAND}`; export r; \
> s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
> $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage3-bubble
> @: $(MAKE); $(unstage)
> @r=`${PWD_COMMAND}`; export r; \
> s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
> TFLAGS="$(STAGE3_TFLAGS)"; \
> $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
> _______________________________________________
> Help-make mailing list
> address@hidden
> [1]https://lists.gnu.org/mailman/listinfo/help-make
References
1. https://lists.gnu.org/mailman/listinfo/help-make