public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] use $(MAKE) rather than make
@ 2008-08-20 17:52 Mike Frysinger
  2008-08-21  7:20 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2008-08-20 17:52 UTC (permalink / raw)
  To: linux-mtd

If you execute straight `make`, this prevents the active make env from
being passed on to sub children.  This prevents parallel building as well
as build flag passing.

I also dropped the recursive make in ubi-utils/Makefile for the all target
as this causes problems when building in parallel.  All of the targets
that we actually care about are handled by the $(NTARGETS) target anyways.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 Makefile           |   12 ++++++------
 ubi-utils/Makefile |    5 ++---
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 2000b17..796c31b 100644
--- a/Makefile
+++ b/Makefile
@@ -47,8 +47,8 @@ $(BUILDDIR)/%.o: %.c
 .SUFFIXES:
 
 all: $(TARGETS)
-	make -C $(BUILDDIR)/ubi-utils
-	make -C $(BUILDDIR)/mkfs.ubifs
+	$(MAKE) -C $(BUILDDIR)/ubi-utils
+	$(MAKE) -C $(BUILDDIR)/mkfs.ubifs
 
 IGNORE=${wildcard $(BUILDDIR)/.*.c.dep}
 -include ${IGNORE}
@@ -56,8 +56,8 @@ IGNORE=${wildcard $(BUILDDIR)/.*.c.dep}
 clean:
 	rm -f $(BUILDDIR)/*.o $(TARGETS) $(BUILDDIR)/.*.c.dep $(SYMLINKS)
 	if [ "$(BUILDDIR)x" != ".x" ]; then rm -rf $(BUILDDIR); fi
-	make -C $(BUILDDIR)/ubi-utils clean
-	make -C $(BUILDDIR)/mkfs.ubifs clean
+	$(MAKE) -C $(BUILDDIR)/ubi-utils clean
+	$(MAKE) -C $(BUILDDIR)/mkfs.ubifs clean
 
 $(SYMLINKS):
 	ln -sf ../fs/jffs2/$@ $@
@@ -99,5 +99,5 @@ install: ${TARGETS}
 	install -m0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/
 	mkdir -p ${DESTDIR}/${MANDIR}/man1
 	gzip -9c mkfs.jffs2.1 > ${DESTDIR}/${MANDIR}/man1/mkfs.jffs2.1.gz
-	make -C $(BUILDDIR)/ubi-utils install
-	make -C $(BUILDDIR)/mkfs.ubifs install
+	$(MAKE) -C $(BUILDDIR)/ubi-utils install
+	$(MAKE) -C $(BUILDDIR)/mkfs.ubifs install
diff --git a/ubi-utils/Makefile b/ubi-utils/Makefile
index 3e6203f..4cca316 100644
--- a/ubi-utils/Makefile
+++ b/ubi-utils/Makefile
@@ -30,18 +30,17 @@ vpath   %.c ./src
 	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< -g -Wp,-MD,.$(shell basename $<).dep
 
 all: $(TARGETS)
-	make -C new-utils
 
 IGNORE=${wildcard .*.c.dep}
 -include ${IGNORE}
 
 $(NTARGETS):
-	make -C new-utils $@
+	$(MAKE) -C new-utils $@
 	mv new-utils/$@ $@
 
 clean:
 	rm -rf *.o $(TARGETS) .*.c.dep
-	make -C new-utils clean
+	$(MAKE) -C new-utils clean
 
 pddcustomize: pddcustomize.o error.o libubimirror.o bootenv.o hashmap.o \
 		libubi.o crc32.o
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] use $(MAKE) rather than make
  2008-08-20 17:52 [PATCH] use $(MAKE) rather than make Mike Frysinger
@ 2008-08-21  7:20 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2008-08-21  7:20 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-mtd


On Wed, 2008-08-20 at 13:52 -0400, Mike Frysinger wrote:
> If you execute straight `make`, this prevents the active make env from
> being passed on to sub children.  This prevents parallel building as
> well
> as build flag passing.
> 
> I also dropped the recursive make in ubi-utils/Makefile for the all
> target
> as this causes problems when building in parallel.  All of the targets
> that we actually care about are handled by the $(NTARGETS) target
> anyways.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Thanks, applied on top of Sebastian's patch. Fixed conflicts. Please,
check.

-- 
> 
> Best regards,
> Artem Bityutskiy (Битюцкий Артём)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-21  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-20 17:52 [PATCH] use $(MAKE) rather than make Mike Frysinger
2008-08-21  7:20 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox