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.11 # This is a recurse make file
|
40 kumpf 1.48 # Defines subdirectories to go to recursively
|
41 karl 1.6
|
42 kumpf 1.47 DIRS = src
|
43 s.kodali 1.46
44 TEST_DIRS = test
|
45 mike 1.1
|
46 karl 1.11 # Define the inclusion of the recurse.mak file to execute the next
47 # level of makefiles defined by the DIRS variable
|
48 karl 1.6
|
49 jim.wunderlich 1.34 defaultrule: all setupdevserver
50
|
51 mike 1.1 include $(ROOT)/mak/recurse.mak
52
|
53 jim.wunderlich 1.34 .PHONY: FORCE
|
54 jim.wunderlich 1.32
|
55 jim.wunderlich 1.34 FORCE:
|
56 jim.wunderlich 1.32
|
57 jim.wunderlich 1.34 usage: FORCE
58 $(USAGE)
59 $(USAGE)"Makefile targets:"
60 $(USAGE)
61 $(USAGE)"Recursive rules - These are the primatives that traverse the tree"
62 $(USAGE)"invoking the specified command in each subdirectory directory."
63 $(USAGE)"NOTE: all is special, it specifies no target and therefore invokes"
64 $(USAGE)"the default rule for that directory."
65 $(USAGE)"all - recursive DEFAULT rule"
66 $(USAGE)"clean - recursive clean"
67 $(USAGE)"depend - buildmu recursive depend"
68 $(USAGE)"messages - rootbundle recursive messages"
69 $(USAGE)"tests - recursive tests"
70 $(USAGE)"poststarttests - recursive poststarttests"
71 $(USAGE)
72 $(USAGE)"Combinational rules - Combine other rules to achieve results"
73 $(USAGE)"DEFAULT RULE - all, setupdevserver"
74 $(USAGE)"new - clean repositoryclean"
75 $(USAGE)"build - depend all, setupdevserver"
76 $(USAGE)"world - build unittests servertests"
77 $(USAGE)
78 jim.wunderlich 1.34 $(USAGE)"Functional rules - Other rules to achieve specified results"
|
79 jim.wunderlich 1.35 $(USAGE)"clobber -removes objects built during compile"
80 $(USAGE)" specifically the following directories are removed:"
81 $(USAGE)" $(PEGASUS_HOME)/bin"
82 $(USAGE)" $(PEGASUS_HOME)/lib"
83 $(USAGE)" $(PEGASUS_HOME)/obj"
|
84 jim.wunderlich 1.34 $(USAGE)"buildmu - builds the mu utility"
85 $(USAGE)"setupdevserver - setup the development server env"
86 $(USAGE)"cleandevserver - cleans the development server env"
|
87 karl 1.39 $(USAGE)"repository - builds the base repository. Does not remove other"
88 $(USAGE)" namespaces than the base namespaces."
|
89 jim.wunderlich 1.34 $(USAGE)"testrepository - builds items for the test suites into the repository"
|
90 karl 1.39 $(USAGE)"repositoryclean - removes the complete repository"
|
91 jim.wunderlich 1.34 $(USAGE)"listplatforms - List all valid platforms"
92 $(USAGE)
93 $(USAGE)"Test rules (accessable here but implemented in TestMakefile)"
94 $(USAGE)"alltests - unittests and servertests"
95 $(USAGE)"unittests - runs the unit functional test"
96 $(USAGE)"servertests - runs basic server tests"
|
97 jim.wunderlich 1.35 $(USAGE)"perftests - runs basic server performance tests"
|
98 jim.wunderlich 1.34 $(USAGE)"standardtests - runs server extended tests"
99 $(USAGE)"testusage - TestMakefile usage"
100 $(USAGE)"testusage2 - TestMakefile usage2"
|
101 j.alex 1.37 $(USAGE)"stresstests - Runs the default stresstests"
|
102 jim.wunderlich 1.34 $(USAGE)
103 $(USAGE)"--------------------"
104 $(USAGE)"Quick start:"
105 $(USAGE)" After checkout of new tree:"
106 $(USAGE)" use \"make listplatforms\" to view a list of platforms"
107 $(USAGE)" set PEGASUS_PLATFORM=<your platofrm>"
108 $(USAGE)" set PEGASUS_ROOT=<location of your pegasus source>"
109 $(USAGE)" set PEGASUS_HOME=<build output location"
|
110 kumpf 1.42 $(USAGE)" make world"
|
111 jim.wunderlich 1.34 $(USAGE)
112 $(USAGE)" This will build everthing with a default configuration"
|
113 kumpf 1.42 $(USAGE)" and run the automated tests."
|
114 jim.wunderlich 1.34 $(USAGE)
115 $(USAGE)"--------------------"
116 $(USAGE)"Examples:"
|
117 kumpf 1.42 $(USAGE)" After \"cvs checkout\" of new tree: make world"
|
118 jim.wunderlich 1.34 $(USAGE)
119 $(USAGE)" After changes to include files: make"
120 $(USAGE)
121 $(USAGE)" After changes to the files included: make build"
122 $(USAGE)
|
123 kumpf 1.42 $(USAGE)" After \"cvs update\" or to start over: make new world"
|
124 jim.wunderlich 1.34 $(USAGE)
125
126 listplatforms: FORCE
127 $(USAGE)
128 $(USAGE)"The $(words $(VALID_PLATFORMS)) valid platforms are:"
129 $(USAGE)" $(foreach w, $(VALID_PLATFORMS), " $w ")"
130 $(USAGE)
131 $(USAGE)
132
133 #########################################################################
134 # This section defines any prerequisites that are required by the
135 # recursive rules.
136 #
137 # NOTE: You can add prerequisties for the recursive rules but you cannot
138 # add any commands to run as part of the rule. You can define them
139 # and make will quietly ignore them and they will not be run either
140 # before or after the recursive rule.
141 #
142 #
143 messages: rootbundle
|
144 karl 1.6
|
145 jim.wunderlich 1.34 depend: buildmu
|
146 kumpf 1.18
|
147 jim.wunderlich 1.34 #########################################################################
148 # This section defines combinational rules
149 #
|
150 jim.wunderlich 1.32 #-----------------------
|
151 jim.wunderlich 1.34 # build target: builds all source
|
152 jim.wunderlich 1.32 #
|
153 jim.wunderlich 1.34 build: depend all setupdevserver
|
154 jim.wunderlich 1.32
|
155 jim.wunderlich 1.34 #------------------------
156 # rebuild target is being deprecated instead use "make new build"
157 #
158 rebuild_msg: FORCE
159 @$(ECHO) "==============================================================================="
160 @$(ECHO) "Makefile: The rebuild target is being deprecated."
161 @$(ECHO) " Use \"make usage\" for a description of the usage model."
|
162 kumpf 1.42 @$(ECHO) " Consider using \"make new world\" ."
|
163 jim.wunderlich 1.34 @$(ECHO) " Invoking the old rebuild rule now."
164 @$(ECHO) "==============================================================================="
165
166 rebuild: rebuild_msg shortsleep new build s_unittests repository
|
167 jim.wunderlich 1.32
168 #-----------------------
|
169 jim.wunderlich 1.34 # new target: cleans everthing
170 #
171 # This can be combined on the command line with other rules like:
|
172 jim.wunderlich 1.32 #
|
173 jim.wunderlich 1.34 # make new build
174 # make new world
|
175 jim.wunderlich 1.32
|
176 jim.wunderlich 1.34 new: clean repositoryclean
|
177 jim.wunderlich 1.32
178 #-----------------------
|
179 jim.wunderlich 1.34 # world targets: builds everything and dependent on which target may do testing
|
180 jim.wunderlich 1.32 #
181 # Typically used after a fresh checkout from CVS
|
182 jim.wunderlich 1.34
183 world: build s_unittests servertests
184
185
186 ############################
187 #
188 # rules defined in TestMakefile that are repeated here for convenience
|
189 jim.wunderlich 1.32 #
|
190 jim.wunderlich 1.34 shortsleep: FORCE
191 @$(MAKE) -f TestMakefile shortsleep
192
193 servertests: FORCE
194 @ $(MAKE) -f TestMakefile servertests
195
|
196 jim.wunderlich 1.35 perftests: FORCE
197 @ $(MAKE) -f TestMakefile perftests
198
|
199 jim.wunderlich 1.34 s_unittests: FORCE
200 @ $(MAKE) -f TestMakefile -s unittests
201
202 unittests: FORCE
203 @ $(MAKE) -f TestMakefile unittests
204
205 standardtests: FORCE
206 @ $(MAKE) -f TestMakefile standardtests
207
208 alltests: FORCE
209 @ $(MAKE) -f TestMakefile alltests
210
211 testusage: FORCE
212 @ $(MAKE) -f TestMakefile usage
|
213 jim.wunderlich 1.32
|
214 jim.wunderlich 1.34 testusage2: FORCE
215 @ $(MAKE) -f TestMakefile usage2
|
216 mike 1.1
|
217 j.alex 1.37 stresstests:
218 @$(ECHO) "Running OpenPegasus StressTests"
219 @$(MAKE) -f TestMakefile stresstests
220 @$(ECHO) "+++++ OpenPegasus StressTests complete"
|
221 jim.wunderlich 1.35
|
222 jim.wunderlich 1.34 ##########################################################################
223 #
224 # This section defines functional rules
225 #
|
226 jim.wunderlich 1.32 #---------------------
227 # buildmu target: build mu the make utility that among other things
228 # includes depend
229 buildmu: FORCE
230 $(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/mu -f Makefile
231
232 #----------------------
233 # setupdevserver and cleandevserver are used to setup and clear the
234 # server configuration files needed to run the server in a development
235 # environment.
236 #
237 setupdevserver: FORCE
238 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
239 @$(ECHO) "PEGASUS Development Server Runtime Environment configured "
240
241 cleandevserver: FORCE
242 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run_clean
|
243 karl 1.6
|
244 jim.wunderlich 1.35 clobber: FORCE
245 - $(RMDIRHIER) $(PEGASUS_HOME)/bin
246 - $(RMDIRHIER) $(PEGASUS_HOME)/lib
247 - $(RMDIRHIER) $(PEGASUS_HOME)/obj
248
|
249 jim.wunderlich 1.34
250 #---------------------
|
251 kumpf 1.48 # The repository target removes the entire repository and rebuilds the Pegasus
252 # namespaces. The repositoryServer target does not remove the repository
253 # before building the Pegasus namespaces. (The repositoryServer target in
254 # TestMakefile *does* remove the repository first.)
|
255 mike 1.4
|
256 kumpf 1.25 # Note: Arguments must be quoted to preserve upper case characters in VMS.
|
257 kumpf 1.48 repository: repositoryclean
|
258 kumpf 1.25 @ $(MAKE) "-SC" Schemas/Pegasus repository
|
259 mike 1.9
|
260 jim.wunderlich 1.29 repositoryclean: FORCE
261 @ $(RMREPOSITORY) $(REPOSITORY_ROOT)
262
|
263 kumpf 1.18 repositoryServer: FORCE
|
264 kumpf 1.25 @ $(MAKE) "-SC" Schemas/Pegasus repositoryServer
|
265 kumpf 1.17
|
266 kumpf 1.48 #---------------------
267 # The testrepository and testrepositoryServer targets build the Pegasus test
268 # namespaces. A pre-existing repository is not removed.
269
|
270 kumpf 1.18 testrepository: FORCE
|
271 kumpf 1.25 @ $(MAKE) "-SC" src/Providers/sample/Load repository
272 @ $(MAKE) "-SC" test/wetest repository
273 @ $(MAKE) "-SC" src/Clients/benchmarkTest/Load repository
|
274 chuck 1.26 @ $(MAKE) "-SC" src/Pegasus/CQL/CQLCLI repository
|
275 chuck 1.27 @ $(MAKE) "-SC" src/Pegasus/Query/QueryExpression/tests repository
|
276 kumpf 1.28 @ $(MAKE) "-SC" src/Providers/TestProviders/Load repository
|
277 karl 1.44 ifeq ($(PEGASUS_ENABLE_CQL),true)
|
278 a.arora 1.30 @ $(MAKE) "-SC" src/Pegasus/ControlProviders/QueryCapabilitiesProvider/tests repository
|
279 kumpf 1.43 endif
|
280 marek 1.38 ifeq ($(PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER), true)
281 @ $(MAKE) "-SC" src/Pegasus/ProviderManager2/JMPI/org/pegasus/jmpi/tests repository
282 endif
|
283 w.otsuka 1.40 @ $(MAKE) --directory=$(PEGASUS_ROOT)/src/Clients/cimsub/tests/testscript \
284 -f Makefile repository
|
285 kumpf 1.17
|
286 kumpf 1.18 testrepositoryServer: FORCE
|
287 kumpf 1.25 @ $(MAKE) "-SC" src/Providers/sample/Load repositoryServer
288 @ $(MAKE) "-SC" test/wetest repositoryServer
289 @ $(MAKE) "-SC" src/Clients/benchmarkTest/Load repositoryServer
|
290 chuck 1.26 @ $(MAKE) "-SC" src/Pegasus/CQL/CQLCLI repositoryServer
|
291 chuck 1.27 @ $(MAKE) "-SC" src/Pegasus/Query/QueryExpression/tests repositoryServer
|
292 kumpf 1.28 @ $(MAKE) "-SC" src/Providers/TestProviders/Load repositoryServer
|
293 karl 1.44 ifeq ($(PEGASUS_ENABLE_CQL),true)
|
294 a.arora 1.30 @ $(MAKE) "-SC" src/Pegasus/ControlProviders/QueryCapabilitiesProvider/tests repositoryServer
|
295 kumpf 1.43 endif
|
296 marek 1.38 ifeq ($(PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER), true)
297 @ $(MAKE) "-SC" src/Pegasus/ProviderManager2/JMPI/org/pegasus/jmpi/tests repositoryServer
298 endif
|
299 w.otsuka 1.40 @ $(MAKE) --directory=$(PEGASUS_ROOT)/src/Clients/cimsub/tests/testscript \
300 -f Makefile repositoryServer
|
301 kumpf 1.16
|
302 konrad.r 1.24 config:
303 @ $(ROOT)/SetConfig_EnvVar
304
|
305 humberto 1.21 rootbundle:
306 $(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/cnv2rootbundle -f Makefile
|