ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/basics.mk
Revision: 1.17
Committed: Thu Apr 8 06:42:12 1999 UTC (26 years, 1 month ago) by williamc
Branch: MAIN
CVS Tags: ProtoEnd, V0_9, V0_8
Branch point for: V0_9branch
Changes since 1.16: +1 -1 lines
Log Message:
Silently include clientmakefile

File Contents

# Content
1 #
2 # Preliminaries
3 #
4 LIBDIR:=$(LOCALTOP)/lib/$(SCRAM_ARCH) $(RELEASETOP)/lib/$(SCRAM_ARCH)
5
6 #
7 # Make sure nobody tries to run this directly through gmake
8 #
9 ifndef DefaultMakefile
10 all: exit
11 endif
12
13 # -- storage of libraries
14 librarystore:=$(LOCALTOP)/$(INTlib)
15
16 libsavaillocal=$(notdir $(wildcard $(librarystore)/*))
17 libsavailbase=$(notdir $(wildcard $(RELEASETOP)/$(INTlib)/*))
18 libsavail=$(sort $(libsavailbase) $(libsavaillocal))
19 libslocal=$(foreach var,$(lib),$(filter lib$(var).a, $(libsavail)))
20 libslocal_I=$(foreach var,$(lib_I),$(filter lib$(var).a, $(libsavail)))
21 libslocal_d=$(foreach var,$(lib_d),$(filter lib$(var).a, $(libsavail)))
22
23 #
24 # Pointing to file storage locations for the various types
25 #
26 # -- src code and unspecified types
27 VPATH:=$(LOCALTOP)/$(ClassDir):$(RELEASETOP)/$(ClassDir)
28 # -- .o files will be kept in the working directory
29 vpath %.o $(LOCALTOP)/$(workdir):$(RELEASETOP)/$(workdir)
30
31 #
32 ifdef ReqDependencies
33 always:$(LOCALTOP)/$(workdir)/PackageReqs
34 $(LOCALTOP)/$(workdir)/PackageReqs:$(ReqDependencies)
35 $(TOOL_HOME)/BuildPackageReqs $@ $?
36 endif
37
38 #
39 # Get local mods
40 #
41 ifdef LatestBuildFile
42 include ${LatestBuildFile}
43 endif
44 #
45 # get build requirements Class
46 #
47 ifdef DefaultBuildFile
48 include ${DefaultBuildFile}
49 endif
50
51 #
52 # Site settings
53 #
54 clientmakefile=$(LOCALTOP)/$(INTwork)/clientmakefile
55 -include $(clientmakefile)
56
57 #
58 # get build targets
59 #
60 include ${TOOL_HOME}/compilers.mk
61 include ${TOOL_HOME}/toolrules.mk
62
63
64 #
65 # -- Some tool setups which dont yet have a home
66 #
67 CPPFLAGS += $(INCLUDEPATH)
68
69
70 #
71 # now add our includepath
72 #
73 INCLUDEPATH+=-I$(LOCALTOP)/${INTsrc} -I$(RELEASETOP)/${INTsrc}
74
75 #
76 # Dependency information
77 #
78 -include dependencies.mk
79
80 #
81 # Process Subdirs
82 #
83 ifdef SUBDIRS
84 $(SUBDIRS)::
85 @echo ------- Building ---- $@ -----------
86 @cd $(LOCALTOP)/$(ClassDir)/$@; $(TOOL_HOME)/scram build
87 endif
88
89 #
90 # clientmakefile creation
91 #
92 $(clientmakefile): $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings_reqs $(projdeps) $(TOOL_HOME)/ProcessSiteFile
93 @$(TOOL_HOME)/ProcessSiteFile $< $@ $(projdeps)
94
95 HELPINCLUDEMAKEFILES := ${DefaultBuildFile} ${TOOL_HOME}/toolrules.mk
96
97 #
98 #
99 # -- Some error trapping and debug targets
100 #
101
102 dummy:
103
104
105 help:
106 @echo "Available Targets"
107 @echo "-----------------"
108 @cat $(HELPINCLUDEMAKEFILES) | grep ':' | grep -v '^[\%\$$]' | \
109 grep -v ':=' | grep -v 'vpath'
110
111 exit:
112 @echo "Please Use the orcabuild script. Do not use gmake directly."
113 @exit 1
114
115 echo_%:
116 @echo "$(subst echo_,,$@) = $($(subst echo_,,$@))"
117
118 #
119 # clean targets
120 #
121
122 # make sure the variables will be set before rm -r by ensuring that
123 # it has come through the wrapper script
124
125 ifdef DefaultMakefile
126 clean::
127 @echo Cleaning working folder $(workdir)
128 @rm -rf $(LOCALTOP)/$(workdir)/.* $(LOCALTOP)/$(workdir)/*
129
130 very_clean:
131 @echo Cleaning all working folders in $(INTwork)
132 @cd $(LOCALTOP)/$(INTwork)
133 @rm -rf $(LOCALTOP)/$(INTwork)/*.o
134 endif