Configuration of BES Modules: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
mNo edit summary
Line 8: Line 8:


== Changes to the module's ''Makefile.am'' ==
== Changes to the module's ''Makefile.am'' ==
* Hack the module's Makefile.am so that CPPFLAGS and LIBADD reference the correct places given that the code will build w/o bes first being installed
Hack the module's Makefile.am so that CPPFLAGS and LIBADD reference the correct places given that the code will build w/o bes first being installed
<source lang="bash">
<source lang="bash">
if DAP_MODULES
if DAP_MODULES
Line 23: Line 23:
libcsv_module_la_LIBADD = $(LIBADD)
libcsv_module_la_LIBADD = $(LIBADD)
</source>
</source>
* For unit-test code you may need to add some of the bes code to the link line. To do that, use the shell variables:
 
** BES_DISPATCH_LIB
For unit-test code you may need to add some of the bes code to the link line. To do that, use the makefile variables:
** BES_XML_CMD_LIB
* BES_DISPATCH_LIB
** BES_PPT_LIB
* BES_XML_CMD_LIB
** BES_EXTRA_LIBS
* BES_PPT_LIB
* BES_EXTRA_LIBS
where you almost certainly want to use $BES_DISPATCH_LIB $BES_EXTRA_LIBS
where you almost certainly want to use $BES_DISPATCH_LIB $BES_EXTRA_LIBS
* Look for a line like  
 
Look for a line like  
<source lang="bash">
<source lang="bash">
xml_data_handler.conf: xml_data_handler.conf.in config.status
xml_data_handler.conf: xml_data_handler.conf.in config.status
Line 35: Line 37:
and add ''$(top_srcdir)/'' in front of ''config.status''
and add ''$(top_srcdir)/'' in front of ''config.status''


bes.conf.modules.in should be added to EXTRA_DIST
If the module uses ''besstandalone,'' add ''bes.conf.modules.in'' to the EXTRA_DIST variable in the ''Makefile.am.''


== Changes to the module's ''configure.ac'' ==
== Changes to the module's ''configure.ac'' ==

Revision as of 19:04, 25 November 2014

Under construction 11/20/14

Use the 'modules' branch of 'bes'

For each module to be added:

  • check it out in the bes/modules dir using "submodule add <github repo>"
  • Add it to modules/Makefile.am

Changes to the module's Makefile.am

Hack the module's Makefile.am so that CPPFLAGS and LIBADD reference the correct places given that the code will build w/o bes first being installed

if DAP_MODULES
AM_CPPFLAGS = -I$(top_srcdir)/dispatch -I$(top_srcdir)/dap $(DAP_CFLAGS)
LIBADD = $(DAP_SERVER_LIBS) $(DAP_CLIENT_LIBS)
else
AM_CPPFLAGS = $(BES_CPPFLAGS) # or wahtever was set here or in ..._CPPFLAGS
LIBADD = $(BES_DAP_LIBS)      # and ..._LIBADD
endif

then

# comment this out to force use of AM_CPPFLAGS libcsv_module_la_CPPFLAGS = ...
libcsv_module_la_LIBADD = $(LIBADD)

For unit-test code you may need to add some of the bes code to the link line. To do that, use the makefile variables:

  • BES_DISPATCH_LIB
  • BES_XML_CMD_LIB
  • BES_PPT_LIB
  • BES_EXTRA_LIBS

where you almost certainly want to use $BES_DISPATCH_LIB $BES_EXTRA_LIBS

Look for a line like

xml_data_handler.conf: xml_data_handler.conf.in config.status

and add $(top_srcdir)/ in front of config.status

If the module uses besstandalone, add bes.conf.modules.in to the EXTRA_DIST variable in the Makefile.am.

Changes to the module's configure.ac

Add "AM_CONDITIONAL([DAP_MODULES], [false])" to the modules configure.ac

If the module uses autotest to run a set of regression tests using besstandalone, add generation of bes.conf from bes.conf.in. You'll also need to make corresponding changes in other places, documented on this page.

more change

  • Add files to be build by configure:
    modules/dap-server/Makefile
    modules/dap-server/asciival/Makefile
    modules/dap-server/asciival/unit-tests/Makefile
    modules/dap-server/asciival/unit-tests/test_config.h
    modules/dap-server/www-interface/Makefile])
    AC_CONFIG_FILES([modules/dap-server/www-interface/js2h.pl], [chmod +x modules/dap-server/www-interface/js2h.pl])

using the trusty cut and paste and prefixing them all with 'modules/'

  • autotest tests are special...
    • Make a bes.conf.modules.in from bes.conf.in
    • Hack it so that it uses lines like the following:
BES.modules=dap,cmd,csv
BES.module.dap=@abs_top_builddir@/dap/.libs/libdap_module.so
BES.module.cmd=@abs_top_builddir@/xmlcommand/.libs/libdap_xml_module.so
BES.module.csv=@abs_top_builddir@/modules/csv_handler/.libs/libcsv_module.so

BES.Catalog.catalog.RootDirectory=@abs_top_srcdir@/modules/csv_handler
    • Modify the bes configure so that it builds bes.conf using the bes.conf.moduels.in if DAP_MODULES is true
    • modify the Makefile.am so it does not write the bes.conf
    • modify the handler's configure.ac so that it makes the bes.conf from the bes.conf.in (preserves the local build)
  • Scan the module's configure.ac and transfer any tests the Makefile.am will need to the bes' configure.ac

Git Hacks

To manage an empty dir in git, put a .gitignore file in it. See fileout_json/unit-tests/tmp