ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/basics.mk
Revision: 1.19
Committed: Wed Sep 20 16:49:46 2000 UTC (24 years, 8 months ago) by williamc
Branch: MAIN
Changes since 1.18: +0 -23 lines
Log Message:
Remove scramds references

File Contents

# User Rev Content
1 williamc 1.1 #
2     # Preliminaries
3     #
4 williamc 1.18 LIBDIR=$(LOCALTOP)/lib/$(SCRAM_ARCH) $(RELEASETOP)/lib/$(SCRAM_ARCH) $(PRIORITY_LIBDIR)
5     CXXFLAGS+=$(CXXUSERFLAGS)
6     JAVA_CLASSDIR=$(LOCALTOP)/lib/$(SCRAM_ARCH)
7 williamc 1.1
8     #
9     # Make sure nobody tries to run this directly through gmake
10     #
11     ifndef DefaultMakefile
12     all: exit
13     endif
14    
15 williamc 1.18
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 williamc 1.14 # -- storage of libraries
39     librarystore:=$(LOCALTOP)/$(INTlib)
40 williamc 1.15
41 williamc 1.14 libsavaillocal=$(notdir $(wildcard $(librarystore)/*))
42     libsavailbase=$(notdir $(wildcard $(RELEASETOP)/$(INTlib)/*))
43     libsavail=$(sort $(libsavailbase) $(libsavaillocal))
44     libslocal=$(foreach var,$(lib),$(filter lib$(var).a, $(libsavail)))
45     libslocal_I=$(foreach var,$(lib_I),$(filter lib$(var).a, $(libsavail)))
46     libslocal_d=$(foreach var,$(lib_d),$(filter lib$(var).a, $(libsavail)))
47 williamc 1.1
48     #
49     # Pointing to file storage locations for the various types
50     #
51     # -- src code and unspecified types
52     VPATH:=$(LOCALTOP)/$(ClassDir):$(RELEASETOP)/$(ClassDir)
53     # -- .o files will be kept in the working directory
54     vpath %.o $(LOCALTOP)/$(workdir):$(RELEASETOP)/$(workdir)
55    
56     #
57     ifdef ReqDependencies
58     always:$(LOCALTOP)/$(workdir)/PackageReqs
59 williamc 1.11 $(LOCALTOP)/$(workdir)/PackageReqs:$(ReqDependencies)
60 williamc 1.18 $(SCRAMPERL) $(TOOL_HOME)/BuildPackageReqs $@ $?
61 williamc 1.1 endif
62    
63 williamc 1.18
64 williamc 1.1 #
65     # Get local mods
66     #
67     ifdef LatestBuildFile
68     include ${LatestBuildFile}
69     endif
70 williamc 1.18
71 williamc 1.1 #
72     # get build requirements Class
73     #
74     ifdef DefaultBuildFile
75     include ${DefaultBuildFile}
76     endif
77    
78 williamc 1.9 #
79 williamc 1.18 # Group Settings
80     #
81     ifdef SCRAM_GROUPSDIR
82     -include $(SCRAM_GROUPSDIR)
83     endif
84    
85 williamc 1.9 # Site settings
86     #
87     clientmakefile=$(LOCALTOP)/$(INTwork)/clientmakefile
88 williamc 1.17 -include $(clientmakefile)
89 williamc 1.1
90     #
91     # get build targets
92     #
93 williamc 1.9 include ${TOOL_HOME}/compilers.mk
94 williamc 1.1 include ${TOOL_HOME}/toolrules.mk
95    
96 williamc 1.9
97 williamc 1.1 #
98     # -- Some tool setups which dont yet have a home
99     #
100 williamc 1.18 CPPFLAGS += $(addprefix -I,$(PRIORITY_INCLUDE)) $(INCLUDEPATH)
101 williamc 1.1
102    
103     #
104     # now add our includepath
105     #
106     INCLUDEPATH+=-I$(LOCALTOP)/${INTsrc} -I$(RELEASETOP)/${INTsrc}
107    
108 williamc 1.5 #
109     # Dependency information
110     #
111 williamc 1.9 -include dependencies.mk
112 williamc 1.5
113 williamc 1.18 #dependencies.mk :: $(clientmakefile)
114 williamc 1.1 #
115     # Process Subdirs
116     #
117     ifdef SUBDIRS
118 williamc 1.12 $(SUBDIRS)::
119 williamc 1.1 @echo ------- Building ---- $@ -----------
120 williamc 1.18 @if [ -d $(LOCALTOP)/$(ClassDir)/$@ ]; then \
121     cd $(LOCALTOP)/$(ClassDir)/$@; $(SCRAMPERL) $(TOOL_HOME)/scram build; \
122     else echo SCRAM Warning : $@ does not exist; \
123     fi
124 williamc 1.1 endif
125    
126    
127 williamc 1.18 #HELPINCLUDEMAKEFILES := ${DefaultBuildFile} ${TOOL_HOME}/toolrules.mk
128 williamc 1.1
129     #
130     #
131     # -- Some error trapping and debug targets
132     #
133    
134     dummy:
135    
136    
137 williamc 1.18 .PHONY: help clean
138     help::
139     @echo "--------------------------------------------------------"
140     ifndef BINMODE
141     help::
142     @echo "General Targets"
143     @echo "---------------"
144     @echo "clean - clean out the corresponding working directory"
145     @echo "echo_VAR - debugging only, prints out the value of the scram variable VAR"
146 williamc 1.1 @echo "-----------------"
147 williamc 1.18 endif
148 williamc 1.1
149     exit:
150 williamc 1.18 @echo "Please Use Scram. Do not use gmake directly."
151 williamc 1.1 @exit 1
152    
153     echo_%:
154     @echo "$(subst echo_,,$@) = $($(subst echo_,,$@))"
155    
156 williamc 1.18
157     #
158     # Other non-critical targets
159     #
160    
161     TAGS:
162     etags -o TAGS $(files) $(binfiles)
163    
164     tags:
165     ctags -o tags $(files) $(binfiles)
166    
167     #
168 williamc 1.1 #
169     # clean targets
170     #
171    
172     # make sure the variables will be set before rm -r by ensuring that
173     # it has come through the wrapper script
174    
175     ifdef DefaultMakefile
176 williamc 1.10 clean::
177 williamc 1.1 @echo Cleaning working folder $(workdir)
178 williamc 1.18 ifdef LOCALTOP
179     ifdef workdir
180     @rm -rf $(LOCALTOP)/$(workdir)/*
181     endif
182     endif
183 williamc 1.1
184     very_clean:
185     @echo Cleaning all working folders in $(INTwork)
186     @cd $(LOCALTOP)/$(INTwork)
187 williamc 1.18 ifdef LOCALTOP
188     ifdef workdir
189     @rm -rf $(LOCALTOP)/$(INTwork)/*
190     endif
191 williamc 1.1 endif
192 williamc 1.18 endif