1 karl 1.36 #//%2006////////////////////////////////////////////////////////////////////////
|
2 martin 1.31 #//
3 #// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 #// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 #// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
6 #// IBM Corp.; EMC Corporation, The Open Group.
7 #// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 #// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
9 #// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 #// EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.36 #// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 #// EMC Corporation; Symantec Corporation; The Open Group.
|
13 martin 1.31 #//
14 #// Permission is hereby granted, free of charge, to any person obtaining a copy
15 #// of this software and associated documentation files (the "Software"), to
16 #// deal in the Software without restriction, including without limitation the
17 #// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 #// sell copies of the Software, and to permit persons to whom the Software is
19 #// furnished to do so, subject to the following conditions:
20 #//
21 #// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 #// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 #// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 #// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 #// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 #// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 #// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 #// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 #//
30 #//==============================================================================
|
31 karl 1.6 # Pegasus top level make file
|
32 jim.wunderlich 1.34 # see the usage rule for options
33
|
34 mike 1.1 ROOT = .
35
|
36 konrad.r 1.24 include $(ROOT)/env_var.status
|
37 mike 1.1 include $(ROOT)/mak/config.mak
38
|
39 karl 1.49 ## Include mu in the clean structure
40 ## This required because mu is not part of the hiearchial build
41 ##structure. It is built with the buildmu target. Adding this
42 ## variable allows it to be cleaned with the normal clean target.
43 RECURSE_EXTRA_CLEAN_DIRS += src/utils/mu
44
|
45 karl 1.11 # This is a recurse make file
|
46 kumpf 1.48 # Defines subdirectories to go to recursively
|
47 karl 1.6
|
48 kumpf 1.47 DIRS = src
|
49 s.kodali 1.46
50 TEST_DIRS = test
|
51 mike 1.1
|
52 karl 1.11 # Define the inclusion of the recurse.mak file to execute the next
53 # level of makefiles defined by the DIRS variable
|
54 karl 1.6
|
55 jim.wunderlich 1.34 defaultrule: all setupdevserver
56
|
57 mike 1.1 include $(ROOT)/mak/recurse.mak
58
|
59 jim.wunderlich 1.34 .PHONY: FORCE
|
60 jim.wunderlich 1.32
|
61 jim.wunderlich 1.34 FORCE:
|
62 jim.wunderlich 1.32
|
63 jim.wunderlich 1.34 usage: FORCE
64 $(USAGE)
65 $(USAGE)"Makefile targets:"
66 $(USAGE)
67 $(USAGE)"Recursive rules - These are the primatives that traverse the tree"
68 $(USAGE)"invoking the specified command in each subdirectory directory."
69 $(USAGE)"NOTE: all is special, it specifies no target and therefore invokes"
70 $(USAGE)"the default rule for that directory."
71 $(USAGE)"all - recursive DEFAULT rule"
72 $(USAGE)"clean - recursive clean"
73 $(USAGE)"depend - buildmu recursive depend"
74 $(USAGE)"messages - rootbundle recursive messages"
75 $(USAGE)"tests - recursive tests"
76 $(USAGE)"poststarttests - recursive poststarttests"
77 $(USAGE)
78 $(USAGE)"Combinational rules - Combine other rules to achieve results"
79 $(USAGE)"DEFAULT RULE - all, setupdevserver"
80 $(USAGE)"new - clean repositoryclean"
81 $(USAGE)"build - depend all, setupdevserver"
82 $(USAGE)"world - build unittests servertests"
83 $(USAGE)
84 jim.wunderlich 1.34 $(USAGE)"Functional rules - Other rules to achieve specified results"
|
85 jim.wunderlich 1.35 $(USAGE)"clobber -removes objects built during compile"
86 $(USAGE)" specifically the following directories are removed:"
87 $(USAGE)" $(PEGASUS_HOME)/bin"
88 $(USAGE)" $(PEGASUS_HOME)/lib"
89 $(USAGE)" $(PEGASUS_HOME)/obj"
|
90 jim.wunderlich 1.34 $(USAGE)"buildmu - builds the mu utility"
91 $(USAGE)"setupdevserver - setup the development server env"
92 $(USAGE)"cleandevserver - cleans the development server env"
|
93 karl 1.39 $(USAGE)"repository - builds the base repository. Does not remove other"
94 $(USAGE)" namespaces than the base namespaces."
|
95 jim.wunderlich 1.34 $(USAGE)"testrepository - builds items for the test suites into the repository"
|
96 karl 1.39 $(USAGE)"repositoryclean - removes the complete repository"
|
97 jim.wunderlich 1.34 $(USAGE)"listplatforms - List all valid platforms"
98 $(USAGE)
99 $(USAGE)"Test rules (accessable here but implemented in TestMakefile)"
100 $(USAGE)"alltests - unittests and servertests"
101 $(USAGE)"unittests - runs the unit functional test"
102 $(USAGE)"servertests - runs basic server tests"
|
103 jim.wunderlich 1.35 $(USAGE)"perftests - runs basic server performance tests"
|
104 jim.wunderlich 1.34 $(USAGE)"standardtests - runs server extended tests"
105 $(USAGE)"testusage - TestMakefile usage"
106 $(USAGE)"testusage2 - TestMakefile usage2"
|
107 j.alex 1.37 $(USAGE)"stresstests - Runs the default stresstests"
|
108 jim.wunderlich 1.34 $(USAGE)
109 $(USAGE)"--------------------"
110 $(USAGE)"Quick start:"
111 $(USAGE)" After checkout of new tree:"
112 $(USAGE)" use \"make listplatforms\" to view a list of platforms"
113 $(USAGE)" set PEGASUS_PLATFORM=<your platofrm>"
114 $(USAGE)" set PEGASUS_ROOT=<location of your pegasus source>"
115 $(USAGE)" set PEGASUS_HOME=<build output location"
|
116 kumpf 1.42 $(USAGE)" make world"
|
117 jim.wunderlich 1.34 $(USAGE)
118 $(USAGE)" This will build everthing with a default configuration"
|
119 kumpf 1.42 $(USAGE)" and run the automated tests."
|
120 jim.wunderlich 1.34 $(USAGE)
121 $(USAGE)"--------------------"
122 $(USAGE)"Examples:"
|
123 kumpf 1.42 $(USAGE)" After \"cvs checkout\" of new tree: make world"
|
124 jim.wunderlich 1.34 $(USAGE)
125 $(USAGE)" After changes to include files: make"
126 $(USAGE)
127 $(USAGE)" After changes to the files included: make build"
128 $(USAGE)
|
129 kumpf 1.42 $(USAGE)" After \"cvs update\" or to start over: make new world"
|
130 jim.wunderlich 1.34 $(USAGE)
131
132 listplatforms: FORCE
133 $(USAGE)
134 $(USAGE)"The $(words $(VALID_PLATFORMS)) valid platforms are:"
135 $(USAGE)" $(foreach w, $(VALID_PLATFORMS), " $w ")"
136 $(USAGE)
137 $(USAGE)
138
139 #########################################################################
140 # This section defines any prerequisites that are required by the
141 # recursive rules.
142 #
143 # NOTE: You can add prerequisties for the recursive rules but you cannot
144 # add any commands to run as part of the rule. You can define them
145 # and make will quietly ignore them and they will not be run either
146 # before or after the recursive rule.
147 #
148 #
149 messages: rootbundle
|
150 karl 1.6
|
151 jim.wunderlich 1.34 depend: buildmu
|
152 kumpf 1.18
|
153 jim.wunderlich 1.34 #########################################################################
154 # This section defines combinational rules
155 #
|
156 jim.wunderlich 1.32 #-----------------------
|
157 jim.wunderlich 1.34 # build target: builds all source
|
158 jim.wunderlich 1.32 #
|
159 jim.wunderlich 1.34 build: depend all setupdevserver
|
160 jim.wunderlich 1.32
|
161 jim.wunderlich 1.34 #------------------------
162 # rebuild target is being deprecated instead use "make new build"
163 #
164 rebuild_msg: FORCE
165 @$(ECHO) "==============================================================================="
166 @$(ECHO) "Makefile: The rebuild target is being deprecated."
167 @$(ECHO) " Use \"make usage\" for a description of the usage model."
|
168 kumpf 1.42 @$(ECHO) " Consider using \"make new world\" ."
|
169 jim.wunderlich 1.34 @$(ECHO) " Invoking the old rebuild rule now."
170 @$(ECHO) "==============================================================================="
171
172 rebuild: rebuild_msg shortsleep new build s_unittests repository
|
173 jim.wunderlich 1.32
174 #-----------------------
|
175 jim.wunderlich 1.34 # new target: cleans everthing
176 #
177 # This can be combined on the command line with other rules like:
|
178 jim.wunderlich 1.32 #
|
179 jim.wunderlich 1.34 # make new build
180 # make new world
|
181 jim.wunderlich 1.32
|
182 jim.wunderlich 1.34 new: clean repositoryclean
|
183 jim.wunderlich 1.32
184 #-----------------------
|
185 jim.wunderlich 1.34 # world targets: builds everything and dependent on which target may do testing
|
186 jim.wunderlich 1.32 #
187 # Typically used after a fresh checkout from CVS
|
188 jim.wunderlich 1.34
189 world: build s_unittests servertests
190
191
192 ############################
193 #
194 # rules defined in TestMakefile that are repeated here for convenience
|
195 jim.wunderlich 1.32 #
|
196 jim.wunderlich 1.34 shortsleep: FORCE
197 @$(MAKE) -f TestMakefile shortsleep
198
199 servertests: FORCE
200 @ $(MAKE) -f TestMakefile servertests
201
|
202 jim.wunderlich 1.35 perftests: FORCE
203 @ $(MAKE) -f TestMakefile perftests
204
|
205 jim.wunderlich 1.34 s_unittests: FORCE
206 @ $(MAKE) -f TestMakefile -s unittests
207
208 unittests: FORCE
209 @ $(MAKE) -f TestMakefile unittests
210
211 standardtests: FORCE
212 @ $(MAKE) -f TestMakefile standardtests
213
214 alltests: FORCE
215 @ $(MAKE) -f TestMakefile alltests
216
217 testusage: FORCE
218 @ $(MAKE) -f TestMakefile usage
|
219 jim.wunderlich 1.32
|
220 jim.wunderlich 1.34 testusage2: FORCE
221 @ $(MAKE) -f TestMakefile usage2
|
222 mike 1.1
|
223 j.alex 1.37 stresstests:
224 @$(ECHO) "Running OpenPegasus StressTests"
225 @$(MAKE) -f TestMakefile stresstests
226 @$(ECHO) "+++++ OpenPegasus StressTests complete"
|
227 jim.wunderlich 1.35
|
228 jim.wunderlich 1.34 ##########################################################################
229 #
230 # This section defines functional rules
231 #
|
232 jim.wunderlich 1.32 #---------------------
233 # buildmu target: build mu the make utility that among other things
|
234 karl 1.49 # includes a depend implementation. This is a separate target because
235 # it must be build before anything else and before the depend target is used
236 # on some platforms. Note that mu is not used on all platforms.
237 #
|
238 jim.wunderlich 1.32 buildmu: FORCE
239 $(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/mu -f Makefile
240
241 #----------------------
242 # setupdevserver and cleandevserver are used to setup and clear the
243 # server configuration files needed to run the server in a development
244 # environment.
245 #
246 setupdevserver: FORCE
247 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
248 @$(ECHO) "PEGASUS Development Server Runtime Environment configured "
249
250 cleandevserver: FORCE
251 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run_clean
|
252 karl 1.6
|
253 jim.wunderlich 1.35 clobber: FORCE
254 - $(RMDIRHIER) $(PEGASUS_HOME)/bin
255 - $(RMDIRHIER) $(PEGASUS_HOME)/lib
256 - $(RMDIRHIER) $(PEGASUS_HOME)/obj
257
|
258 jim.wunderlich 1.34
259 #---------------------
|
260 kumpf 1.48 # The repository target removes the entire repository and rebuilds the Pegasus
261 # namespaces. The repositoryServer target does not remove the repository
262 # before building the Pegasus namespaces. (The repositoryServer target in
263 # TestMakefile *does* remove the repository first.)
|
264 mike 1.4
|
265 kumpf 1.25 # Note: Arguments must be quoted to preserve upper case characters in VMS.
|
266 kumpf 1.48 repository: repositoryclean
|
267 kumpf 1.25 @ $(MAKE) "-SC" Schemas/Pegasus repository
|
268 mike 1.9
|
269 jim.wunderlich 1.29 repositoryclean: FORCE
270 @ $(RMREPOSITORY) $(REPOSITORY_ROOT)
271
|
272 kumpf 1.18 repositoryServer: FORCE
|
273 kumpf 1.25 @ $(MAKE) "-SC" Schemas/Pegasus repositoryServer
|
274 kumpf 1.17
|
275 kumpf 1.48 #---------------------
276 # The testrepository and testrepositoryServer targets build the Pegasus test
277 # namespaces. A pre-existing repository is not removed.
278
|
279 kumpf 1.18 testrepository: FORCE
|
280 kumpf 1.25 @ $(MAKE) "-SC" src/Providers/sample/Load repository
281 @ $(MAKE) "-SC" test/wetest repository
282 @ $(MAKE) "-SC" src/Clients/benchmarkTest/Load repository
|
283 chuck 1.26 @ $(MAKE) "-SC" src/Pegasus/CQL/CQLCLI repository
|
284 chuck 1.27 @ $(MAKE) "-SC" src/Pegasus/Query/QueryExpression/tests repository
|
285 kumpf 1.28 @ $(MAKE) "-SC" src/Providers/TestProviders/Load repository
|
286 karl 1.44 ifeq ($(PEGASUS_ENABLE_CQL),true)
|
287 a.arora 1.30 @ $(MAKE) "-SC" src/Pegasus/ControlProviders/QueryCapabilitiesProvider/tests repository
|
288 kumpf 1.43 endif
|
289 marek 1.38 ifeq ($(PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER), true)
290 @ $(MAKE) "-SC" src/Pegasus/ProviderManager2/JMPI/org/pegasus/jmpi/tests repository
291 endif
|
292 w.otsuka 1.40 @ $(MAKE) --directory=$(PEGASUS_ROOT)/src/Clients/cimsub/tests/testscript \
293 -f Makefile repository
|
294 kumpf 1.17
|
295 kumpf 1.18 testrepositoryServer: FORCE
|
296 kumpf 1.25 @ $(MAKE) "-SC" src/Providers/sample/Load repositoryServer
297 @ $(MAKE) "-SC" test/wetest repositoryServer
298 @ $(MAKE) "-SC" src/Clients/benchmarkTest/Load repositoryServer
|
299 chuck 1.26 @ $(MAKE) "-SC" src/Pegasus/CQL/CQLCLI repositoryServer
|
300 chuck 1.27 @ $(MAKE) "-SC" src/Pegasus/Query/QueryExpression/tests repositoryServer
|
301 kumpf 1.28 @ $(MAKE) "-SC" src/Providers/TestProviders/Load repositoryServer
|
302 karl 1.44 ifeq ($(PEGASUS_ENABLE_CQL),true)
|
303 a.arora 1.30 @ $(MAKE) "-SC" src/Pegasus/ControlProviders/QueryCapabilitiesProvider/tests repositoryServer
|
304 kumpf 1.43 endif
|
305 marek 1.38 ifeq ($(PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER), true)
306 @ $(MAKE) "-SC" src/Pegasus/ProviderManager2/JMPI/org/pegasus/jmpi/tests repositoryServer
307 endif
|
308 w.otsuka 1.40 @ $(MAKE) --directory=$(PEGASUS_ROOT)/src/Clients/cimsub/tests/testscript \
309 -f Makefile repositoryServer
|
310 kumpf 1.16
|
311 konrad.r 1.24 config:
312 @ $(ROOT)/SetConfig_EnvVar
313
|
314 humberto 1.21 rootbundle:
315 $(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/cnv2rootbundle -f Makefile
|