Skip to contentSkip to conversation

*** SUBJECT HERE ***

PATCH New Juan Quintela 1 participant 7 messages Oct 6, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

cover *** SUBJECT HERE ***

*** BLURB HERE ***

Juan Quintela (6):
AIOLIBS is not used anywhere
optionrom: remove use of implicit RM variable add build-all to .PHONY rules
optionrom: create .PHONY variable
Don't use implicit rules for Makefile configure and Makefile are not generated in qemu

 Makefile                   |    7 ++++++-
 configure                  |    1 -
 pc-bios/optionrom/Makefile |    3 ++-
 rules.mak                  |   12 ++++++++++++
 4 files changed, 20 insertions(+), 3 deletions(-)
#1 lore raw

PATCH 1/6 AIOLIBS is not used anywhere

---
 configure |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
configure +0 -1
index 69a5502..ad04880 100755
@@ -1383,7 +1383,6 @@ fi
 
 ##########################################
 # linux-aio probe
-AIOLIBS=""
 
 if test "$linux_aio" != "no" ; then
   cat > $TMPC <<EOF
Signature · 1 line
1.6.2.5
#2 lore raw

PATCH 2/6 optionrom: remove use of implicit RM variable

In reply to Juan Quintela
---
 pc-bios/optionrom/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
pc-bios/optionrom/Makefile +1 -1
index d9b6639..2d3069a 100644
@@ -24,4 +24,4 @@ build-all: multiboot.bin
 	$(call quiet-command,$(SHELL) $(SRC_PATH)/pc-bios/optionrom/signrom.sh $< $@,"  Signing $(TARGET_DIR)$@")
 
 clean:
-	$(RM) *.o *.d *.raw *.img *.bin *~
+	rm -f *.o *.d *.raw *.img *.bin *~
Signature · 1 line
1.6.2.5
#3 lore raw

PATCH 3/6 add build-all to .PHONY rules

In reply to Juan Quintela
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index de7c2aa..2f0441e 100644
@@ -12,7 +12,7 @@ config-host.mak:
 endif
 
 .PHONY: all clean cscope distclean dvi html info install install-doc \
-	recurse-all speed tar tarbin test
+	recurse-all speed tar tarbin test build-all
 
 VPATH=$(SRC_PATH):$(SRC_PATH)/hw
 
Signature · 1 line
1.6.2.5
#4 lore raw

PATCH 4/6 optionrom: create .PHONY variable

In reply to Juan Quintela
---
 pc-bios/optionrom/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
pc-bios/optionrom/Makefile +1 -0
index 2d3069a..b01a54e 100644
@@ -6,6 +6,7 @@ include ../../config-host.mak
 include $(SRC_PATH)/rules.mak
 
 VPATH=$(SRC_PATH)/pc-bios/optionrom
+.PHONY : all clean build-all
 
 CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
 CFLAGS += -I$(SRC_PATH)
Signature · 1 line
1.6.2.5
#5 lore raw

PATCH 5/6 Don't use implicit rules for Makefile

In reply to Juan Quintela

This remove implicit rules + implicit variables.
Explicit rules like the generation of %.h and %.c from %.hx still works as expected.

As an added bonus, now the output of make -d is readable.

As another added bonus, time spend on Makefiles is way smaller. We run make -j3 in a fully compiled tree, and results are:

Before:

$ time make -j3
real 0m1.225s
user 0m1.660s
sys 0m0.253s

After:

$ time make -j3
real 0m0.422s
user 0m0.393s
sys 0m0.248s
---
 rules.mak |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
rules.mak +12 -0
index 54ac88a..b380903 100644
@@ -1,4 +1,16 @@
 
+# Don't use implicit rules or variables
+# we have explicit rules for everything
+MAKEFLAGS += -rR
+
+# Files with this suffixes are final, don't try to generate them
+# using implicit rules
+%.d:
+%.h:
+%.c:
+%.m:
+%.mak:
+
 %.o: %.c
 	$(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
 
Signature · 1 line
1.6.2.5
#6 lore raw

PATCH 6/6 configure and Makefile are not generated in qemu

In reply to Juan Quintela

Just say it to make

---
 Makefile |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Makefile +5 -0
index 2f0441e..c552739 100644
@@ -11,6 +11,11 @@ config-host.mak:
 	@exit 1
 endif
 
+# Don't try to regenerate Makefile or configure
+# We don't generate any of them
+Makefile: ;
+configure: ;
+
 .PHONY: all clean cscope distclean dvi html info install install-doc \
 	recurse-all speed tar tarbin test build-all
 
Signature · 1 line
1.6.2.5