Browse Source

[Pal] Use expand_target_to_{sig,sgx,token} instead of expand_target()

Isaku Yamahata 4 years ago
parent
commit
08ae3a241c

+ 3 - 3
Pal/regression/Makefile

@@ -54,7 +54,7 @@ RUNTIME_DIR = $(CURDIR)/../../Runtime
 export PAL_LOADER = $(RUNTIME_DIR)/pal-$(PAL_HOST)
 
 .PHONY: all
-all: $(call expand_target,$(target)) $(preloads)
+all: $(target) $(call expand_target_to_sig,$(target)) $(call expand_target_to_sgx,$(target)) $(preloads)
 
 .PHONY: sgx-tokens
 sgx-tokens: $(call expand_target_to_token,$(target))
@@ -140,12 +140,12 @@ regression:
 	$(RM) pal-regression.xml
 	$(MAKE) pal-regression.xml
 
-pal-regression.xml: test_pal.py $(call expand_target_to_token,$(target))
+pal-regression.xml: test_pal.py $(target) $(call expand_target_to_sig,$(target)) $(call expand_target_to_sgx,$(target)) $(call expand_target_to_token,$(target))
 	python3 -m pytest --junit-xml $@ -v $<
 
 .PHONY: clean
 clean:
-	rm -rf $(call expand_target,$(target)) $(preloads) *.tmp .lib *.cached *.sig *.d .output.* *.token .*.d .*.sig .*.token __pycache__ .cache pal-regression.xml
+	$(RM) -r $(target) $(preloads) *.tmp .lib *.cached *.sig .*.sig *.d .*.d .output.* *.token .*.token *.manifest.sgx .*.manifest.sgx __pycache__ .cache pal-regression.xml
 
 .PHONY: distclean
 distclean: clean

+ 0 - 1
Pal/src/Makefile.Test

@@ -1,5 +1,4 @@
 DIR := $(dir $(lastword $(MAKEFILE_LIST)))
-expand_target = $(1)
 
 ifeq ($(PAL_HOST),)
 include $(DIR)/Makefile.Host

+ 0 - 2
Pal/src/host/Linux-SGX/Makefile.Test

@@ -1,4 +1,2 @@
 SGX_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
 include $(SGX_DIR)/Makefile.manifest
-
-expand_target = $(1) $(call expand_target_to_sig,$(1)) $(call expand_target_to_sgx,$(1))

+ 2 - 2
Pal/test/Makefile

@@ -20,7 +20,7 @@ graphene_lib = .lib/graphene-lib.a
 pal_lib = ../../Runtime/libpal-$(PAL_HOST).so
 
 .PHONY: all
-all:	pal_loader $(call expand_target,$(target))
+all:	pal_loader $(target) $(call expand_target_to_sig,$(target)) $(call expand_target_to_sgx,$(target))
 
 .PHONY: sgx-tokens
 sgx-tokens: $(call expand_target_to_token,$(target))
@@ -70,7 +70,7 @@ endif
 
 .PHONY: clean
 clean:
-	rm -rf pal_loader $(call expand_target,$(target)) .lib *.cached *.sig *.token \
+	$(RM) -r pal_loader $(target) .lib *.cached *.sig *.token *.manifest.sgx \
 	       $(addsuffix .d, $(executables)) $(addsuffix .i.d, $(executables)) \
 	       $(addsuffix .s.d, $(executables)) \
 	       $(addsuffix .manifest.sgx.d,$(executables)) \

+ 2 - 2
Scripts/Makefile.Test

@@ -30,7 +30,7 @@ LDFLAGS-libos-debug = -L$(SHIMDIR)/src -L$(PALDIR)/host/$(PAL_HOST) -Wl,-rpath-l
 default: all
 
 .PHONY: all
-all: pal_loader $(target) | $(call expand_target,$(exec_target))
+all: pal_loader $(target) | $(exec_target) $(call expand_target_to_sgx,$(exec_target)) $(call expand_target_to_sig,$(exec_target))
 
 .PHONY: sgx-tokens
 sgx-tokens: $(call expand_target_to_token,$(exec_target))
@@ -79,7 +79,7 @@ endif
 
 .PHONY: clean
 clean: $(clean-extra)
-	rm -rf pal_loader $(call expand_target,$(exec_target)) $(target) $(wildcard *.d) .output.* \
+	$(RM) -r pal_loader $(exec_target) $(target) $(wildcard *.d) .output.* \
 	       *.sig *.token *.manifest.sgx
 
 .PHONY: distclean