[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.
This commit is contained in:
Simon Gaiser
2019-08-14 00:44:17 +02:00
committed by Michał Kowalczyk
parent 64e46adcc0
commit 517be2a241
2 changed files with 14 additions and 5 deletions
+5 -2
View File
@@ -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
View File
@@ -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)