]> xenbits.xensource.com Git - xen.git/commitdiff
Config.mk: replace dependency to genpath with actual target
authorOlaf Hering <olaf@aepfle.de>
Mon, 22 Sep 2014 13:00:02 +0000 (15:00 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 23 Sep 2014 09:15:17 +0000 (10:15 +0100)
genpath is a detail of buildmakevars2file. Replace the dependency to
genpath with the actual buildmakevars2file target. This change by
itself does not fix any bug. Upcoming changes will add dependencies to
$(target), but no rule exist to create $(target).

To force a rebuild of the $(1) rule the target now depends on the
existing .phony target. This dummy target is already used elsewhere in
the code.

No change in behaviour is expected by this patch.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Config.mk
stubdom/Makefile
tools/hotplug/common/Makefile
tools/libxl/Makefile

index 3f96f8c57f47833098418bfa38af37cd004099c9..64982c6bff672d9270fcb684743d0fc2781c9af4 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -172,8 +172,7 @@ BUILD_MAKE_VARS := SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR \
 
 buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1)))
 define buildmakevars2file-closure
-    .PHONY: genpath
-    genpath:
+    $(1): .phony
        rm -f $(1).tmp; \
        $(foreach var, $(BUILD_MAKE_VARS), \
                  echo "$(var)=\"$($(var))\"" >>$(1).tmp;) \
index 88da991b1b66946ccaef26629cd2e4e87ffd0cbf..1e96d679b1cc4c9cb23e0519c789a9a631cdfdf6 100644 (file)
@@ -48,18 +48,18 @@ TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib
 
 TARGETS=$(STUBDOM_TARGETS)
 
+STUBDOMPATH="stubdompath.sh"
+genpath-target = $(call buildmakevars2file,$(STUBDOMPATH))
+$(eval $(genpath-target))
+
 .PHONY: all
 all: build
 ifeq ($(STUBDOM_SUPPORTED),1)
-build: genpath $(STUBDOM_BUILD)
+build: $(STUBDOMPATH) $(STUBDOM_BUILD)
 else
-build: genpath
+build: $(STUBDOMPATH)
 endif
 
-STUBDOMPATH="stubdompath.sh"
-genpath-target = $(call buildmakevars2file,$(STUBDOMPATH))
-$(eval $(genpath-target))
-
 ##############
 # Cross-newlib
 ##############
@@ -450,9 +450,9 @@ xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxc xenstore
 #########
 
 ifeq ($(STUBDOM_SUPPORTED),1)
-install: genpath install-readme $(STUBDOM_INSTALL)
+install: $(STUBDOMPATH) install-readme $(STUBDOM_INSTALL)
 else
-install: genpath
+install: $(STUBDOMPATH)
 endif
 
 install-readme:
index 18d87aac8c0674b24d99810e9688eb1864c65219..657a8e309c91b48dc630d90998ab5f491ce0bb9d 100644 (file)
@@ -16,7 +16,7 @@ $(eval $(genpath-target))
 all: build
 
 .PHONY: build
-build: genpath
+build: $(HOTPLUGPATH)
 
 .PHONY: install
 install: all install-scripts
index 990414b4ae3ed006966a6c8a5168d24b1d4a3afe..9836b44ab5d549fadf6a0834db0204652c3bdb55 100644 (file)
@@ -163,7 +163,7 @@ _%.api-for-check: %.h $(AUTOINCS)
                >$@.new
        mv -f $@.new $@
 
-_paths.h: genpath
+_paths.h: _paths.h.tmp
        sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" $@.tmp >$@.2.tmp
        rm -f $@.tmp
        $(call move-if-changed,$@.2.tmp,$@)