Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-05-05 11:33:25


On Wednesday 30 April 2008 03:20:19 Jurko Gospodnetić wrote:
> Hi all.
>
> I am attaching a patch and a regression test related to making Boost
> Jam handle Windows short file names correctly.
>
> ----------------------
> Description:
> ----------------------
> Fixed a bug causing Boost Jam not to handle target file names
> specified as both short and long file names correctly. Bug fixed by
> making bindtarget() function map names to TARGETs by using their long
> file names.
>
> When scanning directories and creating a list of all their content
> (filent.c) it would identify all the located files and folders using
> their long file names. On the other hand, referencing a target using its
> short file name inside a Jam script caused Boost Jam to reference those
> files twice using two separate TARGET structures - one identified using
> the file's short name and one using the file's long name.
>
> One bad example was the MkDir which would always attempt to create a
> folder identified by its short name even if that folder already existed
> (due to the NOUPDATE rule getting applied on the incorrect TARGET).
>
> ----------------------
>
> The change does not affect targets whose names do not represent
> existing file names.
>
> Also, it seems to me that the short_path_to_long_path() call in
> file_dirscan() in the filent.c module should most likely be moved to
> file_info() in the filesys.c module. This would make mapping file names
> to file_info_t & TARGET structures consistent. However, I have not done
> this in this patch just to make the patch as minimal as possible.
>
> Attached tests have been disabled (do nothing) on non Windows platforms.
>
> Could someone please review this and let me know if I can go ahead
> and commit?

Oh, a couple of pages of tests, and three lines of code change. I like this!

I think this patch is fine to go in, thanks!

- Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk