From 48886ee4c80053d4c862fbe5a35d7dd7aeced206 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Tue, 1 Feb 2000 16:08:41 +0000 Subject: [PATCH] Moved code from RULES to RULES_ARCHS. --- configure/RULES | 46 +---------------------- configure/RULES_ARCHS | 87 ++++++++++++------------------------------- 2 files changed, 24 insertions(+), 109 deletions(-) diff --git a/configure/RULES b/configure/RULES index e25abf6d6..4e219aeea 100644 --- a/configure/RULES +++ b/configure/RULES @@ -2,51 +2,7 @@ ifndef T_A -all: install - -rebuild: clean all - -ACTIONS = inc -ACTIONS += build -ACTIONS += install -ACTIONS += buildInstall -ACTIONS += depends -ACTIONS += rebuild - -actionPart = $(word 1, $(subst $(DIVIDER), ,$@)) -archPart = $(word 2, $(subst $(DIVIDER), ,$@)) - -actionArchTargets = $(foreach x, $(ACTIONS),\ - $(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch))) - -buildDirs = $(addprefix O.,$(BUILD_ARCHS)) - -$(actionArchTargets) : $(buildDirs) - $(MAKE) -C O.$(archPart) -f ../Makefile TOP=$(TOP)/.. T_A=$(archPart) $(actionPart) - -$(BUILD_ARCHS) : % : O.% - $(MAKE) -C O.$@ -f ../Makefile TOP=$(TOP)/.. T_A=$@ - -$(ACTIONS):%: $(foreach arch, $(BUILD_ARCHS), %$(DIVIDER)$(arch)) - -$(buildDirs) : - $(PERL) $(TOOLS)/makeMakefile.pl $@ $(TOP)/.. - -# -# special clean rule -# -clean :: - $(RMDIR) $(addsuffix *,$(addprefix O.,$(BUILD_ARCHS))) - -clean$(DIVIDER)% :: - $(RMDIR) O.$** - -.PHONY : $(buildActionTargets) -.PHONY : $(buildActionArchTargets) -.PHONY : $(buildArchs) -.PHONY : $(ACTIONS) clean all - - +include $(CONFIG)/RULES_ARCHS else #T_A diff --git a/configure/RULES_ARCHS b/configure/RULES_ARCHS index e535c15b6..21ab6bd03 100644 --- a/configure/RULES_ARCHS +++ b/configure/RULES_ARCHS @@ -1,90 +1,49 @@ # # $Id$ # -# EPICS RULES_ARCH -# by Matthew Needes and Mike Bordua and Janet Anderson and Jeff Hill -# -all:: install +all: install -ACTIONS += inc +rebuild: clean all + +ACTIONS = inc ACTIONS += build ACTIONS += install ACTIONS += buildInstall ACTIONS += depends ACTIONS += rebuild +ACTIONS += browse actionPart = $(word 1, $(subst $(DIVIDER), ,$@)) archPart = $(word 2, $(subst $(DIVIDER), ,$@)) -# -# hostActionArchTargets -# -hostArchs = $(HOST_ARCHS) -hostActionArchTargets = $(foreach x, $(ACTIONS),\ - $(foreach arch,$(hostArchs), $(x)$(DIVIDER)$(arch))) -ifeq (Makefile.Host, $(wildcard Makefile.Host)) -hostDirs = $(addprefix O.,$(hostArchs)) -$(hostActionArchTargets) : $(hostDirs) - $(MAKE) -C O.$(archPart) -f ../Makefile.Host TOP=$(TOP)/.. T_A=$(archPart) B_T=.Host $(actionPart) -$(hostArchs) : % : O.% - $(MAKE) -C O.$@ -f ../Makefile.Host TOP=$(TOP)/.. T_A=$@ B_T=.Host -else -$(hostActionArchTargets) : -$(hostArchs) : -endif +actionArchTargets = $(foreach x, $(ACTIONS),\ + $(foreach arch,$(BUILD_ARCHS), $(x)$(DIVIDER)$(arch))) -# -# iocActionArchTargets -# -iocArchs = $(IOC_ARCHS) -iocActionArchTargets = $(foreach x, $(ACTIONS), \ - $(foreach arch, $(iocArchs), $(x)$(DIVIDER)$(arch))) -ifeq (Makefile.Ioc, $(wildcard Makefile.Ioc)) -iocDirs = $(addprefix O.,$(iocArchs)) -$(iocActionArchTargets) : $(iocDirs) - $(MAKE) -C O.$(archPart) -f ../Makefile.Ioc TOP=$(TOP)/.. T_A=$(archPart) B_T=.Ioc $(actionPart) -$(iocArchs) : % : O.% - $(MAKE) -C O.$@ -f ../Makefile.Ioc TOP=$(TOP)/.. T_A=$@ B_T=.Ioc -else -$(iocActionArchTargets) : -$(iocArchs) : -endif +buildDirs = $(addprefix O.,$(BUILD_ARCHS)) -$(hostDirs) : - $(PERL) $(TOOLS)/makeMakefile.pl $@ $(TOP)/.. .Host +$(actionArchTargets) : $(buildDirs) + $(MAKE) -C O.$(archPart) -f ../Makefile TOP=$(TOP)/.. T_A=$(archPart) $(actionPart) -$(iocDirs) : - $(PERL) $(TOOLS)/makeMakefile.pl $@ $(TOP)/.. .Ioc +$(BUILD_ARCHS) : % : O.% + $(MAKE) -C O.$@ -f ../Makefile TOP=$(TOP)/.. T_A=$@ -# -# host/ioc action targets -# -$(ACTIONS) :: % : %$(DIVIDER)host %$(DIVIDER)ioc -HostActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)host) -IocActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)ioc) -$(HostActionTargets) : %$(DIVIDER)host : $(addprefix %$(DIVIDER), $(hostArchs)) -$(IocActionTargets) : %$(DIVIDER)ioc : $(addprefix %$(DIVIDER), $(iocArchs)) +$(ACTIONS):%: $(foreach arch, $(BUILD_ARCHS), %$(DIVIDER)$(arch)) - -# -# arch targets -# -host : $(hostArchs) -ioc : $(iocArchs) +$(buildDirs) : + $(PERL) $(TOOLS)/makeMakefile.pl $@ $(TOP)/.. # # special clean rule # clean :: - $(RMDIR) $(hostDirs) $(iocDirs) -clean$(DIVIDER)% : - $(RMDIR) O.$* + $(RMDIR) $(addsuffix *,$(addprefix O.,$(BUILD_ARCHS))) -.PHONY :: $(HostActionTargets) -.PHONY :: $(IocActionTargets) -.PHONY :: $(iocActionArchTargets) -.PHONY :: $(hostActionArchTargets) -.PHONY :: $(hostArchs) $(iocArchs) -.PHONY :: $(ACTIONS) clean all host ioc +clean$(DIVIDER)% :: + $(RMDIR) O.$** + +.PHONY : $(buildActionTargets) +.PHONY : $(buildActionArchTargets) +.PHONY : $(buildArchs) +.PHONY : $(ACTIONS) clean all