user_guide:extend:extensions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
user_guide:extend:extensions [2019/02/28 11:03] – [What is an extension] panizzutuser_guide:extend:extensions [2019/05/30 20:05] – [Configuring an extension] configure.pl resides in support folder now oroehrig
Line 34: Line 34:
 In the case your extension needs a third-party library to build the C++ clients, you should provide a pre-build configuration procedure performing some preparations and sanity checks like adding compiler and linker flags necessary to find this library, asserting that its version is not too old for you, etc. In the case your extension needs a third-party library to build the C++ clients, you should provide a pre-build configuration procedure performing some preparations and sanity checks like adding compiler and linker flags necessary to find this library, asserting that its version is not too old for you, etc.
  
-All this is done in a script ''configure.pl'' located in the top directory of your extension.  For this purpose, every extension gets at its birth a personal copy of a script template ''configure.pl.template'' You should edit it, filling the stubs of the functions with appropriate actions, introduce configuration options, if needed, and finally rename the script into ''configure.pl'' Then this script will be executed immediately during the [[#using_other_people_s_extensions|extension import]] as well as each time one runs the interactive command ''reconfigure_extension'' All clients in the extension are recompiled after each reconfiguration, at the latest at the beginning of the next polymake session.+All this is done in a script ''configure.pl'' located in the ''support'' directory of your extension.  For this purpose, every extension gets at its birth a personal copy of a script template ''configure.pl.template'' You should edit it, filling the stubs of the functions with appropriate actions, introduce configuration options, if needed, and finally rename the script into ''configure.pl'' Then this script will be executed immediately during the [[#using_other_people_s_extensions|extension import]] as well as each time one runs the interactive command ''reconfigure_extension'' All clients in the extension are recompiled after each reconfiguration, at the latest at the beginning of the next polymake session.
  
 The script template contains comments describing the purpose and signature of each mandatory function; you may also want to look for the examples into the configuration scripts of extensions bundled with polymake.  At your disposal are all utilities from the module ''perllib/Polymake/Configure.pm'' and all core configuration variables, both defined in the package ''Polymake::Configure'' The extension configuration script is interpreted in a separate package; please, don't change into other package within the script.  Also be aware that the extended perl syntax (like namespace mode) is not allowed for the configure script. The script template contains comments describing the purpose and signature of each mandatory function; you may also want to look for the examples into the configuration scripts of extensions bundled with polymake.  At your disposal are all utilities from the module ''perllib/Polymake/Configure.pm'' and all core configuration variables, both defined in the package ''Polymake::Configure'' The extension configuration script is interpreted in a separate package; please, don't change into other package within the script.  Also be aware that the extended perl syntax (like namespace mode) is not allowed for the configure script.
  • user_guide/extend/extensions.txt
  • Last modified: 2021/01/12 15:38
  • by 127.0.0.1