From f3723cff808080e25429cf694be11eb9bff8b27b Mon Sep 17 00:00:00 2001 From: Matt Needes Date: Tue, 2 Aug 1994 19:41:56 +0000 Subject: [PATCH] Fixed. --- Makefile | 46 ++++++++++++++++++++++++++--------------- Makefile.subdirs | 20 ++++++++++++------ src/iocCore/Makefile.Vx | 2 ++ 3 files changed, 45 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index f2e49fdb2..2d3923013 100644 --- a/Makefile +++ b/Makefile @@ -17,43 +17,45 @@ # is complete. # -include config.mk +EPICS=.. +include $(EPICS)/config/CONFIG_BASE all: install depends: - @(for FILE in ${BUILD_ARCHS}; \ + @(for ARCH in ${BUILD_ARCHS}; \ do \ - TEMP=`echo $$FILE | cut -d. -f2`; \ - ${MAKE} ${MFLAGS} $@.$$TEMP; \ + ${MAKE} ${MFLAGS} $@.$$ARCH; \ + done) + +pre_build: + @(for ARCH in ${BUILD_ARCHS}; \ + do \ + ${MAKE} ${MFLAGS} $@.$$ARCH; \ done) build_libs: - @(for FILE in ${BUILD_ARCHS}; \ + @(for ARCH in ${BUILD_ARCHS}; \ do \ - TEMP=`echo $$FILE | cut -d. -f2`; \ - ${MAKE} ${MFLAGS} $@.$$TEMP; \ + ${MAKE} ${MFLAGS} $@.$$ARCH; \ done) install_libs: - @(for FILE in ${BUILD_ARCHS}; \ + @(for ARCH in ${BUILD_ARCHS}; \ do \ - TEMP=`echo $$FILE | cut -d. -f2`; \ - ${MAKE} ${MFLAGS} $@.$$TEMP; \ + ${MAKE} ${MFLAGS} $@.$$ARCH; \ done) build: - @(for FILE in ${BUILD_ARCHS}; \ + @(for ARCH in ${BUILD_ARCHS}; \ do \ - TEMP=`echo $$FILE | cut -d. -f2`; \ - ${MAKE} ${MFLAGS} $@.$$TEMP; \ + ${MAKE} ${MFLAGS} $@.$$ARCH; \ done) install: - @(for FILE in ${BUILD_ARCHS}; \ + @(for ARCH in ${BUILD_ARCHS}; \ do \ - TEMP=`echo $$FILE | cut -d. -f2`; \ - ${MAKE} ${MFLAGS} $@.$$TEMP; \ + ${MAKE} ${MFLAGS} $@.$$ARCH; \ done) release: install @@ -109,12 +111,22 @@ depends.%: dirs.% @${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs depends @tools/TouchFlag $@ ${TOUCH} +# Pre_build RULE syntax: make pre_build.arch +# e.g.: make pre_build.arch +# +# Build libraries (depends must be finished) + +pre_build.%: depends.% + @echo $*: Performing Pre Build + @${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs pre_build + @tools/TouchFlag $@ ${TOUCH} + # Build_libs RULE syntax: make build_libs.arch # e.g.: make build_libs.arch # # Build libraries (depends must be finished) -build_libs.%: depends.% +build_libs.%: pre_build.% @echo $*: Building Libraries @${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs build_libs @tools/TouchFlag $@ ${TOUCH} diff --git a/Makefile.subdirs b/Makefile.subdirs index 3d704ee53..f721ae927 100644 --- a/Makefile.subdirs +++ b/Makefile.subdirs @@ -5,7 +5,8 @@ # by Matthew Needes and Mike Bordua # -include config.${T_A}.mk +EPICS=.. +include $(EPICS)/config/CONFIG MAKEOPT=${MFLAGS} -f Makefile.${BUILD_TYPE} @@ -14,35 +15,42 @@ all: build depends: @(for DIR in ${DIRS}; \ do \ - TMP=$$PWD; echo "${T_A}: --$$DIR"; \ + TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \ + cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\ + done) + +pre_build: + @(for DIR in ${DIRS}; \ + do \ + TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \ cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\ done) build_libs: @(for DIR in ${DIRS}; \ do \ - TMP=$$PWD; echo "${T_A}: --$$DIR"; \ + TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \ cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\ done) install_libs: @(for DIR in ${DIRS}; \ do \ - TMP=$$PWD; echo "${T_A}: --$$DIR"; \ + TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \ cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\ done) build: @(for DIR in ${DIRS}; \ do \ - TMP=$$PWD; echo "${T_A}: --$$DIR"; \ + TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \ cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\ done) install: @(for DIR in ${DIRS}; \ do \ - TMP=$$PWD; echo "${T_A}: --$$DIR"; \ + TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \ cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\ done) diff --git a/src/iocCore/Makefile.Vx b/src/iocCore/Makefile.Vx index 3ea99aad4..b7033eee7 100644 --- a/src/iocCore/Makefile.Vx +++ b/src/iocCore/Makefile.Vx @@ -7,6 +7,8 @@ all: install depends: +pre_build: + build_libs: install_libs: