ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/basics.mk
(Generate patch)

Comparing COMP/SCRAM/src/basics.mk (file contents):
Revision 1.8 by williamc, Mon Mar 22 18:38:39 1999 UTC vs.
Revision 1.17.2.24.2.1.2.3 by williamc, Mon Oct 23 14:14:13 2000 UTC

# Line 1 | Line 1
1   #
2   # Preliminaries
3   #
4 < LIBDIR:=$(LOCALTOP)/lib/$(SCRAM_ARCH) $(RELEASETOP)/lib/$(SCRAM_ARCH)
4 > LIBDIR=$(LOCALTOP)/lib/$(SCRAM_ARCH) $(RELEASETOP)/lib/$(SCRAM_ARCH) $(PRIORITY_LIBDIR)
5 > CXXFLAGS+=$(CXXUSERFLAGS)
6 > JAVA_CLASSDIR=$(LOCALTOP)/lib/$(SCRAM_ARCH)
7  
8   #
9   # Make sure nobody tries to run this directly through gmake
# Line 11 | Line 13 | all: exit
13   endif
14  
15  
16 + # Quiet setting for <Build> tags
17 +  QUIET = no
18 +  ifeq ($(QUIET),yes)
19 +    _quietbuild_ = @echo "Creating $<...";
20 +    _quietstamp_ = @
21 +  else
22 +    _quietbuild_ =
23 +    _quietstamp_ = @
24 +  endif
25 +
26 + #
27 + # Generic scram build target
28 + #
29 + scrambuild_% :
30 +        @dir=$(subst scrambuild_,,$@); \
31 +        if [ -d $(LOCALTOP)/$(INTsrc)/$$dir ]; then \
32 +        echo "------- Building ---- $$dir -----------"; \
33 +        cd $(LOCALTOP)/$(INTsrc)/$$dir; $(SCRAMPERL) $(TOOL_HOME)/scram build; \
34 +        fi
35 +
36 +        
37 + #
38 + # Get local mods
39 + #
40 + ifdef LatestBuildFile
41 + include ${LatestBuildFile}
42 + endif
43 +
44 + #
45 + # get build requirements Class
46 + #
47 + ifdef DefaultBuildFile
48 + include ${DefaultBuildFile}
49 + endif
50 +
51 + # -- storage of libraries
52 + librarystore:=$(SCRAMSTORE_lib)
53 + INTlib:=$(SCRAMSTORENAME_lib)
54 +
55 + libsavaillocal=$(notdir $(wildcard $(librarystore)/*))
56 + libsavailbase=$(notdir $(wildcard $(RELEASETOP)/$(INTlib)/*))
57 + libsavail=$(sort $(libsavailbase) $(libsavaillocal))
58 + libslocal=$(foreach var,$(lib),$(filter lib$(var).a, $(libsavail)))
59 + libslocal_I=$(foreach var,$(lib_I),$(filter lib$(var).a, $(libsavail)))
60 + libslocal_d=$(foreach var,$(lib_d),$(filter lib$(var).a, $(libsavail)))
61 +
62   #
63   # Pointing to file storage locations for the various types
64   #
# Line 22 | Line 70 | vpath %.o $(LOCALTOP)/$(workdir):$(RELEA
70   #
71   ifdef ReqDependencies
72   always:$(LOCALTOP)/$(workdir)/PackageReqs
73 < $(LOCALTOP)/$(workdir)/PackageReqs::$(ReqDependencies)
74 <        $(TOOL_HOME)/BuildPackageReqs $@ $?
73 > $(LOCALTOP)/$(workdir)/PackageReqs:$(ReqDependencies)
74 >        $(SCRAMPERL) $(TOOL_HOME)/BuildPackageReqs $@ $?
75   endif
76  
77 +
78 +
79   #
80 < # Get local mods
31 < #
32 < ifdef LatestBuildFile
33 < include ${LatestBuildFile}
34 < endif
35 < #
36 < # get build requirements Class
80 > # Group Settings
81   #
82 < ifdef DefaultBuildFile
83 < include ${DefaultBuildFile}
82 > ifdef SCRAM_GROUPSDIR
83 > -include $(SCRAM_GROUPSDIR)
84   endif
85  
86 + # Site settings
87 + #
88 + clientmakefile=$(LOCALTOP)/$(INTwork)/clientmakefile
89 + -include $(clientmakefile)
90  
91   #
92   # get build targets
93   #
94 + include ${TOOL_HOME}/compilers.mk
95   include ${TOOL_HOME}/toolrules.mk
96  
97 +
98   #
99   # -- Some tool setups which dont yet have a home
100   #
101 < CPPFLAGS += $(INCLUDEPATH)
101 > CPPFLAGS += $(addprefix -I,$(PRIORITY_INCLUDE)) $(INCLUDEPATH)
102  
53 #
54 # Site settings
55 #
56 clientmakefile=$(LOCALTOP)/$(INTwork)/clientmakefile
57 include $(clientmakefile)
103  
104   #
105   # now add our includepath
# Line 64 | Line 109 | INCLUDEPATH+=-I$(LOCALTOP)/${INTsrc} -I$
109   #
110   # Dependency information
111   #
112 < include dependencies.mk
112 > -include dependencies.mk
113  
114 + #dependencies.mk :: $(clientmakefile)
115   #
116   # Process Subdirs
117   #
118   ifdef SUBDIRS
119   $(SUBDIRS)::
120          @echo ------- Building ---- $@ -----------
121 <        @cd $(LOCALTOP)/$(ClassDir)/$@; $(TOOL_HOME)/scram build
121 >        @if [ -d $(LOCALTOP)/$(ClassDir)/$@ ]; then \
122 >        cd $(LOCALTOP)/$(ClassDir)/$@; $(SCRAMPERL) $(TOOL_HOME)/scram build; \
123 >        else echo SCRAM Warning : $@ does not exist; \
124 >        fi
125   endif
126  
78 #
79 # clientmakefile creation
80 #
81 $(clientmakefile):: $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings $(LOCALTOP)/.SCRAM/${SCRAM_ARCH}/clientsettings_reqs $(projdeps) $(TOOL_HOME)/ProcessSiteFile
82        @$(TOOL_HOME)/ProcessSiteFile $< $@ $(projdeps)
127  
128 < HELPINCLUDEMAKEFILES := ${DefaultBuildFile} ${TOOL_HOME}/toolrules.mk
128 > #HELPINCLUDEMAKEFILES := ${DefaultBuildFile} ${TOOL_HOME}/toolrules.mk
129  
130   #
131   #
# Line 91 | Line 135 | HELPINCLUDEMAKEFILES := ${DefaultBuildFi
135   dummy:
136  
137  
138 < help:
139 <        @echo "Available Targets"
138 > .PHONY: help clean
139 > help::
140 >        @echo "--------------------------------------------------------"
141 > ifndef BINMODE
142 > help::
143 >        @echo "General Targets"
144 >        @echo "---------------"
145 >        @echo "clean - clean out the corresponding working directory"
146 >        @echo "echo_VAR - debugging only, prints out the value of the scram variable VAR"
147          @echo "-----------------"
148 <        @cat $(HELPINCLUDEMAKEFILES) | grep ':' | grep -v '^[\%\$$]' | \
98 <                grep -v ':=' | grep -v 'vpath'
148 > endif
149  
150   exit:
151 <        @echo "Please Use the orcabuild script. Do not use gmake directly."
151 >        @echo "Please Use Scram. Do not use gmake directly."
152          @exit 1
153  
154   echo_%:
155          @echo "$(subst echo_,,$@) = $($(subst echo_,,$@))"
156  
157 +
158 + #
159 + # Other non-critical targets
160 + #
161 +
162 + TAGS:
163 +        etags -o TAGS $(files) $(binfiles)
164 +
165 + tags:
166 +        ctags -o tags $(files) $(binfiles)
167 +
168 + #
169   #
170   # clean targets
171   #
# Line 112 | Line 174 | echo_%:
174   # it has come through the wrapper script
175  
176   ifdef DefaultMakefile
177 < clean:
177 > clean::
178          @echo Cleaning working folder $(workdir)
179 + ifdef LOCALTOP
180 + ifdef workdir
181          @rm -rf $(LOCALTOP)/$(workdir)/*
182 + endif
183 + endif
184  
185   very_clean:
186          @echo Cleaning all working folders in $(INTwork)
187          @cd $(LOCALTOP)/$(INTwork)
188 <        @rm -rf $(LOCALTOP)/$(INTwork)/*.o
188 > ifdef LOCALTOP
189 > ifdef workdir
190 >        @rm -rf $(LOCALTOP)/$(INTwork)/*
191   endif
192 + endif
193 + endif
194 +
195 + #
196 + # datestamp files
197 + #
198 + .PHONY: datestamp_config datestamp
199 +
200 + scramds_%::
201 +        @$(SCRAMPERL) $(SCRAM_HOME)/src/scramds $*.ds $*
202 +
203 + #
204 + # rather than tracing all the dependency root - just check all local .ds files
205 + #
206 + dsfiles=$(wildcard *.ds)
207 + releasedsfiles=$(wildcard $(RELEASETOP)/$(workdir)/*.ds)
208 +
209 + datestamp_config:
210 +        @if [ "$(dsfiles)" = "" ]; then \
211 +         if [ "$(releasedsfiles)" != "" ]; then \
212 +           cp $(releasedsfiles) $(LOCALTOP)/$(workdir); \
213 +         fi; \
214 +        fi
215 +
216 + datestamp: $(addprefix scramds_, $(basename $(dsfiles)))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines