summaryrefslogtreecommitdiff
path: root/solenv/gbuild/Executable.mk
AgeCommit message (Collapse)Author
2019-10-04add gbuild function for a common PCH and use it in sc/ and sax/Luboš Luňák
And make it simple to disable the whole feature by setting gb_DISABLE_PCH_REUSE=1, just in case. Also work around a possible BOOST_ALL_NO_LIB mismatch when using the common PCH. Change-Id: I96fd507edf1ada6242ac225026250e5a588d0193 Reviewed-on: https://gerrit.libreoffice.org/79365 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-04add gb_LinkTarget_reuse_precompiled_headerLuboš Luňák
Similar to gb_LinkTarget_set_precompiled_header, but uses PCH created by another linktarget. This allows using a PCH even for linktargets that are small and creating their own dedicated PCHs is not worth it. The ultimate goal is having some default PCH that will be used if no explicit PCH is set. Change-Id: I4d72acdba7181bb5c7c1cdead776f548be36ba33 Reviewed-on: https://gerrit.libreoffice.org/79362 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-05Reduce some repeated codeMike Kaganski
Change-Id: I617f606b64706e8bc32e827644e5f1d1ef27702a Reviewed-on: https://gerrit.libreoffice.org/78624 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2019-07-05Make font-based unit test depend on instdir fontsJan-Marek Glogowski
The current dependency is already a hack, because there is no way I know of to depend on delivered top-level modules like more_fonts. The original patch parses the gb_Package_MODULE_ooo_fonts list of registered packages to add them as build dependencies. But this is not sufficient, as it just adds the dependencies on the installed / unpacked fonts in the workdir (actually it's just the installer filelist), where they can't be found by the unit test running in the instdir environment. So this converts the depndency into a make error, if either the filelist is missing or the included font files. But if we are in a full run and know the more_fonts module, we simply depend on its delivered files. This needs some minimal changes to gbuild, as neither the delivered file list nor the modules class names are yet available. And this moves the fontconfig handling to extras, where the opensymbol font is already handled. Change-Id: I1b70a4c45ff189266ce56c57e534ddc45e7c5c19 Reviewed-on: https://gerrit.libreoffice.org/74624 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-24disable warnings in external libsLuboš Luňák
As in, really disable, so that they do not even show. This moreover avoids tons of D9025 warnings from MSVC about overriding -W4 with -w. Change-Id: Ia2e72fd72d883d91bdd89e467ee42f259e2ae033 Reviewed-on: https://gerrit.libreoffice.org/72899 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-29tdf#114635: reimplement TWAIN-based scan using 32-bit shim on WindowsMike Kaganski
Since TWAIN is only actually available as 32-bit component on Windows, to use it in a 64-bit program, we need a 32-bit shim program that does all actual communication with TWAIN subsystem. This change reimplements TWAIN implementation to be a separate 32-bit process. Image is transfered from the shim to main program using file mapping API. This reverts most of commit 585d9806961342e95f7318fb947bd31e9f86dee0. 64-bit LibreOffice doesn't bundle TWAIN DSM library now. TWAIN DSM source code is still used for TWAIN headers. Change-Id: I46f178ad36acd97a9eff156624b99036fcbb83f8 Reviewed-on: https://gerrit.libreoffice.org/65688 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-06gbuild: more verbose forwarding of LinkTarget functionsMichael Stahl
The forwarding of LinkTarget subclass functions to LinkTarget functions is currently done in a very elegant way that only requires listing the bare function names once, but the downside is that the subclass functions aren't defined in a way that "git grep" or "ctags" can find, so replace that with more verbose copy-paste definitions. Change-Id: I4bd7f1b1bc0904ae345958e39403ab508db584a1 Reviewed-on: https://gerrit.libreoffice.org/43196 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-07Remove gb_LinkTarget_add_generated_cxxobjectsStephan Bergmann
...in favor of gb_LinkTarget_add_generated_exception_objects. The former would have needed any flags to be passed in explicitly (but no call sites did), so e.g. StaticLibrary_graphite didn't have any debug information (when building with --enable-debug). I guess there is no downside to having C++ exception support enabled in these places, and using _add_generated_cxxobjects instead was likely an oversight in the first place (at least in the case of external/graphite/StaticLibrary_graphite.mk, it was that way ever since 1ceb47d96da9e7977c96241f49ad291ff0466970 "graphite: convert to gbuild", but for no apparent reason). Change-Id: I9986a6c5ec30a521095dbe5315e5ca649741a790
2017-02-21When building with clang-cl on Windows, build CLR code with MSVCStephan Bergmann
...as clang-cl doesn't support the /clr switch. * In configure.ac, capture the MSCV version (that would be used if CC hadn't been overridden to use clang-cl) into MSVC_CXX. * The logic which flags to pass into gb_CObject__command_pattern is coded into the platform-agnostic LinkTarget.mk, so it's too late to try and filter all relevant flags in com_GCC_class.mk, depending on whether a given .cxx file is a normal one built with the normal $CXX or a special /clr one built with $MSVC_CXX. Thus, a new CxxClrObject class had to be introduced that captures this information early. * When building with clang-cl, the generated config_host/config_*.h files contain values suitable for clang-cl, but not for MSVC. But the .cxx files compiled with MSVC happen to include config_global.h, and would fail. Hack around that problem for now by introducing a hard-coded, minimal solenv/clang-cl/config_global.h that is found first when buliding such a CxxClrObject. Needs cleaning-up properly. Change-Id: Iff8aac51c0b4fa906b14503c692640dda0996d33 Reviewed-on: https://gerrit.libreoffice.org/34509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-12-11Get rid of StaticLibrary_pdfimport_sStephan Bergmann
...which contained the bulk of .cxx files that should logically go into Library_pdfimport. It was likely (only) used so that check_targets CppunitTest_sdext_pdfimport, Executable_pdf2xml, and Executable_pdfunip could access the library's internals without exporting them. For the CppunitTest, use the standard gb_CppunitTest_use_library_objects hack instead. For the two Executables, make that _use_library_objects hack available for Executables, too. (It is a bit unclear whether those two Executables are really needed, they are only referenced from the dead dmake-based sdext/source/pdfimport/test/testdocs/makefile.mk and from vcl/README, respectively; but just keep them alive for now.) Change-Id: Ia2478508de216678be7a2302aba0c48f80de9d91 Reviewed-on: https://gerrit.libreoffice.org/20645 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2014-12-21Remove unused gb_*_disable_compiler_pluginsStephan Bergmann
Change-Id: Ia6395282916011d75a4fa01aa12e96d866621411
2014-12-18Introduce gb_*_set_external_codeStephan Bergmann
...to harmonize the mechanisms to not define LIBO_INTERNAL_ONLY for extension code and CppunitTest_odk_checkapi. (It also needs to revert any -Wundef, as the config_host/config_*.h files will not be included, so the HAVE_* macros will be undefined.) This obsoletes the need for RTL_DISABLE_FAST_STRING. Change-Id: If5eacba80c349efb90762aade8f2ea6d2db7e314
2014-09-15gbuild command for disabling usage of compiler plugins for a targetLuboš Luňák
to be used by odk/ checkapi test Change-Id: I6bbb508cc6950a63218e8e4f3364306c7c79b087
2014-06-09Revert "add missing dep on dir"David Tardon
This was a PEBKAC. The dep is already made in gb_Executable__Executable_impl. This reverts commit d14624c0f356035248983940b193ee71fc5c3c4a. Change-Id: I3342714422a3fd23d2d896773f4917130dbdc931
2014-06-08add missing dep on dirDavid Tardon
Change-Id: Ib10f30620027ad8a79a8464abee094e3961684d5
2014-02-13gbuild: improve error messages about missing registrationsMichael Stahl
Change-Id: Ib3c5d8f3921801f143447d8e01463905d80ac319
2013-11-04gbuild: remove error stubs for renamed/removed functionsMichael Stahl
Change-Id: If1d0d5294af87f2b780deadb21d12a6ee90dead6
2013-11-02gbuild: Executable: remove pointless indirection here tooMichael Stahl
gb_Executable__get_linktarget_target, gb_Executable_get_install_target and gb_Executable_get_install_target_for_build Change-Id: I1b0397c6982e885cd4834c2001264b1f6ae0a99c
2013-09-23Fixes for cross-compilation on OS X (to iOS)Tor Lillqvist
Introduce SDKDIRNAME as a configury variable and use it instead of the gbuild gb_Package_SDKDIRNAME. Then we can easily construct the SDKDIRNAME_FOR_BUILD variant that is needed to find the specially named SDK in instdir on OS X when cross-compiling. Move the version number section in configure.ac earlier. Change-Id: Iee3db1a50ad4c7a9f91bbc5e0d0b01d76a76f701
2013-09-23Try to fix cross-compilationTor Lillqvist
Add more FOO_FOR_BUILD variables and some gb_Foo_for_build functions. Get rid of gb_INSTROOT and gb_DEVINSTALLROOT, just use INSTROOT. Change-Id: Iee531b02d14fae41edb68ad589a5dec829a60255
2013-09-22gbuild: add consistent directory dependencies for LinkTargetsMichael Stahl
- StaticLibrary and CppunitTest have all files in one directory - Executable may have the executable itself in a different one - Library may have files in up to 3 directories ... so create 2 directories (which may be the same) in gb_LinkTarget_LinkTarget and a 3rd one in gb_Library__Library_impl. This allows to get rid of the "mkdir LinkTarget/pdb/..." thing in the header target rule, which was always ugly since it did not get rebuilt when deleting it (or whole LinkTarget dir) from workdir. Oh and the pattern dependency causes trouble: $(WORKDIR)/LinkTarget/% : $(call gb_LinkTarget_get_headers_target,%) ... for files in ExtensionLibrary; it would be possible to put ExtensionLibrary somewhere else of course but actually this pattern dependency is unnecessary since we get the same thing whenever any object is added to a link target and there shouldn't be link targets without objects anyway. Furthermore directory dependencies must be on the headers_target because MSVC will write a PDB file when compiling objects. Change-Id: Icd92e8768d6aafb094a4144f90165aa5ff233647
2013-09-22gbuild: remove executables from OUTDIR and WORKDIRMichael Stahl
Call and link executables directly in INSTDIR. - gb_Library_get_target is now same as the gb_LinkTarget_get_target - disable gb_Library_add_auxtarget, no auxtargets need to be copied - adjust paths of all external executables to OUTDIR_FOR_BUILD for now - use lazy assignment instead of := in AllLangResTarget because it's read before Executable - link.exe generates an import library for lots of executables because they export symbols, especially since commit 0ffab9363d527d55b12b9b09d7136ca1c9d171e0 "force 'main' to always be DLLPUBLIC." Change-Id: I3e1ee7425dd430bb83c7cd59e265869a0541b38d
2013-09-22odk: remove Package_bin, instead auto-install executablesMichael Stahl
This is somewhat annoying since it requires re-introducing stupid directories in scp2, but if the executables should be put in INSTDIR directly then the Package_bin needs to go. Change-Id: I893694c7f9d4cb5b9ef8ec4a3d30e08536223740
2013-09-22gbuild: remove libraries from OUTDIR and WORKDIRMichael Stahl
Refactor everything to find and link libraries directly in INSTDIR. - add gb_LinkTarget_get_linksearchpath_for_layer, and use it to set up -L paths for T_LDFLAGS in such a way that only allowed libraries can be linked against; i.e. it's not possible to link URE linktargets against OOO or not-installed libraries - gb_Library_get_target is now same as the gb_LinkTarget_get_target (TODO: this needs cleanup) - since a pattern rule won't work for linking libraries in INSTDIR, add a separate per-file rule for every INSTDIR lib - pattern rule can't find link target in the clean target any more so add a LINKTARGET variable - disable gb_Library_add_auxtarget, no auxtargets need to be copied - tweak the call to gb_Library_Library_platform to pass in a path in sdk/lib for the versioned URE libs - fix the Library clean target - add LAYER parameter to gb_LinkTarget_LinkTarget - adjust platform link commands - MSVC link command now uses explicit -manifestfile and -pdb parameters to keep misc. files out of INSTDIR - remove gb_Helper_OUTDIR_FOR_BUILDLIBDIR - adjust Extension, CppunitTest, JunitTest, PythonTest, Gallery, various CustomTargets to search INSTDIR - remove SDK library symlinks and import libs from odk/Package_lib - on Mac OS X, put .dylib symlinks into sdk/lib even though those are not packaged and would be created by the SDK configury; we need these to be somewhere for linking anyway - add a (unfortunately cyclic) dependency on Package ure_install to sal Change-Id: I70d88742f8c8232ad7b9521416275c67b64fe6cf
2013-09-22gbuild: refactor LinkTarget representationMichael Stahl
If the link targets are not in workdir then 2 different aspects are needed: the previously used location relative to workdir's LinkTarget dir (for all the misc. related targets), and the full target file. Adding an additional parameter to all LinkTarget functions would be quite annoying, especially since it would need passing through all the gb_LinkTarget__use functions in RepositoryExternal.mk; instead encode both into the linktarget itself, and modify the functions gb_LinkTarget_get_target to return the target and all others to return the workdir linktargetname. - replace gb_Library_get_linktargetname with either: * gb_Library__get_workdir_linktargetname * gb_Library__get_linktarget_target * gb_Library_get_linktarget - similar for gb_Executable_get_linktargetname - similar for gb_StaticLibrary_get_linktargetname - similar for gb_CppunitTest__get_linktargetname - add calls to gb_LinkTarget__get_workdir_linktargetname where needed Change-Id: I917ad7957fee50ec2517a9f9cc9ff452c8d97d1b
2013-09-11Towards a working instdir for Mac OS X: some LIBO_URE_BIN_FOLDER fixesStephan Bergmann
Change-Id: I0583136acd5d92101ad1a23392735ed76581c0b8
2013-09-11Towards a working instdir for Mac OS XStephan Bergmann
Introduced gb_INSTROOT, which is the same as $(INSTDIR) except for Mac OS X, where it is $(INSTDIR)/LibreOffice.app/Contents. Most stuff ends up there (so most occurrences of $(INSTDIR) have been replaced with $(gb_INSTROOT)), but SDK- related stuff goes to $(INSTDIR)/$(gb_Package_SDKDIRNAME). (And GeneratedPackage needed to be made more flexible, to allow for packages that go into either of those two places.) For Android and iOS, gb_INSTROOT probably still needs to be set. The most obvious missing thing yet to make instdir work for Mac OS X is the instdir/*/LibreOffice.app/Contents/ure/ vs. instdir/*/LibreOffice.app/Contents/ure-link/ split. Change-Id: I4478edd27b14c92c96d92d5169bdca3ec50d78f5
2013-09-09start to use instdir for subsequentcheck tests; avoid make dev-installMatúš Kukan
This commit breaks linkoo. make dev-install continues to work as before but it's not necessary to use it anymore. make check now uses files copied into instdir by gbuild. TODO: fix remaining issues so that instdir is the same as install/. Change-Id: I66836170f0922ee9ba204a61ffacc30d9e9a5d98
2013-09-09gbuild: avoid packages when copying files into instdirMatúš Kukan
There should be only two ways how to add file into instdir: - gb_Helper_install used in gbuild - gb_Package_set_outdir used also elsewhere, preferably with scp2 containing its .filelist. Change-Id: I75ec0ba63f32acf4b56b17dc972f4488edf6a777
2013-07-17remove gb_LinkTarget_add_noexception_objectBjoern Michaelsen
Change-Id: I44f7df6e5f816cfcf7a44c6c4c76e80924237d45 Reviewed-on: https://gerrit.libreoffice.org/4955 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2013-06-17do not copy executables into instdir yet (by default)Matúš Kukan
It causes some weird problems with solenv/bin/linkoo. Change-Id: Ic1613394ec3f0fe508ca813c2600f9bc5439dce7
2013-06-15gbuild: add gb_Helper_install and use it for ExecutablesMatúš Kukan
It's simpler than creating a package for every executable. Change-Id: I5f853ef2d5574b1a1c65232d1d09bc307c46f67e
2013-06-15gbuild: allow to use RepositoryFixes also for executablesMatúš Kukan
Helps to kill package in cpputools. And autoinstall uno executable. Change-Id: Ib1d546371ec8d2b06381d88eff98dbc5b70da400
2013-06-03re-base on ALv2 code. Includes:Michael Meeks
Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1397337 http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1396797 Patches contributed by Andre Fischer Fixed getcsym.awk to handle #-comments that contain special regexp chars. http://svn.apache.org/viewvc?view=revision&revision=1230971 118778: Added ADDITIONAL_REPOSITORIES environment variable and its automatic setup in configure. http://svn.apache.org/viewvc?view=revision&revision=1232004 118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Herbert Duerr #i119168# use generic LICENSE file for langpacks and sdks http://svn.apache.org/viewvc?view=revision&revision=1310178 macosxotoolhelper: need to quote perl regexp if it may contain regexp metachars http://svn.apache.org/viewvc?view=revision&revision=1183367 allow gbuild with empty sysroot on linux http://svn.apache.org/viewvc?view=revision&revision=1179186 Patches contributed by Ingo Schmidt native373: #164472# improvements for msi database http://svn.apache.org/viewvc?view=revision&revision=1167540 http://svn.apache.org/viewvc?view=revision&revision=1167539 Patches contributed by Jurgen Schmidt adapt setup package scripts to handle special DS_Store file for developer snapshot builds http://svn.apache.org/viewvc?view=revision&revision=1232430 imported patch extensions_i117681.patch http://svn.apache.org/viewvc?view=revision&revision=1172102 Patches contributed by Michael Stahl gbuild: RepositoryFixes.mk should be optional http://svn.apache.org/viewvc?view=revision&revision=1166123 xslt filter: remove the FLA horror wordml import filter: replace FLA usage with plain XSLT http://svn.apache.org/viewvc?view=revision&revision=1363727 Patch contributed by Oliver-Rainer Wittmann i#88652: applied patch, remove unicows deps http://svn.apache.org/viewvc?view=revision&revision=1177585 Remove lots of OS2 conditionals, re-extract Rhino Java, unwind cppunit pieces, cleanup Mac image bits, remove coin-mp and re-package lpsolve, Oxygen & Crystal, fixup qstart bits, expand MPLv2 subset checking. Change-Id: Iad5c8a76399620b892671633c0d8c29996db3564
2013-05-24gbuild: simplify reg. of targets for PostprocessDavid Tardon
Change-Id: Id184df89c5c15c55e42f376ed06c83174c486f67
2013-05-01the internal packages should not be registeredDavid Tardon
Change-Id: I83f4c55582d1ff8ec6b468776090b453c4f85b89
2013-04-28gbuild: copy executables into $(INSTDIR)David Tardon
Change-Id: I88f6327c12fa2b782aa5c82e5891006713348477
2013-03-13more subtle dependencies for cross-compilationMatúš Kukan
Now we build only what we really need for 'build' platform - there is new build-tools make target. The list of tools is in solenv/gbuild/extensions/pre_BuildTools.mk. Also similar is done to some extent for 'host' platform using gb_Module_add_targets_for_build which is ignored for 'host'. Change-Id: I6acd1762b16aca366aac1a0688500f27869cfca2
2013-03-03use pattern rule for PostprocessDavid Tardon
Change-Id: Ib8d2ddb2efaef26a0a2aba36e9e1c67b1fb019d7
2013-02-26move postprocess to gbuildBjoern Michaelsen
the gb_Postprocess* foo could also be in gb_Module* as it is conceptionally close ('do things globally/productwide'). OTOH I see no obvious reason for e.g. signing not to be done right along with building a lib/executable anyway instead of in postprocess. The same is likely true for the other stuff too. Change-Id: I9c8f569564c056643af7ca39bfe038ed228dcd3d Reviewed-on: https://gerrit.libreoffice.org/2426 Reviewed-by: Matúš Kukan <matus.kukan@gmail.com> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-02-25Last use of obsolete gb_*_add_api is long goneStephan Bergmann
Change-Id: Ia6c938ef0e45ec86c0c202e95ef28d49fccd3497
2012-12-31I did not want to push that...David Tardon
It does not work, anyway. This reverts commit ee18b30b0391a443a51d7b97060f118478c202af. Change-Id: Ibe21a2a62ecbfaf8dcd87113bde386050ffde25a
2012-12-31always set library pathDavid Tardon
Change-Id: Ie3248563815c2558c573e525e79024ef083345b7
2012-12-31move gb_Executable_get_command back into Executable.mkDavid Tardon
Change-Id: Ia556cbfda5c5c3d9e1b2b7b1f488b079ce420367
2012-12-30these functions must be defined earlyDavid Tardon
... because their result is assigned to variables in various gbuild classes. Change-Id: I07c0fc54e10ddd76a6246ac4e9ed56541c9c1257
2012-12-30allow setting runtime deps of executables in one placeDavid Tardon
Change-Id: I325287cba773df848a8797486c149502abae9c9d
2012-12-10userfriendly make targets for build and cleanLuboš Luňák
So that now it's possible to do just 'make CppunitTest_sw_macros_test' instead of 'make /home/llunak/build/src/l2/workdir/unxlngx6/CppunitTest/sw_macros_test.test' Change-Id: Ibd1e9ef4fc825043a71bd669b2f5c37ffec68e33 Reviewed-on: https://gerrit.libreoffice.org/1253 Reviewed-by: Peter Foley <jpfoley2@gmail.com> Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de> Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
2012-12-10rename to gb_Library_set_precompiled_headerLuboš Luňák
There can be only one precompiled header with some compilers anyway. Change-Id: I59e84bee2f57f36753b59b7518d701573affac12
2012-12-10bring back precompiled headers supportLuboš Luňák
This is mostly a revert of 992757cc5ebfb1df42636b8d3269cdbc10fc4148 and bc78ac68c2492e63a680f68b524c4a51179ea83e, with tweaks to apply. Also only MSVC support for now. Change-Id: Ia926b3c28125b52012156ccfd47932837b09d20a
2012-10-23gbuild: fix AUXTARGETS:Michael Stahl
This finally blew up spectacularly on Windows because we now have packages delivering external libraries to the solver, where the libraries are not defined by Library class, which leads to accidental inheritance of AUXTARGETS variable and failure to deliver nonexistent UnpackedTarball/.../libpq/postgresql-sdbc-impl.uno.dll Remove the custom deliver rule that uses AUXTARGETS, and instead let those files be handled individually by default Package.mk rules. This requires a dummy touch rule for each file, and unfortunately a pattern rule cannot be used here because of silly naming differences between implibs and dlls on Windows... AUXTARGETS do not cause problems for clean targets because there is no interdependency there, so keep them there. Change-Id: I2138f635334ff4517a2d31ef91cfd03a46745fd6