Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1266504

[PATCH 1/3] tools/vm: fix Makefile multi-targets

From Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 1/3] tools/vm: fix Makefile multi-targets
Date 2015-11-10 14:40 +0100
Message-ID <qthjs-5Fv-15@gated-at.bofh.it> (permalink)
References <qthjr-5Fv-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Build all of the $(TARGETS), not just the first one.

Without the patch (make -n)
==============================

make -C ../lib/api
gcc -Wall -Wextra -I../lib/ -o page-types page-types.c ...

Only 'page-types' target was built.

With the patch (make -n)
===========================

make -C ../lib/api
gcc -Wall -Wextra -O2 -I../lib/ -o page-types page-types.c ...
gcc -Wall -Wextra -O2 -I../lib/ -o slabinfo slabinfo.c ...
gcc -Wall -Wextra -O2 -I../lib/ -o page_owner_sort page_owner_sort.c ...

All 3 targets ('page-types', 'slabinfo', 'page_owner_sort') were
built.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
 tools/vm/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/vm/Makefile b/tools/vm/Makefile
index 93aadaf..51c3f8b 100644
--- a/tools/vm/Makefile
+++ b/tools/vm/Makefile
@@ -1,15 +1,15 @@
 # Makefile for vm tools
 #
-TARGETS=page-types slabinfo page_owner_sort
+TARGETS = page-types slabinfo page_owner_sort
 
 LIB_DIR = ../lib/api
 LIBS = $(LIB_DIR)/libapi.a
 
 CC = $(CROSS_COMPILE)gcc
-CFLAGS = -Wall -Wextra -I../lib/
+CFLAGS = -Wall -Wextra -O2 -I../lib/
 LDFLAGS = $(LIBS)
 
-$(TARGETS): $(LIBS)
+all: $(LIBS) $(TARGETS)
 
 $(LIBS):
 	make -C $(LIB_DIR)
@@ -18,5 +18,5 @@ $(LIBS):
 	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
 
 clean:
-	$(RM) page-types slabinfo page_owner_sort
+	$(RM) $(TARGETS)
 	make -C $(LIB_DIR) clean
-- 
2.6.2.280.g74301d6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] tools/vm: trivial fixes Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-10 14:40 +0100
  [PATCH 2/3] tools/vm/page-types: suppress gcc warnings Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-10 14:40 +0100
    Re: [PATCH 2/3] tools/vm/page-types: suppress gcc warnings David Rientjes <rientjes@google.com> - 2015-11-11 21:50 +0100
      Re: [PATCH 2/3] tools/vm/page-types: suppress gcc warnings Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-12 02:00 +0100
        Re: [PATCH 2/3] tools/vm/page-types: suppress gcc warnings David Rientjes <rientjes@google.com> - 2015-11-12 06:50 +0100
  [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members' types Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-10 14:40 +0100
    Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members'  types Christoph Lameter <cl@linux.com> - 2015-11-10 16:30 +0100
    Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members'  types David Rientjes <rientjes@google.com> - 2015-11-11 22:00 +0100
      Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members'  types Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-12 02:20 +0100
        Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members'  types David Rientjes <rientjes@google.com> - 2015-11-12 06:10 +0100
          Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members'  types Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-12 07:20 +0100
            Re: [PATCH 3/3] tools/vm/slabinfo: update struct slabinfo members'  types David Rientjes <rientjes@google.com> - 2015-11-12 11:00 +0100
  [PATCH 1/3] tools/vm: fix Makefile multi-targets Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-10 14:40 +0100
    Re: [PATCH 1/3] tools/vm: fix Makefile multi-targets Christoph Lameter <cl@linux.com> - 2015-11-10 16:30 +0100
    Re: [PATCH 1/3] tools/vm: fix Makefile multi-targets Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-11-11 13:30 +0100
      Re: [PATCH 1/3] tools/vm: fix Makefile multi-targets David Rientjes <rientjes@google.com> - 2015-11-11 21:40 +0100
        Re: [PATCH 1/3] tools/vm: fix Makefile multi-targets Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-12 02:00 +0100

csiph-web