Kaynağa Gözat

[LibOS,Pal] Improve recursive Make calls

Do not declare the result of the recursive Make call as "phony" to avoid
unnecessary rebuilds. Due to the missing dependency information we of
course still need to always recurse.
Simon Gaiser 6 yıl önce
ebeveyn
işleme
517be2a241
2 değiştirilmiş dosya ile 14 ekleme ve 5 silme
  1. 5 2
      LibOS/shim/src/Makefile
  2. 9 3
      Pal/src/Makefile

+ 5 - 2
LibOS/shim/src/Makefile

@@ -88,10 +88,13 @@ libsysdb_debug.so: $(addsuffix .o,$(filter-out syscallas,$(objs))) \
 	@mkdir -p .lib
 	$(call cmd,ln_sf)
 
-.PHONY: $(graphene_lib)
-$(graphene_lib): .lib/host_endian.h
+.PHONY: graphene_lib_recurse
+graphene_lib_recurse: .lib/host_endian.h
 	$(MAKE) -C ../../../Pal/lib target=$(abspath .lib)/
 
+$(graphene_lib): graphene_lib_recurse
+	@true
+
 libsysdb.a: $(addsuffix .o,$(objs))
 	$(call cmd,ar_a_o)
 else

+ 9 - 3
Pal/src/Makefile

@@ -83,14 +83,20 @@ $(LIB_DIR)/host_endian.h: $(HOST_DIR)/host_endian.h
 	@mkdir -p $(LIB_DIR)
 	$(call cmd,ln_sf)
 
-.PHONY: $(host_lib) $(graphene_lib) $(pal_lib)
+.PHONY: host_lib_recurse graphene_lib_recurse
 
-$(graphene_lib): $(LIB_DIR)/host_endian.h
+graphene_lib_recurse: $(LIB_DIR)/host_endian.h
 	$(MAKE) -C ../lib target=$(abspath $(LIB_DIR))/
 
-$(host_lib): $(graphene_lib)
+$(graphene_lib): graphene_lib_recurse
+	@true
+
+host_lib_recurse: $(graphene_lib)
 	@[ ! -d host/$(PAL_HOST) ] || $(MAKE) -C host/$(PAL_HOST)
 
+$(host_lib): host_lib_recurse
+	@true
+
 $(pal_loader): $(host_lib)
 
 $(runtime_loader): $(pal_loader)