diff --git a/Makefile b/Makefile index 96a769be1..f2e49fdb2 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # # $Id$ # -# Top Level EPICS Makefile +# Top Level "Diabolical" EPICS Makefile # by Matthew Needes and Mike Bordua # # Notes: @@ -17,45 +17,43 @@ # is complete. # -EPICS=.. -include $(EPICS)/config/CONFIG_BASE +include config.mk all: install depends: - @(for ARCH in ${BUILD_ARCHS}; \ + @(for FILE in ${BUILD_ARCHS}; \ do \ - ${MAKE} ${MFLAGS} $@.$$ARCH; \ - done) - -pre_build: - @(for ARCH in ${BUILD_ARCHS}; \ - do \ - ${MAKE} ${MFLAGS} $@.$$ARCH; \ + TEMP=`echo $$FILE | cut -d. -f2`; \ + ${MAKE} ${MFLAGS} $@.$$TEMP; \ done) build_libs: - @(for ARCH in ${BUILD_ARCHS}; \ + @(for FILE in ${BUILD_ARCHS}; \ do \ - ${MAKE} ${MFLAGS} $@.$$ARCH; \ + TEMP=`echo $$FILE | cut -d. -f2`; \ + ${MAKE} ${MFLAGS} $@.$$TEMP; \ done) install_libs: - @(for ARCH in ${BUILD_ARCHS}; \ + @(for FILE in ${BUILD_ARCHS}; \ do \ - ${MAKE} ${MFLAGS} $@.$$ARCH; \ + TEMP=`echo $$FILE | cut -d. -f2`; \ + ${MAKE} ${MFLAGS} $@.$$TEMP; \ done) build: - @(for ARCH in ${BUILD_ARCHS}; \ + @(for FILE in ${BUILD_ARCHS}; \ do \ - ${MAKE} ${MFLAGS} $@.$$ARCH; \ + TEMP=`echo $$FILE | cut -d. -f2`; \ + ${MAKE} ${MFLAGS} $@.$$TEMP; \ done) install: - @(for ARCH in ${BUILD_ARCHS}; \ + @(for FILE in ${BUILD_ARCHS}; \ do \ - ${MAKE} ${MFLAGS} $@.$$ARCH; \ + TEMP=`echo $$FILE | cut -d. -f2`; \ + ${MAKE} ${MFLAGS} $@.$$TEMP; \ done) release: install @@ -111,21 +109,12 @@ 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 -# yacc/lex etc. - -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.%: pre_build.% +build_libs.%: depends.% @echo $*: Building Libraries @${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs build_libs @tools/TouchFlag $@ ${TOUCH} diff --git a/Makefile.subdirs b/Makefile.subdirs index 63c12c5e9..3d704ee53 100644 --- a/Makefile.subdirs +++ b/Makefile.subdirs @@ -1,13 +1,11 @@ # # base $Id$ # -# EPICS Makefile For Top-Level Subdirectory Recursions +# "Diabolical" EPICS Makefile For Top-Level Subdirectory Recursions # by Matthew Needes and Mike Bordua # -EPICS=.. -include $(EPICS)/config/CONFIG_BASE -include $(EPICS)/config/CONFIG_ARCH.${T_A} +include config.${T_A}.mk MAKEOPT=${MFLAGS} -f Makefile.${BUILD_TYPE} @@ -16,42 +14,35 @@ all: build depends: @(for DIR in ${DIRS}; \ do \ - 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"; \ + 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 b7033eee7..3ea99aad4 100644 --- a/src/iocCore/Makefile.Vx +++ b/src/iocCore/Makefile.Vx @@ -7,8 +7,6 @@ all: install depends: -pre_build: - build_libs: install_libs: