Could you explain to me the use of macros defined by the "declaredMacro"
tag, e.g.
<declaredMacro name="TOXO_COMMENT_SCHEMA" usedBy="model"
includeProjects="ToxoDB"/>
<declaredMacro name="MERCATOR_OUTPUT_DIR" usedBy="perl"
includeProjects="CryptoDB,PlasmoDB,ToxoDB,TriTrypDB" />
(from the apiCommonModel.xml). How does this differ from macros defined
in a model.prop or webapp.prop files.
What's the envisioned use case for each -- i.e., in what situations
would we define a macro in the model.prop as opposed to in the
<>Model.xml file?
Thanks
Emily
Hi Emily,
Sorry for the late response. The declaredMacro is used to check if a required macro is defined in the model.prop file. If you have a <declaredMacro> in the model file, but the macro is not present in model.prop, WDK will throw out an exception on loading time.
Jerric
Wdk will validate both; the usedBy is just a indicator of where the macro will be used. If usedBY=”model”, wdk will substitute the macro in the model file with the value defined in model.prop. the userBy=”perl” is a specific property used by EuPathDB projects, and WDK just simply ignore it.