Skip to contentSkip to conversation

Makefile: add all-user/all-linux-user/all-softmmu meta-targets

PATCH In review Philippe Mathieu-Daudé 3 participants 4 messages Jul 25, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: add all-user/all-linux-user/all-softmmu meta-targets

Useful to build a whole set at once.

---
 Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Makefile +6 -1
index 5f18243d05..da899522e4 100644
@@ -814,6 +814,11 @@ endif
 # Dependencies in Makefile.objs files come from our recursive subdir rules
 -include $(wildcard *.d tests/*.d)
 
+.PHONY: subdir-all-user subdir-all-linux-user subdir-all-softmmu
+subdir-all-user: $(patsubst %,subdir-%,$(filter %-user,$(TARGET_DIRS)))
+subdir-all-linux-user: $(patsubst %,subdir-%,$(filter %-linux-user,$(TARGET_DIRS)))
+subdir-all-softmmu: $(patsubst %,subdir-%,$(filter %-softmmu,$(TARGET_DIRS)))
+
 include $(SRC_PATH)/tests/docker/Makefile.include
 
 .PHONY: help
@@ -827,7 +832,7 @@ help:
 	@echo  ''
 	@$(if $(TARGET_DIRS), \
 		echo 'Architecture specific targets:'; \
-		$(foreach t, $(TARGET_DIRS), \
+		$(foreach t, $(TARGET_DIRS) all-user all-linux-user all-softmmu, \
 		printf "  %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \
 		echo '')
 	@echo  'Cleaning targets:'
Signature · 1 line
2.13.3
#1 lore raw
Quoted 1 line · Philippe Mathieu-Daudé

Useful to build a whole set at once.

You can already do this by not specifying a --target-list= option and using whichever of --disable-system and --disable-user you need to skip the ones you don't want, can't you?

thanks
-- PMM

#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 12 lines · Philippe Mathieu-Daudé

Useful to build a whole set at once.

---
 Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Makefile +0 -0
index 5f18243d05..da899522e4 100644

Makefile endif · line 820

Quoted 7 lines
Makefile +4 -0
@@ -814,6 +814,11 @@ endif
 # Dependencies in Makefile.objs files come from our recursive subdir rules
 -include $(wildcard *.d tests/*.d)
 
+.PHONY: subdir-all-user subdir-all-linux-user subdir-all-softmmu
+subdir-all-user: $(patsubst %,subdir-%,$(filter %-user,$(TARGET_DIRS)))
+subdir-all-linux-user: $(patsubst %,subdir-%,$(filter %-linux-user,$(TARGET_DIRS)))
+subdir-all-softmmu: $(patsubst %,subdir-%,$(filter %-softmmu,$(TARGET_DIRS)))

I'm not sure why you need subdir-all-linux-user. I think it's okay to add these, but please add "romsubdir-all" too. This way "all" can use "subdir-all-user subdir-all-softmmu romsubdir-all" and you can remove "recurse-all".

Paolo

Quoted 13 lines
Makefile +1 -1
 include $(SRC_PATH)/tests/docker/Makefile.include
 
 .PHONY: help
@@ -827,7 +832,7 @@ help:
 	@echo  ''
 	@$(if $(TARGET_DIRS), \
 		echo 'Architecture specific targets:'; \
-		$(foreach t, $(TARGET_DIRS), \
+		$(foreach t, $(TARGET_DIRS) all-user all-linux-user all-softmmu, \
 		printf "  %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \
 		echo '')
 	@echo  'Cleaning targets:'
#3 lore raw
Quoted 16 lines · Paolo Bonzini
Quoted 15 lines · Philippe Mathieu-Daudé

Useful to build a whole set at once.

---
  Makefile | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
Makefile +0 -0
index 5f18243d05..da899522e4 100644
@@ -814,6 +814,11 @@ endif
  # Dependencies in Makefile.objs files come from our recursive subdir rules
  -include $(wildcard *.d tests/*.d)
 
Quoted 6 lines

Makefile endif · line 820

Quoted 4 lines
Makefile +4 -0
+.PHONY: subdir-all-user subdir-all-linux-user subdir-all-softmmu
+subdir-all-user: $(patsubst %,subdir-%,$(filter %-user,$(TARGET_DIRS)))
+subdir-all-linux-user: $(patsubst %,subdir-%,$(filter %-linux-user,$(TARGET_DIRS)))
+subdir-all-softmmu: $(patsubst %,subdir-%,$(filter %-softmmu,$(TARGET_DIRS)))

I'm not sure why you need subdir-all-linux-user. I think it's okay to

Indeed, subdir-all-user is enough.

Quoted 3 lines

add these, but please add "romsubdir-all" too. This way "all" can use "subdir-all-user subdir-all-softmmu romsubdir-all" and you can remove "recurse-all".

Ok.

Quoted 17 lines

Paolo

Quoted 13 lines
Makefile +1 -1
  include $(SRC_PATH)/tests/docker/Makefile.include
 
  .PHONY: help
@@ -827,7 +832,7 @@ help:
  	@echo  ''
  	@$(if $(TARGET_DIRS), \
  		echo 'Architecture specific targets:'; \
-		$(foreach t, $(TARGET_DIRS), \
+		$(foreach t, $(TARGET_DIRS) all-user all-linux-user all-softmmu, \
  		printf "  %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \
  		echo '')
  	@echo  'Cleaning targets:'