67d2af6fac
The following builds for me: basebmp, basegfx, comphelper, dtrans, i18npool, i18nutil, l10ntools, o3tl, psprint_config, regexp, rsc, sax, sot, tools, ucbhelper, unotools, vcl The rest still needs fixing ;-) Conflicts: canvas/prj/build.lst canvas/source/cairo/cairo_textlayout.cxx canvas/source/directx/dx_winstuff.hxx canvas/source/tools/image.cxx canvas/source/vcl/canvashelper.cxx comphelper/inc/comphelper/documentconstants.hxx comphelper/inc/comphelper/optionalvalue.hxx comphelper/inc/comphelper/querydeep.hxx comphelper/prj/build.lst comphelper/qa/complex/makefile.mk comphelper/qa/string/test_string_noadditional.cxx comphelper/source/misc/componentmodule.cxx comphelper/source/misc/mimeconfighelper.cxx comphelper/source/misc/querydeep.cxx comphelper/source/misc/uieventslogger.cxx comphelper/source/property/TypeGeneration.cxx comphelper/test/uno_iterators/uno_iterators.cxx comphelper/util/makefile.mk cppcanvas/source/mtfrenderer/implrenderer.cxx dtrans/prj/build.lst dtrans/source/generic/dtrans.cxx dtrans/source/win32/dtobj/FmtFilter.cxx i18npool/prj/build.lst i18npool/source/localedata/data/localedata_others.map i18npool/source/localedata/data/makefile.mk i18npool/source/localedata/localedata.cxx i18npool/source/localedata/saxparser.cxx i18npool/source/registerservices/registerservices.cxx i18npool/source/search/textsearch.cxx l10ntools/inc/cfgmerge.hxx l10ntools/inc/export.hxx l10ntools/inc/gsicheck.hxx l10ntools/inc/l10ntools/vosapp.hxx l10ntools/inc/tagtest.hxx l10ntools/inc/xmlparse.hxx l10ntools/layout/layoutparse.cxx l10ntools/layout/tralay.cxx l10ntools/source/cfgmerge.cxx l10ntools/source/export.cxx l10ntools/source/export2.cxx l10ntools/source/gsicheck.cxx l10ntools/source/help/HelpLinker.cxx l10ntools/source/lngex.cxx l10ntools/source/lngmerge.cxx l10ntools/source/merge.cxx l10ntools/source/tagtest.cxx l10ntools/source/xmlparse.cxx padmin/source/fontentry.cxx padmin/source/padialog.cxx padmin/source/padialog.src padmin/source/pamain.cxx rsc/inc/rscarray.hxx rsc/inc/rscclass.hxx rsc/inc/rscclobj.hxx rsc/inc/rsccont.hxx rsc/inc/rscdb.hxx rsc/inc/rscdef.hxx rsc/inc/rscmgr.hxx rsc/inc/rscrange.hxx rsc/inc/rsctop.hxx rsc/inc/vclrsc.hxx rsc/source/parser/rscdb.cxx rsc/source/parser/rscicpx.cxx rsc/source/parser/rscinit.cxx rsc/source/prj/start.cxx rsc/source/res/rscarray.cxx rsc/source/res/rscclass.cxx rsc/source/res/rscclobj.cxx rsc/source/res/rsccont.cxx rsc/source/res/rscmgr.cxx rsc/source/res/rscrange.cxx rsc/source/res/rsctop.cxx rsc/source/rsc/rsc.cxx rsc/source/tools/rscdef.cxx rsc/source/tools/rsctools.cxx sax/source/expatwrap/sax_expat.cxx sax/source/fastparser/facreg.cxx sax/source/tools/fastserializer.cxx sot/inc/sot/filelist.hxx sot/inc/sot/object.hxx sot/source/base/factory.cxx sot/source/base/filelist.cxx sot/source/sdstor/stg.cxx sot/source/sdstor/stgcache.cxx sot/source/sdstor/stgole.cxx sot/source/sdstor/stgstrms.cxx sot/source/sdstor/storage.cxx sot/source/sdstor/ucbstorage.cxx svl/inc/svl/cenumitm.hxx svl/inc/svl/cintitem.hxx svl/inc/svl/cntwall.hxx svl/inc/svl/ctypeitm.hxx svl/inc/svl/custritm.hxx svl/inc/svl/dateitem.hxx svl/inc/svl/filerec.hxx svl/inc/svl/globalnameitem.hxx svl/inc/svl/ilstitem.hxx svl/inc/svl/imageitm.hxx svl/inc/svl/intitem.hxx svl/inc/svl/itempool.hxx svl/inc/svl/itemset.hxx svl/inc/svl/lckbitem.hxx svl/inc/svl/poolitem.hxx svl/inc/svl/ptitem.hxx svl/inc/svl/rectitem.hxx svl/inc/svl/sfontitm.hxx svl/inc/svl/slstitm.hxx svl/inc/svl/srchitem.hxx svl/inc/svl/svarray.hxx svl/inc/svl/svdde.hxx svl/inc/svl/svstdarr.hxx svl/inc/svl/szitem.hxx svl/inc/svl/visitem.hxx svl/inc/svl/zforlist.hxx svl/inc/svl/zformat.hxx svl/prj/build.lst svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx svl/qa/complex/ConfigItems/helper/makefile.mk svl/qa/makefile.mk svl/source/filepicker/pickerhelper.cxx svl/source/filerec/filerec.cxx svl/source/items/cenumitm.cxx svl/source/items/cintitem.cxx svl/source/items/cntwall.cxx svl/source/items/ctypeitm.cxx svl/source/items/custritm.cxx svl/source/items/dateitem.cxx svl/source/items/globalnameitem.cxx svl/source/items/ilstitem.cxx svl/source/items/imageitm.cxx svl/source/items/intitem.cxx svl/source/items/itempool.cxx svl/source/items/itemprop.cxx svl/source/items/itemset.cxx svl/source/items/lckbitem.cxx svl/source/items/poolio.cxx svl/source/items/poolitem.cxx svl/source/items/ptitem.cxx svl/source/items/rectitem.cxx svl/source/items/slstitm.cxx svl/source/items/srchitem.cxx svl/source/items/style.cxx svl/source/items/szitem.cxx svl/source/items/visitem.cxx svl/source/items/whiter.cxx svl/source/memtools/svarray.cxx svl/source/misc/PasswordHelper.cxx svl/source/misc/adrparse.cxx svl/source/misc/lngmisc.cxx svl/source/notify/brdcst.cxx svl/source/notify/listener.cxx svl/source/notify/listenerbase.cxx svl/source/numbers/makefile.mk svl/source/numbers/nbdll.cxx svl/source/numbers/zforfind.cxx svl/source/numbers/zforlist.cxx svl/source/numbers/zformat.cxx svl/source/numbers/zforscan.cxx svl/source/passwordcontainer/passwordcontainer.cxx svl/source/svdde/ddecli.cxx svl/source/svdde/ddeimp.hxx svl/source/svdde/ddemlos2.h svl/source/svdde/ddesvr.cxx svl/source/undo/undo.cxx svl/source/uno/registerservices.cxx svl/util/makefile.mk svtools/bmpmaker/bmpsum.cxx svtools/bmpmaker/g2g.cxx svtools/bmpmaker/makefile.mk svtools/inc/borderhelper.hxx svtools/inc/svtools/accessiblefactory.hxx svtools/inc/svtools/apearcfg.hxx svtools/inc/svtools/brwbox.hxx svtools/inc/svtools/ctrlbox.hxx svtools/inc/svtools/ctrltool.hxx svtools/inc/svtools/editbrowsebox.hxx svtools/inc/svtools/ehdl.hxx svtools/inc/svtools/embedhlp.hxx svtools/inc/svtools/filter.hxx svtools/inc/svtools/ivctrl.hxx svtools/inc/svtools/parhtml.hxx svtools/inc/svtools/printdlg.hxx svtools/inc/svtools/rtftoken.h svtools/inc/svtools/ruler.hxx svtools/inc/svtools/svicnvw.hxx svtools/inc/svtools/svlbitm.hxx svtools/inc/svtools/svlbox.hxx svtools/inc/svtools/svtreebx.hxx svtools/inc/svtools/tabbar.hxx svtools/inc/svtools/table/abstracttablecontrol.hxx svtools/inc/svtools/taskbar.hxx svtools/inc/svtools/textview.hxx svtools/inc/svtools/valueset.hxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/brwbox2.cxx svtools/source/brwbox/datwin.cxx svtools/source/brwbox/datwin.hxx svtools/source/brwbox/makefile.mk svtools/source/config/apearcfg.cxx svtools/source/config/htmlcfg.cxx svtools/source/config/menuoptions.cxx svtools/source/config/miscopt.cxx svtools/source/contnr/cont_pch.cxx svtools/source/contnr/ctrdll.cxx svtools/source/contnr/fileview.cxx svtools/source/contnr/imivctl1.cxx svtools/source/contnr/ivctrl.cxx svtools/source/contnr/makefile.mk svtools/source/contnr/svcontnr.src svtools/source/contnr/svicnvw.cxx svtools/source/contnr/svimpbox.cxx svtools/source/contnr/svimpicn.cxx svtools/source/contnr/svlbitm.cxx svtools/source/contnr/svtreebx.cxx svtools/source/contnr/templwin.cxx svtools/source/contnr/templwin.hxx svtools/source/control/asynclink.cxx svtools/source/control/ctrlbox.cxx svtools/source/control/ctrldll.cxx svtools/source/control/ctrltool.cxx svtools/source/control/filectrl.cxx svtools/source/control/filectrl.src svtools/source/control/headbar.cxx svtools/source/control/inettbc.cxx svtools/source/control/makefile.mk svtools/source/control/prgsbar.cxx svtools/source/control/roadmap.cxx svtools/source/control/ruler.cxx svtools/source/control/scriptedtext.cxx svtools/source/control/stdmenu.cxx svtools/source/control/tabbar.cxx svtools/source/control/taskbar.cxx svtools/source/control/taskbox.cxx svtools/source/control/taskmisc.cxx svtools/source/control/taskstat.cxx svtools/source/control/valueacc.cxx svtools/source/control/valueset.cxx svtools/source/dialogs/addresstemplate.cxx svtools/source/dialogs/addresstemplate.src svtools/source/dialogs/colrdlg.src svtools/source/dialogs/filedlg2.cxx svtools/source/dialogs/filedlg2.hxx svtools/source/dialogs/makefile.mk svtools/source/dialogs/printdlg.cxx svtools/source/dialogs/printdlg.src svtools/source/dialogs/propctrl.cxx svtools/source/dialogs/propctrl.hxx svtools/source/dialogs/property.cxx svtools/source/edit/makefile.mk svtools/source/edit/sychconv.cxx svtools/source/edit/syntaxhighlight.cxx svtools/source/edit/textdoc.cxx svtools/source/edit/texteng.cxx svtools/source/edit/textundo.cxx svtools/source/edit/textview.cxx svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx svtools/source/filter.vcl/filter/dlgejpg.cxx svtools/source/filter.vcl/filter/dlgejpg.hxx svtools/source/filter.vcl/filter/dlgejpg.src svtools/source/filter.vcl/filter/dlgepng.cxx svtools/source/filter.vcl/filter/dlgepng.hxx svtools/source/filter.vcl/filter/dlgepng.src svtools/source/filter.vcl/filter/dlgexpor.cxx svtools/source/filter.vcl/filter/dlgexpor.hxx svtools/source/filter.vcl/filter/dlgexpor.src svtools/source/filter.vcl/filter/filter2.cxx svtools/source/filter.vcl/filter/makefile.mk svtools/source/filter.vcl/filter/sgfbram.cxx svtools/source/filter.vcl/filter/sgvmain.cxx svtools/source/filter.vcl/filter/sgvspln.cxx svtools/source/filter.vcl/filter/strings.src svtools/source/filter.vcl/jpeg/makefile.mk svtools/source/filter.vcl/wmf/emfwr.cxx svtools/source/filter.vcl/wmf/emfwr.hxx svtools/source/filter.vcl/wmf/enhwmf.cxx svtools/source/filter.vcl/wmf/winmtf.hxx svtools/source/filter.vcl/wmf/wmfwr.cxx svtools/source/filter.vcl/wmf/wmfwr.hxx svtools/source/graphic/grfcache.cxx svtools/source/graphic/grfcache.hxx svtools/source/graphic/grfmgr.cxx svtools/source/graphic/makefile.mk svtools/source/inc/accessibletableimp.hxx svtools/source/inc/svimpbox.hxx svtools/source/java/patchjavaerror.src svtools/source/misc/ehdl.cxx svtools/source/misc/errtxt.src svtools/source/misc/helpagentwindow.cxx svtools/source/misc/imagemgr.cxx svtools/source/misc/imagemgr.src svtools/source/misc/imageresourceaccess.cxx svtools/source/misc/imap.cxx svtools/source/misc/langtab.src svtools/source/misc/makefile.mk svtools/source/misc/svtdata.cxx svtools/source/misc/templatefoldercache.cxx svtools/source/misc/transfer2.cxx svtools/source/misc/undo.src svtools/source/plugapp/commtest.cxx svtools/source/plugapp/commtest.src svtools/source/plugapp/makefile.mk svtools/source/plugapp/testtool.src svtools/source/productregistration/productregistration.cxx svtools/source/svhtml/htmlkywd.cxx svtools/source/svhtml/parhtml.cxx svtools/source/svrtf/rtfkey2.cxx svtools/source/svrtf/rtfkeywd.cxx svtools/source/table/defaultinputhandler.cxx svtools/source/table/makefile.mk svtools/source/table/tablecontrol.cxx svtools/source/table/tablecontrol_impl.cxx svtools/source/table/tablecontrol_impl.hxx svtools/source/table/tabledatawindow.cxx svtools/source/table/tablegeometry.cxx svtools/source/table/tablegeometry.hxx svtools/source/toolpanel/makefile.mk svtools/source/toolpanel/toolpaneldrawer.cxx svtools/source/uno/addrtempuno.cxx svtools/source/uno/miscservices.cxx svtools/source/uno/svtxgridcontrol.cxx svtools/source/uno/svtxgridcontrol.hxx svtools/source/uno/toolboxcontroller.cxx svtools/source/uno/treecontrolpeer.cxx svtools/source/uno/unocontroltablemodel.cxx svtools/source/uno/unocontroltablemodel.hxx svtools/source/uno/unoimap.cxx svtools/source/urlobj/inetimg.cxx svtools/util/makefile.mk svtools/workben/browser.cxx svtools/workben/cui/makefile.mk svtools/workben/makefile.mk svtools/workben/stest.cxx svtools/workben/toolpanel/makefile.mk svtools/workben/urange.cxx toolkit/inc/toolkit/awt/vclxdevice.hxx toolkit/inc/toolkit/awt/vclxgraphics.hxx toolkit/inc/toolkit/awt/vclxwindows.hxx toolkit/inc/toolkit/controls/dialogcontrol.hxx toolkit/inc/toolkit/helper/property.hxx toolkit/inc/toolkit/helper/servicenames.hxx toolkit/inc/toolkit/helper/throbberimpl.hxx toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java toolkit/source/awt/asynccallback.cxx toolkit/source/awt/vclxgraphics.cxx toolkit/source/awt/vclxtoolkit.cxx toolkit/source/awt/vclxwindow.cxx toolkit/source/awt/xsimpleanimation.cxx toolkit/source/awt/xthrobber.cxx toolkit/source/controls/dialogcontrol.cxx toolkit/source/controls/grid/defaultgridcolumnmodel.cxx toolkit/source/controls/grid/defaultgriddatamodel.cxx toolkit/source/controls/grid/gridcontrol.cxx toolkit/source/controls/grid/initguard.hxx toolkit/source/controls/unocontrol.cxx toolkit/source/controls/unocontrolcontainer.cxx toolkit/source/controls/unocontrols.cxx toolkit/source/helper/listenermultiplexer.cxx toolkit/source/helper/property.cxx toolkit/source/helper/registerservices.cxx toolkit/source/helper/servicenames.cxx toolkit/source/helper/throbberimpl.cxx toolkit/source/helper/tkresmgr.cxx tools/StaticLibrary_ooopathutils.mk tools/bootstrp/addexes/makefile.mk tools/bootstrp/addexes2/makefile.mk tools/bootstrp/addexes2/mkfilt.cxx tools/bootstrp/command.cxx tools/bootstrp/cppdep.cxx tools/bootstrp/iserver.cxx tools/bootstrp/makefile.mk tools/bootstrp/mkcreate.cxx tools/bootstrp/prj.cxx tools/bootstrp/rscdep.cxx tools/bootstrp/sstring.cxx tools/inc/bootstrp/command.hxx tools/inc/bootstrp/mkcreate.hxx tools/inc/bootstrp/prj.hxx tools/inc/bootstrp/sstring.hxx tools/inc/tools/agapi.hxx tools/inc/tools/agitem.hxx tools/inc/tools/chapi.hxx tools/inc/tools/download.hxx tools/inc/tools/eacopier.hxx tools/inc/tools/fract.hxx tools/inc/tools/fsys.hxx tools/inc/tools/geninfo.hxx tools/inc/tools/globname.hxx tools/inc/tools/inetmime.hxx tools/inc/tools/multisel.hxx tools/inc/tools/poly.hxx tools/inc/tools/postsys.h tools/inc/tools/postwin.h tools/inc/tools/presys.h tools/inc/tools/prewin.h tools/inc/tools/pstm.hxx tools/inc/tools/ref.hxx tools/inc/tools/simplerm.hxx tools/inc/tools/solar.h tools/inc/tools/table.hxx tools/inc/tools/urlkeys.hxx tools/inc/tools/urlobj.hxx tools/prj/build.lst tools/prj/d.lst tools/qa/makefile.mk tools/source/communi/geninfo.cxx tools/source/debug/debug.cxx tools/source/fsys/dirent.cxx tools/source/fsys/tdir.cxx tools/source/fsys/unx.cxx tools/source/fsys/urlobj.cxx tools/source/generic/color.cxx tools/source/generic/config.cxx tools/source/generic/fract.cxx tools/source/inet/inetmime.cxx tools/source/memtools/multisel.cxx tools/source/memtools/table.cxx tools/source/rc/resmgr.cxx tools/source/ref/globname.cxx tools/source/ref/pstm.cxx tools/source/solar/solar.c tools/source/stream/strmos2.cxx tools/source/stream/strmunx.cxx tools/source/stream/strmwnt.cxx tools/source/string/makefile.mk tools/source/testtoolloader/testtoolloader.cxx tools/test/makefile.mk tools/util/makefile.mk tools/win/inc/dll.hxx tools/win/inc/parser.hxx tools/win/inc/shellex.h tools/win/inc/shutil.h tools/win/inc/toolsdll.hxx tools/win/inc/winshell.hxx tools/workben/makefile.mk ucbhelper/source/client/proxydecider.cxx ucbhelper/workben/ucbexplorer/ucbexplorer.hrc unotools/inc/unotools/unotunnelhelper.hxx unotools/source/config/fltrcfg.cxx unotools/source/config/lingucfg.cxx unotools/source/config/misccfg.cxx unotools/source/config/pathoptions.cxx unotools/source/config/searchopt.cxx unotools/source/i18n/localedatawrapper.cxx unotools/source/ucbhelper/localfilehelper.cxx unotools/source/ucbhelper/ucbhelper.cxx unotools/source/ucbhelper/xtempfile.cxx vcl/aqua/inc/salbmp.h vcl/aqua/inc/salgdi.h vcl/aqua/inc/salinst.h vcl/aqua/source/app/salinst.cxx vcl/aqua/source/gdi/aquaprintaccessoryview.mm vcl/aqua/source/gdi/salgdi.cxx vcl/aqua/source/gdi/salprn.cxx vcl/aqua/source/window/salframeview.mm vcl/aqua/source/window/salobj.cxx vcl/inc/vcl/bitmap.hxx vcl/inc/vcl/brdwin.hxx vcl/inc/vcl/button.hxx vcl/inc/vcl/cmdevt.hxx vcl/inc/vcl/cvtgrf.hxx vcl/inc/vcl/dialog.hxx vcl/inc/vcl/dockwin.hxx vcl/inc/vcl/event.hxx vcl/inc/vcl/fixed.hxx vcl/inc/vcl/fldunit.hxx vcl/inc/vcl/floatwin.hxx vcl/inc/vcl/gdimtf.hxx vcl/inc/vcl/glyphcache.hxx vcl/inc/vcl/graphite_adaptors.hxx vcl/inc/vcl/graphite_features.hxx vcl/inc/vcl/graphite_layout.hxx vcl/inc/vcl/ilstbox.hxx vcl/inc/vcl/image.h vcl/inc/vcl/imgctrl.hxx vcl/inc/vcl/impbmpconv.hxx vcl/inc/vcl/impprn.hxx vcl/inc/vcl/jobset.h vcl/inc/vcl/keycodes.hxx vcl/inc/vcl/lstbox.hxx vcl/inc/vcl/mapunit.hxx vcl/inc/vcl/menu.hxx vcl/inc/vcl/msgbox.hxx vcl/inc/vcl/outdev.hxx vcl/inc/vcl/prndlg.hxx vcl/inc/vcl/salatype.hxx vcl/inc/vcl/salbmp.hxx vcl/inc/vcl/salgdi.hxx vcl/inc/vcl/salinst.hxx vcl/inc/vcl/seleng.hxx vcl/inc/vcl/settings.hxx vcl/inc/vcl/smartid.hxx vcl/inc/vcl/status.hxx vcl/inc/vcl/strhelper.hxx vcl/inc/vcl/svapp.hxx vcl/inc/vcl/svdata.hxx vcl/inc/vcl/syschild.hxx vcl/inc/vcl/sysdata.hxx vcl/inc/vcl/taskpanelist.hxx vcl/inc/vcl/toolbox.hxx vcl/inc/vcl/vclevent.hxx vcl/inc/vcl/windata.hxx vcl/inc/vcl/window.hxx vcl/inc/vcl/wintypes.hxx vcl/os2/source/app/salinst.cxx vcl/os2/source/gdi/salgdi.cxx vcl/os2/source/window/salmenu.cxx vcl/os2/source/window/salobj.cxx vcl/prj/build.lst vcl/source/app/dbggui.cxx vcl/source/app/help.cxx vcl/source/app/idlemgr.cxx vcl/source/app/settings.cxx vcl/source/app/svapp.cxx vcl/source/app/svdata.cxx vcl/source/app/svmain.cxx vcl/source/app/svmainhook.cxx vcl/source/app/unohelp.cxx vcl/source/app/vclevent.cxx vcl/source/control/button.cxx vcl/source/control/combobox.cxx vcl/source/control/edit.cxx vcl/source/control/field.cxx vcl/source/control/fixed.cxx vcl/source/control/ilstbox.cxx vcl/source/control/imgctrl.cxx vcl/source/control/makefile.mk vcl/source/control/tabctrl.cxx vcl/source/gdi/bitmap.cxx vcl/source/gdi/bitmap2.cxx vcl/source/gdi/bitmap4.cxx vcl/source/gdi/bmpconv.cxx vcl/source/gdi/cvtsvm.cxx vcl/source/gdi/font.cxx vcl/source/gdi/gdimtf.cxx vcl/source/gdi/image.cxx vcl/source/gdi/impimage.cxx vcl/source/gdi/jobset.cxx vcl/source/gdi/makefile.mk vcl/source/gdi/metaact.cxx vcl/source/gdi/outdev.cxx vcl/source/gdi/outdev3.cxx vcl/source/gdi/outdev4.cxx vcl/source/gdi/outdevnative.cxx vcl/source/gdi/pdfwriter.cxx vcl/source/gdi/pdfwriter_impl.cxx vcl/source/gdi/print3.cxx vcl/source/gdi/salmisc.cxx vcl/source/glyphs/gcach_ftyp.cxx vcl/source/glyphs/gcach_ftyp.hxx vcl/source/glyphs/glyphcache.cxx vcl/source/glyphs/graphite_cache.cxx vcl/source/glyphs/graphite_layout.cxx vcl/source/glyphs/graphite_textsrc.hxx vcl/source/helper/canvasbitmap.cxx vcl/source/helper/smartid.cxx vcl/source/helper/xconnection.cxx vcl/source/src/btntext.src vcl/source/src/images.src vcl/source/src/print.src vcl/source/window/accel.cxx vcl/source/window/accmgr.cxx vcl/source/window/brdwin.cxx vcl/source/window/btndlg.cxx vcl/source/window/dlgctrl.cxx vcl/source/window/javachild.cxx vcl/source/window/menu.cxx vcl/source/window/msgbox.cxx vcl/source/window/printdlg.cxx vcl/source/window/status.cxx vcl/source/window/syschild.cxx vcl/source/window/toolbox.cxx vcl/source/window/toolbox2.cxx vcl/source/window/window.cxx vcl/source/window/window2.cxx vcl/source/window/wrkwin.cxx vcl/unx/gtk/app/gtkdata.cxx vcl/unx/gtk/app/gtkinst.cxx vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx vcl/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkobject.cxx vcl/unx/headless/svpbmp.hxx vcl/unx/headless/svpgdi.cxx vcl/unx/headless/svpgdi.hxx vcl/unx/headless/svpinst.cxx vcl/unx/headless/svpinst.hxx vcl/unx/headless/svpprn.cxx vcl/unx/headless/svpprn.hxx vcl/unx/headless/svppspgraphics.cxx vcl/unx/headless/svppspgraphics.hxx vcl/unx/headless/svptext.cxx vcl/unx/inc/dtint.hxx vcl/unx/inc/plugins/gtk/gtkdata.hxx vcl/unx/inc/pspgraphics.h vcl/unx/inc/salbmp.h vcl/unx/inc/saldata.hxx vcl/unx/inc/saldisp.hxx vcl/unx/inc/salgdi.h vcl/unx/inc/salinst.h vcl/unx/inc/xfont.hxx vcl/unx/kde/kdedata.cxx vcl/unx/kde4/KDESalGraphics.cxx vcl/unx/source/app/keysymnames.cxx vcl/unx/source/app/saldata.cxx vcl/unx/source/app/saldisp.cxx vcl/unx/source/app/salinst.cxx vcl/unx/source/app/wmadaptor.cxx vcl/unx/source/dtrans/X11_selection.cxx vcl/unx/source/dtrans/X11_service.cxx vcl/unx/source/gdi/makefile.mk vcl/unx/source/gdi/pspgraphics.cxx vcl/unx/source/gdi/salgdi.cxx vcl/unx/source/gdi/salgdi3.cxx vcl/unx/source/gdi/salprnpsp.cxx vcl/unx/source/gdi/xfont.cxx vcl/unx/source/gdi/xlfd_attr.cxx vcl/unx/source/gdi/xlfd_attr.hxx vcl/unx/source/gdi/xlfd_extd.cxx vcl/unx/source/gdi/xlfd_extd.hxx vcl/unx/source/gdi/xlfd_smpl.cxx vcl/unx/source/gdi/xlfd_smpl.hxx vcl/unx/source/printer/ppdparser.cxx vcl/unx/source/printer/printerinfomanager.cxx vcl/unx/source/window/salframe.cxx vcl/unx/source/window/salmenu.cxx vcl/unx/source/window/salobj.cxx vcl/util/makefile2.pmk vcl/win/inc/salbmp.h vcl/win/inc/saldata.hxx vcl/win/inc/salgdi.h vcl/win/inc/salinst.h vcl/win/source/app/saldata.cxx vcl/win/source/app/salinst.cxx vcl/win/source/gdi/salgdi.cxx vcl/win/source/gdi/salgdi3.cxx vcl/win/source/gdi/salprn.cxx vcl/win/source/gdi/winlayout.cxx vcl/win/source/window/salframe.cxx vcl/win/source/window/salobj.cxx vcl/workben/outdevgrind.cxx vos/inc/vos/execabl.hxx vos/inc/vos/macros.hxx vos/inc/vos/pipe.hxx vos/inc/vos/process.hxx vos/inc/vos/refernce.hxx vos/inc/vos/signal.hxx vos/inc/vos/socket.hxx vos/inc/vos/stream.hxx vos/inc/vos/thread.hxx vos/source/pipe.cxx vos/source/process.cxx vos/source/signal.cxx vos/source/thread.cxx vos/source/timer.cxx
910 lines
30 KiB
C++
910 lines
30 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*************************************************************************
|
|
*
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
*
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
|
*
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
*
|
|
* This file is part of OpenOffice.org.
|
|
*
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
* only, as published by the Free Software Foundation.
|
|
*
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License version 3 for more details
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
* <http://www.openoffice.org/license.html>
|
|
* for a copy of the LGPLv3 License.
|
|
*
|
|
************************************************************************/
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
#include "precompiled_tools.hxx"
|
|
|
|
// global includes
|
|
#include <stdio.h>
|
|
|
|
// local includes
|
|
#include "bootstrp/mkcreate.hxx"
|
|
#include "bootstrp/inimgr.hxx"
|
|
#include "bootstrp/appdef.hxx"
|
|
#include <tools/geninfo.hxx>
|
|
#include <tools/iparser.hxx>
|
|
#include "bootstrp/prj.hxx"
|
|
|
|
char const *NoBuildProject[] = {
|
|
"solenv",
|
|
"EndOf_NoBuildProject"
|
|
};
|
|
|
|
char const *LimitedPath[] = {
|
|
"jurt\\com\\sun\\star",
|
|
"r_tools",
|
|
"ridljar",
|
|
"setup2",
|
|
"connectivity",
|
|
"EndOf_LimitedPath"
|
|
};
|
|
|
|
//
|
|
// class SourceDirectory
|
|
//
|
|
|
|
/*****************************************************************************/
|
|
SourceDirectory::SourceDirectory( const ByteString &rDirectoryName,
|
|
sal_uInt16 nOperatingSystem, SourceDirectory *pParentDirectory )
|
|
/*****************************************************************************/
|
|
: ByteString( rDirectoryName ),
|
|
pParent( pParentDirectory ),
|
|
pSubDirectories( NULL ),
|
|
nOSType( nOperatingSystem ),
|
|
nDepth( 0 ),
|
|
pDependencies( NULL ),
|
|
pCodedDependencies( NULL ),
|
|
pCodedIdentifier( NULL )
|
|
{
|
|
if ( pParent ) {
|
|
if ( !pParent->pSubDirectories )
|
|
pParent->pSubDirectories = new SourceDirectoryList();
|
|
pParent->pSubDirectories->InsertSorted( this );
|
|
nDepth = pParent->nDepth + 1;
|
|
}
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
SourceDirectory::~SourceDirectory()
|
|
/*****************************************************************************/
|
|
{
|
|
delete pSubDirectories;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
CodedDependency *SourceDirectory::AddCodedDependency(
|
|
const ByteString &rCodedIdentifier, sal_uInt16 nOperatingSystems )
|
|
/*****************************************************************************/
|
|
{
|
|
CodedDependency *pReturn = NULL;
|
|
|
|
if ( !pCodedDependencies ) {
|
|
pCodedDependencies = new SByteStringList();
|
|
pReturn = new CodedDependency( rCodedIdentifier, nOperatingSystems );
|
|
pCodedDependencies->PutString(( ByteString * ) pReturn );
|
|
}
|
|
else {
|
|
size_t nPos = pCodedDependencies->IsString( (ByteString*)(&rCodedIdentifier) );
|
|
if ( nPos == NOT_THERE ) {
|
|
pReturn =
|
|
new CodedDependency( rCodedIdentifier, nOperatingSystems );
|
|
pCodedDependencies->PutString(( ByteString * ) pReturn );
|
|
}
|
|
else {
|
|
pReturn = ( CodedDependency * ) (*pCodedDependencies)[ nPos ];
|
|
pReturn->TryToMerge( rCodedIdentifier, nOperatingSystems );
|
|
}
|
|
}
|
|
return pReturn;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
CodedDependency *SourceDirectory::AddCodedIdentifier(
|
|
const ByteString &rCodedIdentifier, sal_uInt16 nOperatingSystems )
|
|
/*****************************************************************************/
|
|
{
|
|
CodedDependency *pReturn = NULL;
|
|
|
|
if ( !pCodedIdentifier ) {
|
|
pCodedIdentifier = new SByteStringList();
|
|
pReturn = new CodedDependency( rCodedIdentifier, nOperatingSystems );
|
|
pCodedIdentifier->PutString(( ByteString * ) pReturn );
|
|
}
|
|
else {
|
|
size_t nPos = pCodedIdentifier->IsString( ( ByteString*)(&rCodedIdentifier) );
|
|
if ( nPos == NOT_THERE ) {
|
|
pReturn =
|
|
new CodedDependency( rCodedIdentifier, nOperatingSystems );
|
|
pCodedIdentifier->PutString(( ByteString * ) pReturn );
|
|
}
|
|
else {
|
|
pReturn = ( CodedDependency * ) (*pCodedIdentifier)[ nPos ];
|
|
pReturn->TryToMerge( rCodedIdentifier, nOperatingSystems );
|
|
}
|
|
}
|
|
if ( pParent && pParent->nDepth > 1 )
|
|
pParent->AddCodedIdentifier( rCodedIdentifier, nOperatingSystems );
|
|
|
|
return pReturn;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
ByteString SourceDirectory::GetFullPath()
|
|
/*****************************************************************************/
|
|
{
|
|
ByteString sFullPath;
|
|
if ( pParent ) {
|
|
sFullPath = pParent->GetFullPath();
|
|
sFullPath += ByteString( PATH_SEPARATOR );
|
|
}
|
|
sFullPath += *this;
|
|
|
|
return sFullPath;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
SourceDirectory *SourceDirectory::GetRootDirectory()
|
|
/*****************************************************************************/
|
|
{
|
|
if ( !pParent )
|
|
return this;
|
|
|
|
return pParent->GetRootDirectory();
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
SourceDirectory *SourceDirectory::GetSubDirectory(
|
|
const ByteString &rDirectoryPath, sal_uInt16 nOperatingSystem )
|
|
/*****************************************************************************/
|
|
{
|
|
ByteString sSearch;
|
|
|
|
sal_Bool bSubs = sal_True;
|
|
sal_uIntPtr nIndex = 0;
|
|
|
|
while ( bSubs && ByteString( LimitedPath[ nIndex ]) != "EndOf_LimitedPath" ) {
|
|
SourceDirectory *pActDir = this;
|
|
ByteString sLimitation( LimitedPath[ nIndex ]);
|
|
|
|
sal_Bool bBreak = sal_False;
|
|
for ( sal_uIntPtr i = sLimitation.GetTokenCount( '\\' ); i > 0 && !bBreak; i-- ) {
|
|
if (( !pActDir ) || ( *pActDir != sLimitation.GetToken(( sal_uInt16 )( i - 1 ), '\\' )))
|
|
bBreak = sal_True;
|
|
else
|
|
pActDir = pActDir->pParent;
|
|
}
|
|
bSubs = bBreak;
|
|
nIndex++;
|
|
}
|
|
|
|
if ( !bSubs )
|
|
{
|
|
sSearch = rDirectoryPath;
|
|
}
|
|
else
|
|
sSearch = rDirectoryPath.GetToken( 0, PATH_SEPARATOR );
|
|
|
|
SourceDirectory *pSubDirectory = NULL;
|
|
|
|
if ( pSubDirectories )
|
|
pSubDirectory = pSubDirectories->Search( sSearch );
|
|
|
|
if ( !pSubDirectory )
|
|
pSubDirectory = new SourceDirectory(
|
|
sSearch, nOperatingSystem, this );
|
|
|
|
pSubDirectory->nOSType |= nOperatingSystem;
|
|
|
|
if ( sSearch.Len() == rDirectoryPath.Len())
|
|
return pSubDirectory;
|
|
|
|
ByteString sPath = rDirectoryPath.Copy( sSearch.Len() + 1 );
|
|
|
|
return pSubDirectory->GetSubDirectory( sPath, nOperatingSystem );
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
SourceDirectory *SourceDirectory::GetDirectory(
|
|
const ByteString &rDirectoryName, sal_uInt16 nOperatingSystem )
|
|
/*****************************************************************************/
|
|
{
|
|
ByteString sDirectoryName( rDirectoryName );
|
|
#ifdef UNX
|
|
sDirectoryName.SearchAndReplaceAll( "\\", "/" );
|
|
#endif
|
|
|
|
SourceDirectory *pRoot = GetRootDirectory();
|
|
|
|
if ( sDirectoryName.Search( *pRoot ) != 0 )
|
|
return NULL;
|
|
|
|
if ( sDirectoryName.Len() == pRoot->Len())
|
|
return pRoot;
|
|
|
|
if ( sDirectoryName.GetChar( pRoot->Len()) == PATH_SEPARATOR ) {
|
|
ByteString sSub = sDirectoryName.Copy( pRoot->Len() + 1 );
|
|
return pRoot->GetSubDirectory( sSub, nOperatingSystem );
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
SourceDirectory *SourceDirectory::Insert( const ByteString &rDirectoryName,
|
|
sal_uInt16 nOperatingSystem )
|
|
/*****************************************************************************/
|
|
{
|
|
SourceDirectory *pSubDirectory = NULL;
|
|
if ( pSubDirectories )
|
|
pSubDirectory = pSubDirectories->Search( rDirectoryName );
|
|
|
|
if ( !pSubDirectory )
|
|
pSubDirectory = new SourceDirectory(
|
|
rDirectoryName, nOperatingSystem, this );
|
|
|
|
return pSubDirectory;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
Dependency *SourceDirectory::ResolvesDependency(
|
|
CodedDependency *pCodedDependency )
|
|
/*****************************************************************************/
|
|
{
|
|
if ( !pCodedIdentifier )
|
|
return NULL;
|
|
|
|
size_t nPos = pCodedIdentifier->IsString( pCodedDependency );
|
|
if ( nPos != NOT_THERE ) {
|
|
CodedDependency *pIdentifier = ( CodedDependency* )(*pCodedIdentifier)[ nPos ];
|
|
sal_uInt16 nResult =
|
|
pIdentifier->GetOperatingSystem() &
|
|
pCodedDependency->GetOperatingSystem();
|
|
Dependency *pReturn = new Dependency( *this, nResult );
|
|
nResult ^= pCodedDependency->GetOperatingSystem();
|
|
pCodedDependency->SetOperatingSystem( nResult );
|
|
return pReturn;
|
|
}
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/*****************************************************************************/
|
|
void SourceDirectory::ResolveDependencies()
|
|
/*****************************************************************************/
|
|
{
|
|
if ( !pSubDirectories )
|
|
return;
|
|
|
|
for ( size_t i = 0; i < pSubDirectories->size(); i++ ) {
|
|
SourceDirectory *pActDirectory = (SourceDirectory*)(*pSubDirectories)[ i ];
|
|
if ( pActDirectory->pSubDirectories )
|
|
pActDirectory->ResolveDependencies();
|
|
|
|
if ( pActDirectory->pCodedDependencies ) {
|
|
while ( pActDirectory->pCodedDependencies->size() )
|
|
{
|
|
CodedDependency *pCodedDependency = ( CodedDependency * )
|
|
(*pActDirectory->pCodedDependencies)[ 0 ];
|
|
|
|
for ( size_t k = 0;
|
|
( k < pSubDirectories->size() )
|
|
&& ( pCodedDependency->GetOperatingSystem() != OS_NONE );
|
|
k++
|
|
) {
|
|
Dependency *pDependency =
|
|
((SourceDirectory *)(*pSubDirectories)[ k ])->
|
|
ResolvesDependency( pCodedDependency );
|
|
if ( pDependency )
|
|
{
|
|
if ( !pActDirectory->pDependencies )
|
|
pActDirectory->pDependencies = new SByteStringList();
|
|
pActDirectory->pDependencies->PutString( pDependency );
|
|
}
|
|
}
|
|
if ( pCodedDependency->GetOperatingSystem()) {
|
|
if ( !pCodedDependencies )
|
|
pCodedDependencies = new SByteStringList();
|
|
pCodedDependencies->PutString( pCodedDependency );
|
|
}
|
|
else
|
|
delete pCodedDependency;
|
|
pActDirectory->pCodedDependencies->erase( 0 );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
ByteString SourceDirectory::GetTarget()
|
|
/*****************************************************************************/
|
|
{
|
|
ByteString sReturn;
|
|
|
|
if ( !pDependencies )
|
|
return sReturn;
|
|
|
|
size_t k = 0;
|
|
while ( k < pDependencies->size()) {
|
|
if ( *this == *(*pDependencies)[ k ] )
|
|
delete pDependencies->erase( k );
|
|
else
|
|
k++;
|
|
}
|
|
|
|
if ( !pDependencies->size() ) {
|
|
delete pDependencies;
|
|
pDependencies = NULL;
|
|
return sReturn;
|
|
}
|
|
|
|
sal_Bool bDependsOnPlatform = sal_False;
|
|
for ( size_t i = 0; i < pDependencies->size(); i++ ) {
|
|
if ( ((Dependency*)(*pDependencies)[ i ])->GetOperatingSystem() != OS_ALL ) {
|
|
bDependsOnPlatform = sal_True;
|
|
break;
|
|
}
|
|
}
|
|
|
|
ByteString sTarget( *this );
|
|
sTarget.SearchAndReplaceAll( "\\", "$/" );
|
|
if ( !bDependsOnPlatform ) {
|
|
sReturn = sTarget;
|
|
sReturn += " :";
|
|
for ( size_t i = 0; i < pDependencies->size(); i++ ) {
|
|
ByteString sDependency( *(*pDependencies)[ i ] );
|
|
sDependency.SearchAndReplaceAll( "\\", "$/" );
|
|
sReturn += " ";
|
|
sReturn += sDependency;
|
|
}
|
|
}
|
|
else {
|
|
ByteString sUNX( ".IF \"$(GUI)\" == \"UNX\"\n" );
|
|
sUNX += sTarget;
|
|
sUNX += " :";
|
|
sal_Bool bUNX = sal_False;
|
|
|
|
ByteString sWNT( ".IF \"$(GUI)\" == \"WNT\"\n" );
|
|
sWNT += sTarget;
|
|
sWNT += " :";
|
|
sal_Bool bWNT = sal_False;
|
|
|
|
ByteString sOS2( ".IF \"$(GUI)\" == \"OS2\"\n" );
|
|
sOS2 += sTarget;
|
|
sOS2 += " :";
|
|
sal_Bool bOS2 = sal_False;
|
|
|
|
for ( size_t i = 0; i < pDependencies->size(); i++ ) {
|
|
Dependency *pDependency = (Dependency*)(*pDependencies)[ i ];
|
|
ByteString sDependency( *pDependency );
|
|
sDependency.SearchAndReplaceAll( "\\", "$/" );
|
|
|
|
if ( pDependency->GetOperatingSystem() & OS_UNX ) {
|
|
sUNX += " ";
|
|
sUNX += sDependency;
|
|
bUNX = sal_True;
|
|
}
|
|
if ( pDependency->GetOperatingSystem() & OS_WIN32 ) {
|
|
sWNT += " ";
|
|
sWNT += sDependency;
|
|
bWNT = sal_True;
|
|
}
|
|
if ( pDependency->GetOperatingSystem() & OS_OS2 ) {
|
|
sOS2 += " ";
|
|
sOS2 += sDependency;
|
|
bOS2 = sal_True;
|
|
}
|
|
}
|
|
|
|
if ( bUNX ) {
|
|
sReturn += sUNX;
|
|
sReturn += "\n.ENDIF\n";
|
|
}
|
|
if ( bWNT ) {
|
|
sReturn += sWNT;
|
|
sReturn += "\n.ENDIF\n";
|
|
}
|
|
if ( bOS2 ) {
|
|
sReturn += sOS2;
|
|
sReturn += "\n.ENDIF\n";
|
|
}
|
|
}
|
|
sReturn.EraseTrailingChars( '\n' );
|
|
return sReturn;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
ByteString SourceDirectory::GetSubDirsTarget()
|
|
/*****************************************************************************/
|
|
{
|
|
ByteString sReturn;
|
|
|
|
if ( pSubDirectories ) {
|
|
sal_Bool bDependsOnPlatform = sal_False;
|
|
for ( size_t i = 0; i < pSubDirectories->size(); i++ ) {
|
|
if ( ((SourceDirectory*)(*pSubDirectories)[ i ])->GetOperatingSystems() != OS_ALL ) {
|
|
bDependsOnPlatform = sal_True;
|
|
}
|
|
}
|
|
|
|
if ( !bDependsOnPlatform ) {
|
|
sReturn = "RC_SUBDIRS = ";
|
|
|
|
for ( size_t i = 0; i < pSubDirectories->size(); i++ ) {
|
|
ByteString sSubDirectory( *(*pSubDirectories)[ i ] );
|
|
sSubDirectory.SearchAndReplaceAll( "\\", "$/" );
|
|
sReturn += " \\\n\t";
|
|
sReturn += sSubDirectory;
|
|
}
|
|
sReturn += "\n";
|
|
}
|
|
else {
|
|
ByteString sUNX( ".IF \"$(GUI)\" == \"UNX\"\n" );
|
|
sUNX += "RC_SUBDIRS = ";
|
|
sal_Bool bUNX = sal_False;
|
|
|
|
ByteString sWNT( ".IF \"$(GUI)\" == \"WNT\"\n" );
|
|
sWNT += "RC_SUBDIRS = ";
|
|
sal_Bool bWNT = sal_False;
|
|
|
|
ByteString sOS2( ".IF \"$(GUI)\" == \"OS2\"\n" );
|
|
sOS2 += "RC_SUBDIRS = ";
|
|
sal_Bool bOS2 = sal_False;
|
|
|
|
for ( size_t i = 0; i < pSubDirectories->size(); i++ ) {
|
|
SourceDirectory *pDirectory = (SourceDirectory*)(*pSubDirectories)[ i ];
|
|
ByteString sDirectory( *pDirectory );
|
|
sDirectory.SearchAndReplaceAll( "\\", "$/" );
|
|
|
|
if ( pDirectory->GetOperatingSystems() & OS_UNX ) {
|
|
sUNX += " \\\n\t";
|
|
sUNX += sDirectory;
|
|
bUNX = sal_True;
|
|
}
|
|
if ( pDirectory->GetOperatingSystems() & OS_WIN32 ) {
|
|
sWNT += " \\\n\t";
|
|
sWNT += sDirectory;
|
|
bWNT = sal_True;
|
|
}
|
|
if ( pDirectory->GetOperatingSystems() & OS_OS2 ) {
|
|
sOS2 += " \\\n\t";
|
|
sOS2 += sDirectory;
|
|
bOS2 = sal_True;
|
|
}
|
|
}
|
|
if ( bUNX ) {
|
|
sReturn += sUNX;
|
|
sReturn += "\n.ENDIF\n";
|
|
}
|
|
if ( bWNT ) {
|
|
sReturn += sWNT;
|
|
sReturn += "\n.ENDIF\n";
|
|
}
|
|
if ( bOS2 ) {
|
|
sReturn += sOS2;
|
|
sReturn += "\n.ENDIF\n";
|
|
}
|
|
}
|
|
}
|
|
return sReturn;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
sal_uInt16 SourceDirectory::GetOSType( const ByteString &sDependExt )
|
|
/*****************************************************************************/
|
|
{
|
|
sal_uInt16 nOSType = 0;
|
|
if ( sDependExt == "" )
|
|
nOSType |= OS_ALL;
|
|
else if ( sDependExt == "N" || sDependExt == "W" )
|
|
nOSType |= OS_WIN32;
|
|
else if ( sDependExt == "U" )
|
|
nOSType |= OS_UNX;
|
|
else if ( sDependExt == "P" )
|
|
nOSType |= OS_OS2;
|
|
return nOSType;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
SourceDirectory *SourceDirectory::CreateRootDirectory(
|
|
const ByteString &rRoot, const ByteString &rVersion, sal_Bool bAll )
|
|
/*****************************************************************************/
|
|
{
|
|
IniManager aIniManager;
|
|
aIniManager.Update();
|
|
|
|
ByteString sDefLst( GetDefStandList());
|
|
ByteString sStandLst( aIniManager.ToLocal( sDefLst ));
|
|
String s = String( sStandLst, gsl_getSystemTextEncoding());
|
|
InformationParser aParser;
|
|
GenericInformationList *pVerList = aParser.Execute( s );
|
|
|
|
ByteString sVersion( rVersion );
|
|
Star aStar( pVerList, sVersion, sal_True, rRoot.GetBuffer());
|
|
|
|
SourceDirectory *pSourceRoot = new SourceDirectory( rRoot, OS_ALL );
|
|
|
|
for ( sal_uIntPtr i = 0; i < aStar.Count(); i++ ) {
|
|
Prj *pPrj = aStar.GetObject( i );
|
|
|
|
sal_Bool bBuildable = sal_True;
|
|
sal_uIntPtr nIndex = 0;
|
|
|
|
while ( bBuildable && ByteString( NoBuildProject[ nIndex ]) != "EndOf_NoBuildProject" ) {
|
|
bBuildable = ( ByteString( NoBuildProject[ nIndex ]) != pPrj->GetProjectName());
|
|
nIndex ++;
|
|
}
|
|
|
|
if ( bBuildable ) {
|
|
SourceDirectory *pProject = pSourceRoot->Insert( pPrj->GetProjectName(), OS_ALL );
|
|
|
|
SByteStringList *pPrjDependencies = pPrj->GetDependencies( sal_False );
|
|
if ( pPrjDependencies )
|
|
for ( size_t x = 0; x < pPrjDependencies->size(); x++ )
|
|
pProject->AddCodedDependency( *(*pPrjDependencies)[ x ], OS_ALL );
|
|
|
|
pProject->AddCodedIdentifier( pPrj->GetProjectName(), OS_ALL );
|
|
|
|
for ( sal_uIntPtr j = 0; j < pPrj->Count(); j++ ) {
|
|
CommandData *pData = pPrj->GetObject( j );
|
|
if ( bAll || ( pData->GetCommandType() == COMMAND_NMAKE )) {
|
|
ByteString sDirPath( rRoot );
|
|
sDirPath += ByteString( PATH_SEPARATOR );
|
|
sDirPath += pData->GetPath();
|
|
SourceDirectory *pDirectory =
|
|
pSourceRoot->InsertFull( sDirPath, pData->GetOSType());
|
|
SByteStringList *pDependencies = pData->GetDependencies();
|
|
if ( pDependencies ) {
|
|
for ( size_t k = 0; k < pDependencies->size(); k++ ) {
|
|
ByteString sDependency( *(*pDependencies)[ k ] );
|
|
ByteString sDependExt(sDependency.GetToken( 1, '.' ));
|
|
sDependExt.ToUpperAscii();
|
|
pDirectory->AddCodedDependency(
|
|
sDependency.GetToken( 0, '.' ), GetOSType( sDependExt ));
|
|
}
|
|
}
|
|
ByteString sIdentifier = pData->GetLogFile();
|
|
ByteString sIdExt = sIdentifier.GetToken( 1, '.' );
|
|
sIdExt.ToUpperAscii();
|
|
pDirectory->AddCodedIdentifier( sIdentifier.GetToken( 0, '.' ), GetOSType( sIdExt ));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
delete pVerList;
|
|
return pSourceRoot;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
sal_Bool SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
|
|
/*****************************************************************************/
|
|
{
|
|
if ( !pParent )
|
|
return sal_False;
|
|
|
|
SourceDirectoryList *pParentContent = pParent->pSubDirectories;
|
|
size_t i = 0;
|
|
while ( i < pParentContent->size() ) {
|
|
SourceDirectory *pCandidate = (SourceDirectory*)(*pParentContent)[ i ];
|
|
if ( pCandidate == this ) {
|
|
pParentContent->erase( i );
|
|
}
|
|
else {
|
|
if ( pCandidate->pDependencies ) {
|
|
size_t nPos = pCandidate->pDependencies->IsString( this );
|
|
if ( nPos != NOT_THERE )
|
|
delete pCandidate->pDependencies->erase( nPos );
|
|
}
|
|
i++;
|
|
}
|
|
}
|
|
delete this;
|
|
return sal_True;
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
sal_Bool SourceDirectory::CreateRecursiveMakefile( sal_Bool bAllChilds )
|
|
/*****************************************************************************/
|
|
{
|
|
if ( !pSubDirectories )
|
|
return sal_True;
|
|
|
|
fprintf( stdout, "%s", GetFullPath().GetBuffer());
|
|
|
|
String aTmpStr( GetFullPath(), gsl_getSystemTextEncoding());
|
|
DirEntry aEntry( aTmpStr );
|
|
if ( !aEntry.Exists()) {
|
|
fprintf( stdout, " ... no directory!\n" );
|
|
return sal_False;
|
|
}
|
|
|
|
size_t j = 0;
|
|
while( j < pSubDirectories->size()) {
|
|
String sSubDirectory(
|
|
((SourceDirectory*)(*pSubDirectories)[ j ])->GetFullPath(),
|
|
gsl_getSystemTextEncoding()
|
|
);
|
|
DirEntry aSubDirectory( sSubDirectory );
|
|
if ( !aSubDirectory.Exists() )
|
|
((SourceDirectory*)(*pSubDirectories)[ j ])->RemoveDirectoryTreeAndAllDependencies();
|
|
else
|
|
j++;
|
|
}
|
|
|
|
DirEntry aRCFile( String( "makefile.rc", gsl_getSystemTextEncoding()));
|
|
DirEntry aRCEntry( aEntry );
|
|
aRCEntry += aRCFile;
|
|
|
|
DirEntry aMKFile( String( "makefile.mk", gsl_getSystemTextEncoding()));
|
|
DirEntry aMKEntry( aEntry );
|
|
aMKEntry += aMKFile;
|
|
|
|
sal_Bool bMakefileMk = sal_False;
|
|
if ( aMKEntry.Exists()) {
|
|
if ( nDepth == 1 && *this == ByteString( "api" ))
|
|
fprintf( stdout, " ... makefile.mk exists, ignoring (hack: prj == api)!" );
|
|
else {
|
|
fprintf( stdout, " ... makefile.mk exists, including!" );
|
|
bMakefileMk = sal_True;
|
|
}
|
|
}
|
|
|
|
SvFileStream aMakefile( aRCEntry.GetFull(), STREAM_STD_WRITE | STREAM_TRUNC );
|
|
if ( !aMakefile.IsOpen()) {
|
|
fprintf( stdout, " ... failed!\n" );
|
|
return sal_False;
|
|
}
|
|
|
|
ByteString sHeader(
|
|
"#*************************************************************************\n"
|
|
"#\n"
|
|
"# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n"
|
|
"#\n"
|
|
"# Copyright 2000, 2010 Oracle and/or its affiliates.\n"
|
|
"#\n"
|
|
"# OpenOffice.org - a multi-platform office productivity suite\n"
|
|
"#\n"
|
|
"# This file is part of OpenOffice.org.\n"
|
|
"#\n"
|
|
"# OpenOffice.org is free software: you can redistribute it and/or modify\n"
|
|
"# it under the terms of the GNU Lesser General Public License version 3\n"
|
|
"# only, as published by the Free Software Foundation.\n"
|
|
"#\n"
|
|
"# OpenOffice.org is distributed in the hope that it will be useful,\n"
|
|
"# but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
|
|
"# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
|
|
"# GNU Lesser General Public License version 3 for more details\n"
|
|
"# (a copy is included in the LICENSE file that accompanied this code).\n"
|
|
"#\n"
|
|
"# You should have received a copy of the GNU Lesser General Public License\n"
|
|
"# version 3 along with OpenOffice.org. If not, see\n"
|
|
"# <http://www.openoffice.org/license.html>\n"
|
|
"# for a copy of the LGPLv3 License.\n"
|
|
"#\n"
|
|
"#*************************************************************************\n"
|
|
"\n"
|
|
);
|
|
if ( !bMakefileMk ) {
|
|
if ( nDepth == 0 ) {
|
|
sHeader += ByteString(
|
|
"\n"
|
|
"# \n"
|
|
"# mark this makefile as a recursive one\n"
|
|
"# \n"
|
|
"\n"
|
|
"MAKEFILERC=yes\n"
|
|
"\n"
|
|
"# \n"
|
|
"# implementation of cvs checkout\n"
|
|
"# \n"
|
|
"\n"
|
|
".IF \"$(checkout)\"==\"\"\n"
|
|
"all_target: ALLTAR\n"
|
|
".ELSE\t# \"$(checkout)\"==\"\"\n"
|
|
".IF \"$(checkout)\"==\"true\"\n"
|
|
"% : $(NULL)\n"
|
|
"\t_cvs co $@\n"
|
|
".ELSE\t# \"$(checkout)\"==\"true\"\n"
|
|
"% : $(NULL)\n"
|
|
"\t_cvs co -r$(checkout) $@\n"
|
|
".ENDIF\t# \"$(checkout)\"==\"true\"\n"
|
|
"all_subdirs : $(RC_SUBDIRS)\n"
|
|
".ENDIF\t# \"$(checkout)\"==\"\"\n"
|
|
);
|
|
}
|
|
else {
|
|
sHeader += ByteString(
|
|
"\n"
|
|
"# \n"
|
|
"# mark this makefile as a recursive one\n"
|
|
"# \n"
|
|
"\n"
|
|
"MAKEFILERC=yes\n"
|
|
);
|
|
if ( nDepth == 1 )
|
|
sHeader += ByteString(
|
|
".IF \"$(build_deliver)\"==\"true\"\n"
|
|
"all_target:\t\t\\\n"
|
|
"\tTG_DELIVER\t\\\n"
|
|
"\tALLTAR\n"
|
|
".ELSE # \"$(build_deliver)\"==\"true\"\n"
|
|
"all_target: ALLTAR\n"
|
|
".ENDIF # \"$(build_deliver)\"==\"true\"\n"
|
|
);
|
|
else
|
|
sHeader += ByteString(
|
|
"all_target: ALLTAR\n"
|
|
);
|
|
}
|
|
}
|
|
else {
|
|
if ( nDepth == 1 )
|
|
sHeader += ByteString(
|
|
".IF \"$(build_deliver)\"==\"true\"\n"
|
|
"all_target:\t\t\\\n"
|
|
"\tTG_DELIVER\t\\\n"
|
|
"\tALLTAR\n"
|
|
".ELSE # \"$(build_deliver)\"==\"true\"\n"
|
|
"all_target: ALLTAR\n"
|
|
".ENDIF # \"$(build_deliver)\"==\"true\"\n"
|
|
);
|
|
}
|
|
sHeader += ByteString(
|
|
"\n"
|
|
"# \n"
|
|
"# macro RC_SUBDIRS handles iteration over\n"
|
|
"# all mandatory sub directories\n"
|
|
"# \n"
|
|
);
|
|
|
|
aMakefile.WriteLine( sHeader );
|
|
aMakefile.WriteLine( GetSubDirsTarget());
|
|
|
|
if ( nDepth == 0 ) {
|
|
ByteString sBootstrapTarget(
|
|
"# \n"
|
|
"# bootstrap target\n"
|
|
"# \n\n"
|
|
"bootstrap .PHONY :\n"
|
|
"\t@config_office/bootstrap\n\n"
|
|
);
|
|
aMakefile.WriteLine( sBootstrapTarget );
|
|
ByteString sConfigureTarget(
|
|
"# \n"
|
|
"# configure target\n"
|
|
"# \n\n"
|
|
"configure .PHONY SETDIR=config_office :\n"
|
|
"\t@configure\n"
|
|
);
|
|
aMakefile.WriteLine( sConfigureTarget );
|
|
}
|
|
else if ( nDepth == 1 ) {
|
|
ByteString sDeliverTarget(
|
|
"# \n"
|
|
"# deliver target to handle\n"
|
|
"# project dependencies\n"
|
|
"# \n\n"
|
|
"TG_DELIVER : $(RC_SUBDIRS)\n"
|
|
"\t$(DELIVER)\n"
|
|
);
|
|
aMakefile.WriteLine( sDeliverTarget );
|
|
}
|
|
|
|
if ( bMakefileMk ) {
|
|
ByteString sInclude(
|
|
"# \n"
|
|
"# local makefile\n"
|
|
"# \n"
|
|
"\n"
|
|
".INCLUDE : makefile.mk\n"
|
|
);
|
|
|
|
if ( nDepth != 1 )
|
|
sInclude += ByteString(
|
|
"\n"
|
|
"all_rc_target: ALLTAR\n"
|
|
);
|
|
|
|
aMakefile.WriteLine( sInclude );
|
|
}
|
|
|
|
ByteString sComment(
|
|
"# \n"
|
|
"# single directory targets for\n"
|
|
"# dependency handling between directories\n"
|
|
"# \n"
|
|
);
|
|
aMakefile.WriteLine( sComment );
|
|
|
|
for ( size_t i = 0; i < pSubDirectories->size(); i++ ) {
|
|
ByteString sTarget( ((SourceDirectory*)(*pSubDirectories)[ i ])->GetTarget() );
|
|
if ( sTarget.Len())
|
|
aMakefile.WriteLine( sTarget );
|
|
}
|
|
|
|
ByteString sFooter(
|
|
"\n"
|
|
);
|
|
if ( !bMakefileMk ) {
|
|
sFooter += ByteString(
|
|
"# \n"
|
|
"# central target makefile\n"
|
|
"# \n"
|
|
"\n"
|
|
);
|
|
if ( nDepth != 0 ) {
|
|
sFooter += ByteString(
|
|
".INCLUDE : target.mk\n"
|
|
);
|
|
}
|
|
else {
|
|
sFooter += ByteString(
|
|
".IF \"$(checkout)\"==\"\"\n"
|
|
".INCLUDE : target.mk\n"
|
|
".ENDIF\t#\"$(checkout)\"==\"\"\n"
|
|
);
|
|
}
|
|
}
|
|
sFooter += ByteString(
|
|
"\n"
|
|
"#*************************************************************************\n"
|
|
);
|
|
aMakefile.WriteLine( sFooter );
|
|
|
|
aMakefile.Close();
|
|
|
|
fprintf( stdout, "\n" );
|
|
|
|
sal_Bool bSuccess = sal_True;
|
|
if ( bAllChilds ) {
|
|
for ( size_t k = 0; k < pSubDirectories->size(); k++ ) {
|
|
if ( !((SourceDirectory*)(*pSubDirectories)[ k ])->CreateRecursiveMakefile( TRUE ) ) {
|
|
bSuccess = sal_False;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
return bSuccess;
|
|
}
|
|
|
|
//
|
|
// class SourceDirectoryList
|
|
//
|
|
|
|
/*****************************************************************************/
|
|
SourceDirectoryList::~SourceDirectoryList()
|
|
/*****************************************************************************/
|
|
{
|
|
for ( size_t i = 0; i < size(); i++ )
|
|
delete at( i );
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
SourceDirectory *SourceDirectoryList::Search(
|
|
const ByteString &rDirectoryName )
|
|
/*****************************************************************************/
|
|
{
|
|
size_t nPos = IsString( ( ByteString * ) (&rDirectoryName) );
|
|
if ( nPos != LIST_ENTRY_NOTFOUND )
|
|
return ( SourceDirectory * ) at( nPos );
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|