version 1.3, 2002/04/02 17:21:14
|
version 1.8, 2004/06/30 16:03:23
|
|
|
| |
ROOT = $(PEGASUS_ROOT) | ROOT = $(PEGASUS_ROOT) |
include $(ROOT)/mak/config.mak | include $(ROOT)/mak/config.mak |
|
include $(ROOT)/mak/configschema.mak |
# The following two variables determine which CIM Schema is compiled |
|
# from the CIMSchemas Directory. |
|
# To Change the CIM Schema used, change the following two environment |
|
# variables. |
|
|
|
SCHEMA_VER=25 |
|
SCHEMA_DIR=CIM$(SCHEMA_VER) |
|
|
|
#SCHEMA_VER=26 |
|
#SCHEMA_DIR=CIM26 |
|
| |
# Define Namespace in which the CIM Schemas are to be Loaded. | # Define Namespace in which the CIM Schemas are to be Loaded. |
# Note that by default, the CORE is also loaded into root. | # Note that by default, the CORE is also loaded into root. |
NAMESPACE=root/cimv2 | NAMESPACE=root/cimv2 |
| |
MOF_PATH = $(ROOT)/Schemas/$(SCHEMA_DIR) |
|
|
|
all: | all: |
| |
|
messages: |
|
|
# Delete and rebuild the repository using the MOF compiler. | # Delete and rebuild the repository using the MOF compiler. |
| |
repository: | repository: |
@ echo +++++ Removing existing repository named $(REPOSITORY_ROOT) | @ echo +++++ Removing existing repository named $(REPOSITORY_ROOT) |
@ $(RMREPOSITORY) $(REPOSITORY_ROOT) | @ $(RMREPOSITORY) $(REPOSITORY_ROOT) |
@ echo +++++ Populating CIM repository - this will take a while | @ echo +++++ Populating CIM repository - this will take a while |
@ echo +++++ Loading CIM_Core$(SCHEMA_VER).mof into root namespace... |
@ echo +++++ Loading CIM_Core$(CIM_SCHEMA_VER).mof into root namespace... |
@ cimmofl -I$(MOF_PATH) -nroot $(MOF_PATH)/CIM_Core$(SCHEMA_VER).mof |
@ $(CIMMOFCLI) -R$(REPOSITORY_DIR) -I$(CIM_SCHEMA_DIR) -nroot $(ALLOW_EXPERIMENTAL) $(CIM_SCHEMA_DIR)/CIM_Core$(CIM_SCHEMA_VER).mof |
@ echo +++++ Loading CIM_Schema$(SCHEMA_VER).mof into $(NAMESPACE) namespace... |
@ echo +++++ Loading CIM_Schema$(CIM_SCHEMA_VER).mof into $(NAMESPACE) namespace... |
@ cimmofl -I$(MOF_PATH) -n$(NAMESPACE) $(MOF_PATH)/CIM_Schema$(SCHEMA_VER).mof |
@ $(CIMMOFCLI) -R$(REPOSITORY_DIR) -I$(CIM_SCHEMA_DIR) -n$(NAMESPACE) $(ALLOW_EXPERIMENTAL) $(CIM_SCHEMA_DIR)/CIM_Schema$(CIM_SCHEMA_VER).mof |
|
|
|
install: |
|
$(MKDIRHIER) $(LOCAL_STATE_PREFIX) |
|
$(MAKE) REPOSITORY_DIR=$(LOCAL_STATE_PREFIX) repository |
| |
# The following is a hangover from previous testing and simply loads the | # The following is a hangover from previous testing and simply loads the |
# core into the namespace defined by NAMESPACE. It should probably be | # core into the namespace defined by NAMESPACE. It should probably be |
|
|
@ echo +++++ Populating CIM repository - this will take a minute | @ echo +++++ Populating CIM repository - this will take a minute |
$(RMREPOSITORY) $(REPOSITORY_ROOT) | $(RMREPOSITORY) $(REPOSITORY_ROOT) |
echo +++++ Loading CIM_Core.mof into root namespace... | echo +++++ Loading CIM_Core.mof into root namespace... |
cimmofl -I$(MOF_PATH) -n$(NAMESPACE) $(MOF_PATH)/CIM_Core$(SCHEMA_VER).mof |
$(CIMMOFCLI) -R$(REPOSITORY_DIR) -I$(CIM_SCHEMA_DIR) -n$(NAMESPACE) $(ALLOW_EXPERIMENTAL) $(CIM_SCHEMA_DIR)/CIM_Core$(CIM_SCHEMA_VER).mof |
| |
clean: | clean: |
@ echo +++++ Removing existing CIM Repository named $(REPOSITORY_ROOT) | @ echo +++++ Removing existing CIM Repository named $(REPOSITORY_ROOT) |
|
|
general: | general: |
| |
# used to generate xml output from the schema | # used to generate xml output from the schema |
|
|
xml: | xml: |
@ echo +++++ Loading CIM_Schema25.mof into root/cimv2 namespace... |
@ $(RMREPOSITORY) $(TMP_DIR)/repository |
@ cimmofl --xml -I$(MOF_PATH) -nroot/cimv2 $(MOF_PATH)/CIM_Schema$(SCHEMA_VER).mof >CIM_Schema$(SCHEMA_VER).XML |
@ echo +++++ Temporarily loading CIM_Core$(CIM_SCHEMA_VER) into xml/cimv2 namespace ... |
|
@ $(CIMMOFCLI) -R$(TMP_DIR) -I$(CIM_SCHEMA_DIR) -nxml/cimv2 $(CIM_SCHEMA_DIR)/CIM_Core$(CIM_SCHEMA_VER).mof |
|
@ echo +++++ Creating XML for CIM Schema$(CIM_SCHEMA_VER).mof in file $(TMP_DIR)/CIM_Schema$(CIM_SCHEMA_VER).xml |
|
@ $(CIMMOFCLI) -R$(TMP_DIR) --xml -I$(CIM_SCHEMA_DIR) -nxml/cimv2 $(CIM_SCHEMA_DIR)/CIM_Schema$(CIM_SCHEMA_VER).mof > $(TMP_DIR)/CIM_Schema$(CIM_SCHEMA_VER).xml |
|
@ $(RMREPOSITORY) $(TMP_DIR)/repository |