public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Diego Petteno (flameeyes)" <flameeyes@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-projects commit in pax-utils: Makefile
Date: Wed, 22 Oct 2008 15:31:05 +0000	[thread overview]
Message-ID: <E1Ksfft-0004uu-T6@stork.gentoo.org> (raw)

flameeyes    08/10/22 15:31:05

  Modified:             Makefile
  Log:
  Improve Makefile to avoid relinking all targets when changing one tool.
  
  With these changes, editing scanelf.c won't trigger a new build of
  dumpelf and pspax, since each target depends only on those object
  files it actually uses.

Revision  Changes    Path
1.70                 pax-utils/Makefile

file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/Makefile?rev=1.70&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/Makefile?rev=1.70&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/Makefile?r1=1.69&r2=1.70

Index: Makefile
===================================================================
RCS file: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- Makefile	12 Sep 2008 19:08:52 -0000	1.69
+++ Makefile	22 Oct 2008 15:31:05 -0000	1.70
@@ -1,6 +1,6 @@
 # Copyright 2003-2006 Ned Ludd <solar@linbsd.net>
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v 1.69 2008/09/12 19:08:52 grobian Exp $
+# $Header: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v 1.70 2008/10/22 15:31:05 flameeyes Exp $
 ####################################################################
 
 check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
@@ -41,12 +41,12 @@
 
 ####################################################################
 ELF_TARGETS  = scanelf dumpelf $(shell echo | $(CC) -dM -E - | grep -q __svr4__ || echo pspax)
-ELF_OBJS     = $(ELF_TARGETS:%=%.o) paxelf.o
+ELF_OBJS     = paxelf.o
 MACH_TARGETS = scanmacho
-MACH_OBJS    = $(MACH_TARGETS:%=%.o) paxmacho.o
+MACH_OBJS    = paxmacho.o
 COMMON_OBJS  = paxinc.o xfuncs.o
-OBJS         = $(ELF_OBJS) $(MACH_OBJS) $(COMMON_OBJS)
 TARGETS      = $(ELF_TARGETS) $(MACH_TARGETS)
+OBJS         = $(ELF_OBJS) $(MACH_OBJS) $(COMMON_OBJS) $(TARGETS:%=%.o)
 MPAGES       = $(TARGETS:%=man/%.1)
 SOURCES      = $(OBJS:%.o=%.c)
 
@@ -71,11 +71,11 @@
 endif
 	$(Q)$(compile.c) $(WFLAGS)
 
-$(ELF_TARGETS): $(ELF_OBJS) $(COMMON_OBJS)
-	$(CC) $(CFLAGS) $(LDFLAGS) $(COMMON_OBJS) paxelf.o -o $@ $@.o $(LIBS) $(LIBS-$@)
+$(ELF_TARGETS): %: $(ELF_OBJS) $(COMMON_OBJS) %.o
+	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) $(LIBS-$@)
 
-$(MACH_TARGETS): $(MACH_OBJS) $(COMMON_OBJS)
-	$(CC) $(CFLAGS) $(LDFLAGS) $(COMMON_OBJS) paxmacho.o -o $@ $@.o $(LIBS) $(LIBS-$@)
+$(MACH_TARGETS): %: $(MACH_OBJS) $(COMMON_OBJS) %.o
+	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) $(LIBS-$@)
 
 %.so: %.c
 	$(CC) -shared -fPIC -o $@ $<






             reply	other threads:[~2008-10-22 15:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 15:31 Diego Petteno (flameeyes) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-02-28 22:49 [gentoo-commits] gentoo-projects commit in pax-utils: Makefile Mike Frysinger (vapier)
2015-02-21 19:30 Mike Frysinger (vapier)
2014-10-19 17:06 Mike Frysinger (vapier)
2014-08-01  1:39 Mike Frysinger (vapier)
2013-05-23  0:09 Mike Frysinger (vapier)
2013-04-10 21:48 Mike Frysinger (vapier)
2013-04-10 21:42 Mike Frysinger (vapier)
2012-11-15 20:14 Mike Frysinger (vapier)
2012-02-04 18:22 Mike Frysinger (vapier)
2012-02-04 18:14 Mike Frysinger (vapier)
2012-01-23 23:47 Mike Frysinger (vapier)
2011-03-03 21:08 Mike Frysinger (vapier)
2010-06-08  5:51 Mike Frysinger (vapier)
2010-02-14 18:08 Mike Frysinger (vapier)
2010-02-14 18:07 Mike Frysinger (vapier)
2010-01-15 12:38 Mike Frysinger (vapier)
2009-03-15  9:23 Mike Frysinger (vapier)
2008-09-12 19:08 Fabian Groffen (grobian)
2008-01-17  6:37 Ned Ludd (solar)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Ksfft-0004uu-T6@stork.gentoo.org \
    --to=flameeyes@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox