version 1.44, 2006/02/07 20:44:21
|
version 1.65, 2008/12/16 18:55:36
|
|
|
#//%2006//////////////////////////////////////////////////////////////////////// |
#//%LICENSE//////////////////////////////////////////////////////////////// |
#// | #// |
#// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
#// Licensed to The Open Group (TOG) under one or more contributor license |
#// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
#// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with |
#// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
#// this work for additional information regarding copyright ownership. |
#// IBM Corp.; EMC Corporation, The Open Group. |
#// Each contributor licenses this file to you under the OpenPegasus Open |
#// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
#// Source License; you may not use this file except in compliance with the |
#// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
#// License. |
#// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
#// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
#// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
#// EMC Corporation; Symantec Corporation; The Open Group. |
|
#// | #// |
#// Permission is hereby granted, free of charge, to any person obtaining a copy |
#// Permission is hereby granted, free of charge, to any person obtaining a |
#// of this software and associated documentation files (the "Software"), to |
#// copy of this software and associated documentation files (the "Software"), |
#// deal in the Software without restriction, including without limitation the |
#// to deal in the Software without restriction, including without limitation |
#// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
#// the rights to use, copy, modify, merge, publish, distribute, sublicense, |
#// sell copies of the Software, and to permit persons to whom the Software is |
#// and/or sell copies of the Software, and to permit persons to whom the |
#// furnished to do so, subject to the following conditions: |
#// Software is furnished to do so, subject to the following conditions: |
#// | #// |
#// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN |
#// The above copyright notice and this permission notice shall be included |
#// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED |
#// in all copies or substantial portions of the Software. |
#// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT |
|
#// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
|
#// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
#// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
|
#// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
|
#// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
#// | #// |
#//============================================================================== |
#// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
|
#// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
#// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
#// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
|
#// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
|
#// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
|
#// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
#// |
|
#////////////////////////////////////////////////////////////////////////// |
# commands.mak is a helper Makefile that is intended to be | # commands.mak is a helper Makefile that is intended to be |
# included in an upper level Makefile. | # included in an upper level Makefile. |
| |
|
|
include $(ROOT)/mak/config.mak | include $(ROOT)/mak/config.mak |
endif | endif |
| |
ifeq ($(OS),win32) |
ifeq ($(OS_TYPE),windows) |
STRIPCRS = stripcrs $(RESULTFILE) $(MASTERRESULTFILE) | STRIPCRS = stripcrs $(RESULTFILE) $(MASTERRESULTFILE) |
DIFF = mu compare | DIFF = mu compare |
SORT = mu sort | SORT = mu sort |
|
|
TOUCH = touch | TOUCH = touch |
CAT = cat | CAT = cat |
DOCXX = doc++ | DOCXX = doc++ |
|
DOXYGEN = doxygen |
| |
GENERATE_RANDSEED = randseed | GENERATE_RANDSEED = randseed |
GET_HOSTNAME = `nslookup \`hostname\` | grep "Name:" | sed 's/Name:[ ]*//'` | GET_HOSTNAME = `nslookup \`hostname\` | grep "Name:" | sed 's/Name:[ ]*//'` |
|
|
Prwx______ = 700 | Prwx______ = 700 |
Prwxrwxrwx = 777 | Prwxrwxrwx = 777 |
Prwxrwxrwt = 1777 | Prwxrwxrwt = 1777 |
Pr_xr__r__ = 744 |
Prwxr__r__ = 744 |
Pr__r__r__ = 444 | Pr__r__r__ = 444 |
Pr________ = 400 | Pr________ = 400 |
Pr_xr_xr_x = 555 | Pr_xr_xr_x = 555 |
|
|
ECHO = echo | ECHO = echo |
ECHO-E = mu echo-e | ECHO-E = mu echo-e |
COPY = cp | COPY = cp |
CHMOD = |
CHMOD = chmod |
CHOWN = |
CHOWN = chown |
CHGRP = |
CHGRP = chgrp |
CURRENT_USER=`whoami` | CURRENT_USER=`whoami` |
endif | endif |
| |
|
|
TOUCH = touch | TOUCH = touch |
CAT = cat | CAT = cat |
DOCXX = doc++ | DOCXX = doc++ |
|
DOXYGEN = doxygen |
| |
GET_HOSTNAME = `host \`hostname\`|cut -d" " -f1` | GET_HOSTNAME = `host \`hostname\`|cut -d" " -f1` |
| |
|
|
Prwxrwxrwt = 1777 | Prwxrwxrwt = 1777 |
Prwxr_xr_x = 755 | Prwxr_xr_x = 755 |
Prwxr_x___ = 750 | Prwxr_x___ = 750 |
Pr_xr__r__ = 744 |
Prwxr__r__ = 744 |
Prwx______ = 700 | Prwx______ = 700 |
Pr__r__r__ = 444 | Pr__r__r__ = 444 |
Pr________ = 400 | Pr________ = 400 |
|
|
INSTALL_USR = root | INSTALL_USR = root |
INSTALL_GRP = pegasus | INSTALL_GRP = pegasus |
CIMSERVER_USR = root | CIMSERVER_USR = root |
CIMSERVER_GRP = pegasus |
CIMSERVER_GRP = root |
CHMOD = chmod | CHMOD = chmod |
CHOWN = chown | CHOWN = chown |
CHGRP = chgrp | CHGRP = chgrp |
|
|
SYMBOLIC_LINK_CMD = ln -f -s | SYMBOLIC_LINK_CMD = ln -f -s |
| |
CURRENT_USER=`whoami` | CURRENT_USER=`whoami` |
|
|
|
# |
|
# Since the Privilege Separation splits the cimserver process into two |
|
# processes (cimservermain process - a non privileged process; cimserver |
|
# process - a privileged process), the pegasus files need to be split into |
|
# two sets. The files which can be updated by cimservermain process are owned |
|
# by user "CIMSERVERMAIN_USR" and group "CIMSERVERMAIN_GRP". Other files |
|
# owned by user "CIMSERVER_USR" and group "CIMSERVER_GRP" can be updated |
|
# by cimserver process. |
|
# If the Privilege Separation is not enabled, a single privileged process |
|
# (cimserver process) is created. All the pegasus files can be updated by |
|
# the cimserver process. The CIMSERVERMAIN_USR variable will be set |
|
# equal to CIMSERVER_USR, and the CIMSERVERMAIN_GRP variable will be set |
|
# equal to CIMSERVER_GRP. |
|
# |
|
# To further restrict the privileges assigned to the cimservermain |
|
# process, we recommend creating a new group for the cimservermain |
|
# process. By default, the name of this group will be the same as |
|
# the cimservermain user. Note: the CIMSERVERMAIN_GRP should be |
|
# the primary group for the CIMSERVERMAIN_USER. |
|
|
|
ifdef PEGASUS_ENABLE_PRIVILEGE_SEPARATION |
|
CIMSERVERMAIN_USR = $(PEGASUS_CIMSERVERMAIN_USER) |
|
CIMSERVERMAIN_GRP = $(PEGASUS_CIMSERVERMAIN_USER) |
|
else |
|
CIMSERVERMAIN_USR = $(CIMSERVER_USR) |
|
CIMSERVERMAIN_GRP = $(CIMSERVER_GRP) |
|
endif |
|
|
endif | endif |
| |
ifeq ($(OS),zos) | ifeq ($(OS),zos) |
|
|
Prwxrwxrwx = 777 | Prwxrwxrwx = 777 |
Prwxrwxrwt = 1777 | Prwxrwxrwt = 1777 |
Prwxr_xr_x = 755 | Prwxr_xr_x = 755 |
Pr_xr__r__ = 744 |
Prwxr__r__ = 744 |
Pr__r__r__ = 444 | Pr__r__r__ = 444 |
Pr________ = 400 | Pr________ = 400 |
Pr_xr_xr_x = 555 | Pr_xr_xr_x = 555 |
|
|
endif | endif |
| |
ifeq ($(OS),VMS) | ifeq ($(OS),VMS) |
STRIPCRS =$(MUEXE) echo "STRIPCRS not defined in commands.mak" |
STRIPCRS = |
DIFF = mu compare | DIFF = mu compare |
SORT = mu sort | SORT = mu sort |
REDIRECTERROR = $(MUEXE) echo "REDIRECTERROR not defined in commands.mak" | REDIRECTERROR = $(MUEXE) echo "REDIRECTERROR not defined in commands.mak" |
CIMSERVER_START_SERVICE = $(CIMSERVER_PATH)cimserver $(CIMSERVER_CONFIG_OPTIONS) |
CIMSERVER_START_SERVICE_DELAY = 20 |
|
CIMSERVER_START_SERVICE = pipe ($(CIMSERVER_PATH)cimserver $(CIMSERVER_CONFIG_OPTIONS) &) && mu sleep $(CIMSERVER_START_SERVICE_DELAY) |
CIMSERVER_STOP_SERVICE = $(CIMSERVER_PATH)cimserver -s | CIMSERVER_STOP_SERVICE = $(CIMSERVER_PATH)cimserver -s |
SLEEP = wait |
SLEEP = $(MUEXE) sleep |
TIME_CMD = | TIME_CMD = |
REMOVE_PEGASUS_DIRECTORY = mu rmdirhier pegasus | REMOVE_PEGASUS_DIRECTORY = mu rmdirhier pegasus |
MUEXE = mu | MUEXE = mu |
|
|
STRIPCRS = | STRIPCRS = |
DIFF = diff | DIFF = diff |
SORT = sort | SORT = sort |
REDIRECTERROR = |
REDIRECTERROR = 2>&1 |
CIMSERVER_START_SERVICE = $(CIMSERVER_PATH)cimserver $(CIMSERVER_CONFIG_OPTIONS) | CIMSERVER_START_SERVICE = $(CIMSERVER_PATH)cimserver $(CIMSERVER_CONFIG_OPTIONS) |
CIMSERVER_STOP_SERVICE = $(CIMSERVER_PATH)cimserver -s | CIMSERVER_STOP_SERVICE = $(CIMSERVER_PATH)cimserver -s |
SLEEP = sleep | SLEEP = sleep |
|
|
ECHO = echo | ECHO = echo |
ECHO-E = | ECHO-E = |
COPY = cp | COPY = cp |
CHMOD = |
CHMOD = chmod |
CHOWN = |
CHOWN = chown |
CHGRP = |
CHGRP = chgrp |
|
CAT = cat |
|
endif |
|
|
|
ifeq ($(OS),PASE) |
|
STRIPCRS = |
|
DIFF = diff |
|
SORT = sort |
|
REDIRECTERROR = 2>&1 |
|
CIMSERVER_START_SERVICE = system STRTCPSVR *CIMOM |
|
CIMSERVER_STOP_SERVICE = system ENDTCPSVR *CIMOM |
|
SLEEP = sleep |
|
TIME_CMD = time |
|
MUEXE = mu |
|
RM = rm -f |
|
MKDIRHIER = mkdir -p |
|
RMDIRHIER = rm -rf |
|
ECHO = echo |
|
ECHO-E = |
|
COPY = cp |
|
CHMOD = chmod |
|
CHOWN = chown |
|
CHGRP = chgrp |
|
CAT = cat |
endif | endif |
| |
ifeq ($(OS),darwin) | ifeq ($(OS),darwin) |
|
|
CURRENT_USER=`whoami` | CURRENT_USER=`whoami` |
endif | endif |
| |
|
ifdef PEGASUS_ENABLE_REMOTE_CMPI |
|
ifeq ($(OS_TYPE),windows) |
|
CMPIR_START_DAEMON = start "/K $(CIMSERVER_PATH)" CMPIRDaemon |
|
CMPIR_STOP_DAEMON = $(CIMSERVER_PATH)CMPIRDaemon --stop |
|
else |
|
CMPIR_START_DAEMON = $(CIMSERVER_PATH)CMPIRDaemon |
|
CMPIR_STOP_DAEMON = $(CIMSERVER_PATH)CMPIRDaemon --stop |
|
endif |
|
else |
|
CMPIR_START_DAEMON = $(ECHO) "(CMPIR_START_DAEMON command ignored)" |
|
CMPIR_STOP_DAEMON = $(ECHO) "(CMPIR_STOP_DAEMON command ignored)" |
|
|
|
endif |
|
|
ifndef TMP_DIR | ifndef TMP_DIR |
ifdef PEGASUS_TMP | ifdef PEGASUS_TMP |
TMP_DIR = $(subst \,/,$(PEGASUS_TMP)) | TMP_DIR = $(subst \,/,$(PEGASUS_TMP)) |
|
|
## | ## |
| |
cimstop: CMDSFORCE | cimstop: CMDSFORCE |
|
-$(CMPIR_STOP_DAEMON) |
$(CIMSERVER_STOP_SERVICE) | $(CIMSERVER_STOP_SERVICE) |
| |
cimstart: CMDSFORCE | cimstart: CMDSFORCE |
$(CIMSERVER_START_SERVICE) | $(CIMSERVER_START_SERVICE) |
|
$(CMPIR_START_DAEMON) |
| |
sleep: CMDSFORCE | sleep: CMDSFORCE |
$(SLEEP) $(TIME) | $(SLEEP) $(TIME) |
|
|
## cimstart command. | ## cimstart command. |
## | ## |
runTestSuite: CMDSFORCE | runTestSuite: CMDSFORCE |
|
-$(CIMSERVER_STOP_SERVICE) |
|
-$(CMPIR_STOP_DAEMON) |
$(CIMSERVER_START_SERVICE) | $(CIMSERVER_START_SERVICE) |
|
$(CMPIR_START_DAEMON) |
$(WINDOWS_ONLY_SLEEP) | $(WINDOWS_ONLY_SLEEP) |
$(foreach i, $(TESTSUITE_CMDS), $(subst @@, ,$(i))) | $(foreach i, $(TESTSUITE_CMDS), $(subst @@, ,$(i))) |
$(CIMSERVER_STOP_SERVICE) | $(CIMSERVER_STOP_SERVICE) |
|
$(CMPIR_STOP_DAEMON) |
| |
ifndef PEGASUS_SSLCNF_FULLY_QUALIFIED_DSN | ifndef PEGASUS_SSLCNF_FULLY_QUALIFIED_DSN |
PEGASUS_SSLCNF_FULLY_QUALIFIED_DSN=$(GET_HOSTNAME) | PEGASUS_SSLCNF_FULLY_QUALIFIED_DSN=$(GET_HOSTNAME) |