From aab841e279f27a15bdf917e55434da9f458e3aff Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 22 Nov 2013 11:44:42 -0600 Subject: [PATCH] configure: Added 'host' make target. Builds only the current host architecture, so this is equivalent to the target install.$EPISC_HOST_ARCH --- configure/RULES.Db | 8 +++++++- configure/RULES_ARCHS | 3 ++- configure/RULES_BUILD | 10 ++++++++-- configure/RULES_DIRS | 5 +++-- configure/RULES_TOP | 1 + 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/configure/RULES.Db b/configure/RULES.Db index a258d5aa9..f1834c7ec 100644 --- a/configure/RULES.Db +++ b/configure/RULES.Db @@ -137,6 +137,12 @@ cleanArchTargets = $(foreach arch,$(BUILD_ARCHS), clean$(DIVIDER)$(arch)) -include $(TOP)/configure/CONFIG_APP_INCLUDE all: install +ifeq ($(EPICS_HOST_ARCH),$T_A) +host: install +else +# Do nothing +host: +endif install: buildInstall @@ -144,7 +150,7 @@ buildInstall : build rebuild: clean install -.PHONY: all $(ACTIONS) +.PHONY: all host $(ACTIONS) $(actionArchTargets) $(BUILD_ARCHS): install $(cleanArchTargets): clean diff --git a/configure/RULES_ARCHS b/configure/RULES_ARCHS index e52f78f32..fda381262 100644 --- a/configure/RULES_ARCHS +++ b/configure/RULES_ARCHS @@ -11,6 +11,7 @@ # all: install +host: install$(DIVIDER)$(EPICS_HOST_ARCH) ACTIONS = inc ACTIONS += build @@ -94,4 +95,4 @@ realclean : .PHONY : $(actionArchTargets) .PHONY : $(cleanArchTargets) .PHONY : $(BUILD_ARCHS) rebuild arch_common_clean -.PHONY : $(ACTIONS) clean realclean archclean all +.PHONY : $(ACTIONS) clean realclean archclean host all diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 7ea96bce1..66ab3fd7d 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -71,7 +71,13 @@ endif #--------------------------------------------------------------- # First target -all: install +all: install +ifeq ($(EPICS_HOST_ARCH),$T_A) +host: install +else +# Do nothing +host: +endif -include $(CONFIG)/RULES.Db @@ -478,7 +484,7 @@ $(INSTALL_TEMPLATES_SUBDIR)/%: % .PRECIOUS: %.i %.o %.c %.nm %.cpp %.cc .PRECIOUS: $(COMMON_INC) -.PHONY: all inc build install clean rebuild buildInstall build_clean +.PHONY: all host inc build install clean rebuild buildInstall build_clean .PHONY: runtests tapfiles checkRelease warnRelease noCheckRelease endif # BASE_RULES_BUILD diff --git a/configure/RULES_DIRS b/configure/RULES_DIRS index 8fd3f63b6..57b4f0862 100644 --- a/configure/RULES_DIRS +++ b/configure/RULES_DIRS @@ -34,7 +34,8 @@ actionArchTargets = $(foreach action, $(ACTIONS),\ $(foreach arch, $(ARCHS), \ $(action)$(DIVIDER)$(arch))) -all : install +all: install +host: install$(DIVIDER)$(EPICS_HOST_ARCH) # Allows rebuild to work with parallel builds option, -j. ifeq (rebuild,$(filter rebuild,$(MAKECMDGOALS))) @@ -73,7 +74,7 @@ $(DIRS) $(dirActionTargets) $(dirArchTargets) $(dirActionArchTargets) : $(ARCHS) $(ACTIONS) $(actionArchTargets) :%: \ $(foreach dir, $(DIRS), $(dir)$(DIVIDER)%) -.PHONY : $(DIRS) all rebuild +.PHONY : $(DIRS) all host rebuild .PHONY : $(ARCHS) $(ACTIONS) .PHONY : $(dirActionTargets) $(dirArchTargets) .PHONY : $(dirActionArchTargets) diff --git a/configure/RULES_TOP b/configure/RULES_TOP index 97949eca2..dcc08c565 100644 --- a/configure/RULES_TOP +++ b/configure/RULES_TOP @@ -63,6 +63,7 @@ help: @echo " rebuild - Same as clean install" @echo " archclean - Removes O. dirs but not O.Common dir" @echo "\"Partial\" build targets supported by Makefiles:" + @echo " host - Builds and installs $(EPICS_HOST_ARCH) only." @echo " inc$(DIVIDER) - Installs only header files." @echo " build$(DIVIDER) - Builds and installs only." @echo " install$(DIVIDER) - Builds and installs only."