Gmane
From: Jürgen Hunold <hunold+lists.Boost <at> ive.uni-hannover.de>
Subject: [V2] Patch for msvc.jam
Newsgroups: gmane.comp.lib.boost.build
Date: 2003-11-13 10:52:30 GMT (5 years, 33 weeks, 2 days, 13 hours and 54 minutes ago)

Hi !

The attached patch ports the V1 linking semantics to V2.
Short description: Instead of "updating" an existing lib, throw it away 
and do a clean rebuild.

Rationale:
msvc link.exe hardcodes the path to the object files into the .lib file.
This is necessary for resolving paths to .obj and .cpp files when 
debugging, I think. This itself is a Good Thing, because I don't 
need .vcproj files for debugging anymore. Cool.

Problems occur when the path to the object file changes.
Most of  my projects have the folling layout:
build
src/lib1
src/lib2
src/app

where src/Jamfile contains "default-build ../build ;" 

When I do some editing in src/lib1 and rebuild lib1from this directory, 
I get a canonical Path of ../../build/lib1/bin/≤generated>. Hardcoded 
into lib1. 
Everything works fine, except I get (simply annoying)
"replacing file xyz.obj" when linking. This makes it difficult to follow 
the build process.

When I build from src/Jamfile, all paths start with
../build/lib1/bin/≤generated>.
link.exe now thinks that ../build and ../../build are different and all 
hell breaks loose. This can lead to object files not being replaced and 
therefore to an inconsistent library. 

I think it's best to follow V1 and simply do a "delete and rebuild from 
scratch".

Oh, the patch removes some extra whitespace, too. Feel free to skip 
this. ;-))

Yours,

Jürgen
-- 
* Dipl.-Math. Jürgen Hunold  ! Institut für Verkehrswesen, Eisenbahnbau
* voice: ++49 511 762-2529   ! und -betrieb, Universität Hannover  
* fax  : ++49 511 762-3001   ! Appelstrasse 9a, D-30167 Hannover
* hunold <at> ive.uni-hannover.de ! www.ive.uni-hannover.de
Attachment (msvc.jam.diff): text/x-diff, 951 bytes