From 50f6b123bd688e6e0e7cdf1e8ad342ffffa4d0bf Mon Sep 17 00:00:00 2001 From: Siva Velusamy Date: Tue, 29 May 2012 12:15:41 -0700 Subject: monitor: Build only if dependencies have changed. This CL fixes two issues: - Fully expanding the path to the libraries (i.e commong -> out/host/../common.jar) allows the use of "mm" from sdk/monitor/ folder. - The target of the build (the monitor script) will now have a timestamp that corresponds to when it was last built, as opposed to when the source script was last modified. As a result, timestamps of the dependency jar files are correctly checked with the last build time of the target. Change-Id: I77469561d6750d1942cfeda1d6672d6d2a5dad51 --- monitor/Android.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/monitor/Android.mk b/monitor/Android.mk index 2661dc6..9973d64 100644 --- a/monitor/Android.mk +++ b/monitor/Android.mk @@ -23,11 +23,14 @@ define mk-rcp-monitor-atree-file unzip -q $$srczip -d $$dstdir endef +MONITOR_DEP_LIBRARIES := $(shell $(TOPDIR)sdk/eclipse/scripts/create_all_symlinks.sh -d) +MONITOR_DEPS := $(foreach m,$(MONITOR_DEP_LIBRARIES),$(HOST_OUT_JAVA_LIBRARIES)/$(m).jar) + # The RCP monitor. It is referenced by build/target/products/sdk.mk $(LOCAL_BUILT_MODULE) : $(TOPDIR)sdk/monitor/monitor \ $(TOPDIR)sdk/monitor/build.xml \ $(TOPDIR)sdk/monitor/build.properties \ - $(shell $(TOPDIR)sdk/eclipse/scripts/create_all_symlinks.sh -d) + $(MONITOR_DEPS) @mkdir -p $(dir $@) $(hide)$(TOPDIR)sdk/eclipse/scripts/create_all_symlinks.sh -c $(hide)cd $(TOPDIR)sdk/monitor && \ @@ -54,6 +57,6 @@ $(LOCAL_BUILT_MODULE) : $(TOPDIR)sdk/monitor/monitor \ $(call mk-rcp-monitor-atree-file,win32.win32,x86) ; \ $(call mk-rcp-monitor-atree-file,win32.win32,x86_64) ; \ fi - $(hide)$(ACP) -fpt $(V) $(TOPDIR)sdk/monitor/monitor $@ + $(hide)$(ACP) -fp $(V) $(TOPDIR)sdk/monitor/monitor $@ endif -- cgit v1.1