477147f...
by
Michael Stahl <email address hidden>
gbuild: add consistent directory dependencies for LinkTargets
- 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.
... 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.
48e7fbe...
by
Michael Stahl <email address hidden>
gbuild: clean up naming of PDB files for MSVC
There are 2 of these, one is written to by cl.exe and read by link.exe
and the second one written by link.exe. Name the second one as the
linktargetname with .pdb appended, no need to substitue 5 different
crazy suffixes.
f1d9c69...
by
Michael Stahl <email address hidden>
find lots of external static libraries in UnpackedTarball dir
Note: do NOT put file paths to static libraries into FOO_LIBS variables
that are passed to bundled externals that are built with --enable-static:
on Mac OS X this will result in .a archives that contain other .a
archives as entries, and trying to link those results in errors like:
ld: warning: ignoring file .../libodfgen-0.0.a, file was built for
archive which is not the architecture being linked (i386)
5547d0c...
by
Michael Stahl <email address hidden>
gbuild: rename LinkTarget variable LIBS
LIBS is apparently used by autotools build system and passed to
configure at least in mythes and hunspell, where the LinkTarget variable
could cause problems by inheritance.
9160719...
by
Michael Stahl <email address hidden>
gbuild: change linking order on ELF platforms
If there are static libraries in $(LIBS) then things get really annoying
if they depend on other static libs that are StaticLibraries, e.g. orcus
and boost_system. So reorder this to include $(LIBS) in the --start-group
--end-group and hope that doesn't break anything.
Hopefully $(LIBS) does not need -Wl$(COMMA)--no-as-needed, that should
only be required for $(LINKEDLIBS).