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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines