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: (checkpoint save))
Line 94: Line 94:
  
 
For the libraries to be linked while build a library, you can refer Step 4 in [[Build_Environment_Effort/Module_Migration|Module Migration]].
 
For the libraries to be linked while build a library, you can refer Step 4 in [[Build_Environment_Effort/Module_Migration|Module Migration]].
 +
When you add the linked library,
 +
 +
 
TO-DO...
 
TO-DO...
  
 
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.
 
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!
 
Let's hack with the new build system!

Revision as of 06:42, 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

When you writing the makefile, you may need some pre-defined vars for your function. Here is some useful vars.

Vars\OS Windows Linux MacOSX
GUI WNT UNX UNX
GUIBASE WIN unx aqua
OS WNT LINUX MACOSX
COM MSC GCC GCC
COM MSC GCC GCC
INPATH wntmsci12.pro unxlngi6.pro unxmacxi.pro
OUTDIR "$SOLARVER/$INPATH" "$SOLARVER/$INPATH" "$SOLARVER/$INPATH"
WORKDIR "$SOLARVER/$INPATH/workdir" "$SOLARVER/$INPATH/workdir" "$SOLARVER/$INPATH/workdir"
gb_Library_OOOEXT .dll .so .dylib

Template:Documentation/Note

Tips 3: Library need be linked

For the libraries to be linked while build a library, you can refer Step 4 in Module Migration. When you add the linked library,


TO-DO...

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