Difference between revisions of "Build Environment Effort/Module Migration Tips"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Here are some useful tips for converting an OOo module to the new Build Environment)
(Tips 2: Useful Vars)
Line 33: Line 33:
 
  ...
 
  ...
  
=== Tips 2: Useful Vars===
+
=== Tips 2: Useful Variations===
  
 
=== Step 3: Components ===
 
=== Step 3: Components ===

Revision as of 01:08, 7 March 2012

Edit.png

Build Environment Effort

Quick Navigation

About this template


The overview steps for migrating a module are tracked here

Here are some useful tips for converting an OOo module to the new Build Environment

Tips 1: Deliver to the solver

Usually there are some header files to be delivered to the solver and the header files, which located at $(SRCDIR)/module/inc. So you can use the Step 3 in Module Migration.

When you need to deliver some headers in source, you can create a file in the module root called Package_source.mk

$(eval $(call gb_Package_Package,toolkit_source,$(SRCDIR)/toolkit/source))
#deliver $(SRCDIR)/toolkit/source/ layout/core/bin.hxx to $SOLARVER/$INPATH/inc/layout/core/bin.hxx
$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/bin.hxx,layout/core/bin.hxx))
...

When you need to deliver some utility files, such as *.xml, *cfg ..., you can create a file in the module root called Package_util.mk

$(eval $(call gb_Package_Package,toolkit_util,$(SRCDIR)/toolkit/util))
#deliver $(SRCDIR)/toolkit/util/tookit.xml to $SOLARVER/$INPATH/xml/toolkit.xml
$(eval $(call gb_Package_add_file,toolkit_util,xml/toolkit.xml,toolkit.xml))

Then don't forget to add this files in Module_toolkit.mk (in our case, for other modules, use the name of that module)

...
$(eval $(call gb_Module_add_targets,tools,\
    ...
    Package_source \
    Package_util \
    ...      
 ))
...

Tips 2: Useful Variations

Step 3: Components

I hope this tutorial gives you some useful tips with the new build system. If you find some other good tips, please to contribute here. Let's hack with the new build system!

Personal tools