diff --git a/Makefile b/Makefile index edf0a13c5..f77d7c63d 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,9 @@ # is complete. # # $Log$ +# Revision 1.10 1994/08/12 18:51:29 mcn +# Added Log and/or Id. +# # EPICS=.. @@ -24,12 +27,6 @@ include $(EPICS)/config/CONFIG_BASE all: install -depends: - @(for ARCH in ${BUILD_ARCHS}; \ - do \ - ${MAKE} ${MFLAGS} $@.$$ARCH; \ - done) - pre_build: @(for ARCH in ${BUILD_ARCHS}; \ do \ @@ -60,11 +57,17 @@ install: ${MAKE} ${MFLAGS} $@.$$ARCH; \ done) -release: install +depends: + @(for ARCH in ${BUILD_ARCHS}; \ + do \ + ${MAKE} ${MFLAGS} $@.$$ARCH; \ + done) + +release: depends install @echo TOP: Creating Release... @tools/MakeRelease -built_release: install +built_release: depends install @echo TOP: Creating Fully Built Release... @tools/MakeRelease -b @@ -100,25 +103,12 @@ dirs.%: @tools/MakeDirs $* @tools/TouchFlag $@ ${TOUCH} -# Depends RULE syntax: make depends.arch -# e.g.: make depends.mv167 -# -# Create dependencies for an architecture. We MUST -# do this separately for each architecture because -# some things may be included on a per architecture -# basis. - -depends.%: dirs.% - @echo $*: Performing Make Depends - @${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.% +pre_build.%: dirs.% @echo $*: Performing Pre Build @${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs pre_build @tools/TouchFlag $@ ${TOUCH} @@ -174,6 +164,24 @@ install.%: build.% @${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs install @tools/TouchFlag $@ ${TOUCH} +# Depends RULE syntax: make depends.arch +# e.g.: make depends.mv167 +# +# Create dependencies for an architecture. We MUST +# do this separately for each architecture because +# some things may be included on a per architecture +# basis. +# +# This dependency must be invoked manually, it is +# not automatic in the build. However, since depends +# are precomputed, this does not have to be done by +# most sites. + +depends.%: dirs.% + @echo $*: Performing Make Depends + @${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs depends + @tools/TouchFlag $@ ${TOUCH} + # Illegal Syntax release.%: diff --git a/Makefile.subdirs b/Makefile.subdirs index b47546d20..0f5f03c84 100644 --- a/Makefile.subdirs +++ b/Makefile.subdirs @@ -1,10 +1,13 @@ # # base $Id$ # -# "Diabolical" EPICS Makefile For Top-Level Subdirectory Recursions +# "Diabolical" EPICS Makefile For Subdirectory Recursions # by Matthew Needes and Mike Bordua # # $Log$ +# Revision 1.8 1994/08/12 18:51:28 mcn +# Added Log and/or Id. +# # EPICS=.. @@ -14,13 +17,6 @@ MAKEOPT=${MFLAGS} -f Makefile.${BUILD_TYPE} 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 \ @@ -56,3 +52,11 @@ install: cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\ done) +depends: + @(for DIR in ${DIRS}; \ + do \ + TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \ + cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\ + done) + + diff --git a/README b/README index bd9e625aa..91bbec4ac 100644 --- a/README +++ b/README @@ -19,7 +19,7 @@ $Id$ cp CONFIG_ARCH.mv167 CONFIG_ARCH.YOUR_ARCH edit CONFIG_ARCH.YOUR_ARCH - For compiler flags / etc. - cp CONFIG_CLASS_vx.68k CONFIG_CLASS_vx.YOUR_ARCH_CLASS + cp CONFIG.Vx.68k CONFIG.Vx.YOUR_ARCH_CLASS - ONLY IF you are adding a new architecture class, see note in Appendix A. @@ -28,7 +28,9 @@ $Id$ 1.3 To build EPICS: make - To build and install EPICS. - make clean - To clean temporary object files. + make clean - To clean temporary object files. Clean will + remove files from ALL O.ARCH dirs, not + just those specified in BUILD_ARCHS. 1.4 To create an EPICS release: @@ -36,12 +38,18 @@ $Id$ version number. tools/MakeRelease - To create release file. tools/MakeRelease -b - To create release file WITH BINARIES. + (The above do NOT generate dependencies) + -or- + + make release - Will make Tar file, but only after + generating dependencies first. + make built_release - Same as above, but WITH BINARIES. 1.5 "Partial" build commands: make clean.sun4 - Cleans sun4 binaries in O.sun4 dirs only make install.sun4 - Builds sun4 only - make install.mv167 - Builds mv167 only (a sun4 build must be + make install.mv167 - Builds mv167 only (a HOST build must be complete before this can be issued) @@ -52,8 +60,13 @@ NOTES: 2. EPICS binaries are kept in the bin/ARCH and lib/ARCH directories. EPICS shellscripts are kept in the tools directory. + + 3. During a normal build (a "make" or "make install"), the "depends" + dependency will NOT be invoked. Only if "make depends" is run + explicitly, or a "make release" is performed will dependencies be + generated. - 3. Temporary objects are stored in src/DIR/O.ARCH, so one can store + 4. Temporary objects are stored in src/DIR/O.ARCH, so one can store objects for multiple architectures at the same time. While developing source for EPICS, use aliases to facilitate building objects within these directories, e.g.: @@ -61,7 +74,7 @@ NOTES: alias make167 "make -f Makefile.Vx T_A=mv167" make167 O.mv167/dbAccess.o - This example instructs make to build dbAccess.o for the + The above example instructs make to build dbAccess.o for the 167 target using the Vx makefile. ---------------------------------------------------------------------------- @@ -75,8 +88,7 @@ CONFIG_ARCH.ARCH - c c s CONFIG_BASE m m m s CONFIG.Unix.ARCH_CLASS m - c* s CONFIG.Vx.ARCH_CLASS m c* - s -CONFIG_COMMON - - - x -CONFIG_vx - - - s +CONFIG_COMMON - - - s HRULES - - - x RULES - - - x RULES.Vx - - - b @@ -103,24 +115,26 @@ RULES.Unix - - - b src/db/Makefile.Vx (An example EPICS makefile) ^ ^ - | +-- 2. RULES.Vx + | +--- 2. RULES.Vx | Make Dependency Rules. | - +------ 1. CONFIG_vx - ^ ^ ^ - | | | - | | +---- 1. CONFIG_BASE - | | HOST_ARCH = sun4 - | | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f - | | VX_DIR = /vxworks - | | Lots More. - | +------- 2. CONFIG_ARCH.hkv2f - | BUILD_TYPE = Vx - | ARCH_CLASS = 68k - | Arch Specific Compiler Flag Setup - +---------- 3. CONFIG.Vx.68k - Directory Setup - Compiler/Utility Setup + +------- 1. CONFIG + ^ ^ ^ ^ + | | | | + | | | +--- 1. CONFIG_BASE + | | | HOST_ARCH = sun4 + | | | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f + | | | VX_DIR = /vxworks + | | | Lots More. + | | +----- 2. CONFIG_COMMON + | | General info about base. + | +------- 3. CONFIG_ARCH.hkv2f + | BUILD_TYPE = Vx + | ARCH_CLASS = 68k + | Arch Specific Compiler Flag Setup + +--------- 4. CONFIG.Vx.68k + Directory Setup + Compiler/Utility Setup ---------------------------- sun4 example -------------------------------- @@ -130,20 +144,22 @@ RULES.Unix - - - b | Make Dependency Rules. | +------- 1. CONFIG - ^ ^ ^ - | | | - | | +---- 1. CONFIG_BASE - | | HOST_ARCH = sun4 - | | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f - | | VX_DIR = /vxworks - | | Lots More. - | +------- 2. CONFIG_ARCH.sun4 - | BUILD_TYPE = Unix - | ARCH_CLASS = sun4 - | Arch Specific Compiler Flag Setup - +---------- 3. CONFIG.Unix.sun4 - Directory Setup - Compiler/Utility Setup + ^ ^ ^ ^ + | | | | + | | | +--- 1. CONFIG_BASE + | | | HOST_ARCH = sun4 + | | | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f + | | | VX_DIR = /vxworks + | | | Lots More. + | | +----- 2. CONFIG_COMMON + | | General info about base. + | +------- 2. CONFIG_ARCH.sun4 + | BUILD_TYPE = Unix + | ARCH_CLASS = sun4 + | Arch Specific Compiler Flag Setup + +--------- 3. CONFIG.Unix.sun4 + Directory Setup + Compiler/Utility Setup ---------------------------------------------------------------------------- Part 4 --- EPICS dependencies