diff mbox series

[v3,1/9] scalar Makefile: set the default target after the includes

Message ID patch-v3-1.9-2404c4d8b96-20220225T090127Z-avarab@gmail.com (mailing list archive)
State Superseded
Headers show
Series Makefile: optimize noop runs, add shared.mak | expand

Commit Message

Ævar Arnfjörð Bjarmason Feb. 25, 2022, 9:04 a.m. UTC
Make have the "contrib/scalar/Makefile" be stylistically consistent
with the top-level "Makefile" in including other makefiles before
setting the default target.

This adjusts code added in 0a43fb22026 (scalar: create a rudimentary
executable, 2021-12-03), it's a style-only change, in a subsequent
commit the "QUIET" boilerplate at the beginning of this file will be
retrieved via an include, and having an "all:" between the two set of
"include"'s after that change would look odd.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 contrib/scalar/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Junio C Hamano Feb. 25, 2022, 10:43 p.m. UTC | #1
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Make have the "contrib/scalar/Makefile" be stylistically consistent
> with the top-level "Makefile" in including other makefiles before
> setting the default target.

I think that goal makes sense, but the patch looks like doing a
different thing.  The top-level "Makefile" does it correctly, by
starting the file with

        # The default target of this Makefile is...
        all::

that declares that saying "make" is equivalent to "make all"
upfront.

The patch does not do that; it moves "all" even lower.

What am I missing?

> This adjusts code added in 0a43fb22026 (scalar: create a rudimentary
> executable, 2021-12-03), it's a style-only change, in a subsequent
> commit the "QUIET" boilerplate at the beginning of this file will be
> retrieved via an include, and having an "all:" between the two set of
> "include"'s after that change would look odd.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  contrib/scalar/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/scalar/Makefile b/contrib/scalar/Makefile
> index 231b1ee1796..5b12a437426 100644
> --- a/contrib/scalar/Makefile
> +++ b/contrib/scalar/Makefile
> @@ -12,12 +12,12 @@ else
>  endif
>  endif
>  
> -all:
> -
>  include ../../config.mak.uname
>  -include ../../config.mak.autogen
>  -include ../../config.mak
>  
> +all:
> +
>  TARGETS = scalar$(X) scalar.o
>  GITLIBS = ../../common-main.o ../../libgit.a ../../xdiff/lib.a
diff mbox series

Patch

diff --git a/contrib/scalar/Makefile b/contrib/scalar/Makefile
index 231b1ee1796..5b12a437426 100644
--- a/contrib/scalar/Makefile
+++ b/contrib/scalar/Makefile
@@ -12,12 +12,12 @@  else
 endif
 endif
 
-all:
-
 include ../../config.mak.uname
 -include ../../config.mak.autogen
 -include ../../config.mak
 
+all:
+
 TARGETS = scalar$(X) scalar.o
 GITLIBS = ../../common-main.o ../../libgit.a ../../xdiff/lib.a