2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 12:42:11 +00:00
Commit Graph

540 Commits

Author SHA1 Message Date
Jurko Gospodnetić
62cd6929b4 Minor stylistic Boost Jam & Boost Build module changes.
[SVN r48301]
2008-08-23 03:12:27 +00:00
Jurko Gospodnetić
a7aec314cb Added Boost Jam support for executing command lines longer than 2047 characters (up to 8191) characters when running on Windows XP or later OS version. Patch contributed by Franz Schnyder.
See http://support.microsoft.com/default.aspx?scid=kb;en-us;830473 for more detailed information on Windows cmd.exe shell command-line length limitations.

[SVN r47913]
2008-07-31 17:41:40 +00:00
Jurko Gospodnetić
489682cc4a Fixed a Boost Jam bug on Windows causing its SHELL command not to work correctly with some commands containing quotes. Caused by a 'funny feature' in the Windows popen() implementation causing it to remove external quotes in some cases similar to how the Windows cmd.exe shell command interpreter does it.
[SVN r46106]
2008-06-03 23:44:23 +00:00
Jurko Gospodnetić
c0a697600f Corrected a potential memory leak in Boost Jam's builtin_shell() function that would appear should Boost Jam ever start to release its allocated string objects. Minor stylistic changes.
[SVN r46105]
2008-06-03 23:23:49 +00:00
Jurko Gospodnetić
2ddff3daba Made all Boost Jam's ECHO commands automatically flush the standard output to make that output more promptly displayed to the user.
[SVN r46104]
2008-06-03 23:19:58 +00:00
Jurko Gospodnetić
26923f6d45 Corrected the comment in src/build.bat to list all the currently supported toolsets when building Boost Jam.
[SVN r46103]
2008-06-03 23:16:33 +00:00
K. Noel Belcourt
2f46c0abcb Change execunix.c to always use fork() instead of
vfork() on the Mac.  This works around known issues
with bjam on PPC under Tiger and a problem reported
by Rene with bjam on x86 under Leopard.

A future revision will change execvp() use to execve()
to enable the Mac to once again use the more efficient
vfork() on the Mac.



[SVN r45956]
2008-05-30 16:22:39 +00:00
Jurko Gospodnetić
aa6e09d93d Corrected a bug in Boost Jam's base Jambase script causing it to trim the error message displayed when its boost-build rule gets called multiple times.
[SVN r45660]
2008-05-22 15:50:28 +00:00
Jurko Gospodnetić
0c99cb166a Minor stylistic changes made to Boost Jam's base Jambase script. Mainly trimmed trailing spaces and wrapped comments at 80 lines.
[SVN r45659]
2008-05-22 15:49:01 +00:00
Jurko Gospodnetić
4811e221e1 Minor stylistic changes made to Boost Jam's base Jambase script. Mainly trimmed trailing spaces and wrapped comments at 80 lines.
[SVN r45658]
2008-05-22 15:47:38 +00:00
Vladimir Prus
a5598a1abf When importing from Python into an module with empty string as name,
import into root module.


[SVN r45603]
2008-05-21 12:00:06 +00:00
Jurko Gospodnetić
f6e31ac68e Patch for the NORMALIZE_PATH builtin Boost Jam rule as well as an appropriate update for the path.jam Boost Build module where that rule was being used to implement path.join and related operations.
As it was written before the rule had 'random' behavior in some borderline cases such as: not passing it a parameter, passing it a folder whose path starts with one or two backslashes (as opposed to slashes) or passing it an invalid rooted path with enough '..' path elements to take it 'before the root path'. In those cases it would cause an access violation, 'incorrectly' un-root the path (i.e. remove the leading slash) or simply remove a 'random' path modification respectively. Also the rule is now more tiny bit more efficient and much better documented.

  Invalid rooted paths with enough '..' path elements to take them 'before the root path' are now recognized and an empty list is returned.

  Due to this rule having such 'messy' behavior the path.join rule and its user make-NT rule had some twisted logic in them to work around all the problems this caused. This patch invalidates the logic in question and replaces it with a much simpler one (detailed comments added).

  Other NORMALIZE_PATH callers should not be affected since both the old and the new version work the same on 'regular' paths (i.e. those not mentioned above).

  The new functionality for recognizing Boost Jam versions has been used to make Boost Build scripts use the old path functionality when using Boost Jam older than 3.1.17 and use the new functionality otherwise. As consequence, now anyone using the trunk version of Boost Build and an older 3.1.17 version of Boost.Jam will need to recompile their Boost Jam executable.

  The patch does not cause any Boost Build or Boost Jam tests to fail.

  Added a related NORMALIZE_PATH Boost Jam test. Note that this test causes Boost Jam versions built prior to this patch to crash (access violation).

  Added additional internal Boost Build tests for the path.jam module testing how it handles some invalid Windows paths.


[SVN r45158]
2008-05-05 22:37:19 +00:00
Jurko Gospodnetić
84a9f25f9f 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.

  Prepared tests have been do nothing on non Windows platforms.


[SVN r45144]
2008-05-05 15:52:56 +00:00
Jurko Gospodnetić
80ce6cfa53 Minor stylistic changes preparing for a more substantial patch without cluttering it with this.
[SVN r45105]
2008-05-04 03:19:19 +00:00
Jurko Gospodnetić
3ee59de995 Typo corrections & minor stylistic comment changes.
[SVN r44900]
2008-04-29 22:49:36 +00:00
Roland Schwarz
3423e10887 relaxed test, ignoring case of drive letter.
Thanks to Mat Marcus for the fix.

[SVN r44551]
2008-04-18 18:11:03 +00:00
Jurko Gospodnetić
1b601354c0 Implemented a patch contributed by Igor Nazarenko reimplementing the list_sort() function to use a C qsort() function instead of a hand-crafted merge-sort algorithm. Makes some list sortings (e.g. 1,2,1,2,1,2,1,2,...) extremely faster, in turn significantly speeding up some project builds.
[SVN r44195]
2008-04-11 21:03:06 +00:00
Jurko Gospodnetić
d7407a9ee1 Fixed a bug with bjam not handling the '\' root Windows path correctly without its drive letter being specified. One effect could be seen by MkDir rule on such a path always attempting to create its base folder even if that folder already exists. For example if you attempted to create folder '\Projects\XYZ\BuildDir' it would incorrectly think that '\Projects' folder does not exist and attempt to create it - thus causing the whole build to fail due to the underlying OS mkdir command failing.
This was caused by the file_dirscan() function in the filent.c module not working correctly when passed '\' as its dir. It then messed up when formatting its file-selection parameter for the _findfirst()/findfirst() API and constructed it as '\/*' which caused that API to fail and return -1 which was in turn being interpreted as 'file not found'.


[SVN r44088]
2008-04-07 10:32:09 +00:00
Jurko Gospodnetić
556474bbb2 Solved the problem with child process returning the value 259 (Windows constant STILL_ACTIVE) causing bjam never to detect that it exited and therefore keep running in an endless loop. Done by relying on the Windows WaitForMultipleObjects() function to detect when a process has exited instead of GetExitCodeProcess(). The later function's MSDN article (http://msdn2.microsoft.com/en-us/library/ms683189(VS.85).aspx) warns about this problem.
Solved the problem with bjam going into an active wait state, hogging up processor resources, when waiting for one of its child processes to terminate while not all of its available child process slots are being used. To see this bug in action, try compiling a simple C++ program on a 2 processor PC with the -j 2 command-line option and watching how much processor resources bjam uses while linking. Was caused by treating unused process slots as used in the try_wait() function, causing the WaitForMultipleObjects() Windows API call to exit instantly with an error which was then getting incorrectly interpreted as a timeout, starting the whole cycle anew.

  Solved a race condition between bjam's output reading/child process termination detection and the child process's output generation/termination which could have caused bjam not to collect the terminated process's final output.

  Extracted all GetExitCodeProcess() API calls into one location so it no longer gets called in three separate places.

  Minor comment changes in code touched by previous fixes.


[SVN r44087]
2008-04-07 09:55:18 +00:00
K. Noel Belcourt
23aa013e45 Force PPC Darwin to use fork instead of vfork. This change
requires both the parent and child process to explicitly set
the process group id. Vfork guarantees the child process 
runs to the exec before it releases the parent process.  
Now that we use fork instead of vfork, it's possible for the 
parent to wait on the child process without having the child 
setpgid on itself.  This eliminates spurious hangs on ppc
darwin caused by either a race condition between vfork and
execvp, or a bug in the vfork implementation.

Added a test to ensure we don't try to read from the
stderr pipe descriptor if the descriptor's not valid.



[SVN r43176]
2008-02-08 16:32:35 +00:00
Jurko Gospodnetić
e8237dea5d Added the missing end-of-line character when outputting DEBUG_SEARCH debug messages from file_build1(). This cleans up the -d+6 bjam output a lot.
[SVN r43046]
2008-02-01 01:49:16 +00:00
Rene Rivera
6f12bd5e02 Revert various changes that break backward compatibility, and also some minor edits.
[SVN r42632]
2008-01-09 04:31:58 +00:00
Jurko Gospodnetić
a243eaa91c Updated the __ACTION_RULE__ to not return its action command output as a single string but instead split it into a list of output lines. This allows Jam code using this output to work correctly independently of what newline character combinations are in use. This was causing problems with Boost Build unit tests which can now be updated to pass.
Consequences & checks:
  * Final __ACTION_RULE__ rule parameter has changed from output ? to output-lines *.
  * Updated corresponding Jam documentation.
  * Updated the all related Boost Build code.
  * No code on the Boost trunk uses this rule except for Boost Build itself.


[SVN r42629]
2008-01-09 04:05:29 +00:00
Jurko Gospodnetić
d78c27ff9a Remove trailing spaces. Removed an empty line.
[SVN r42628]
2008-01-09 01:18:38 +00:00
Jurko Gospodnetić
8ffe82aaaa Tried trailing spaces. Minor comment typo corrections.
[SVN r42627]
2008-01-09 01:11:03 +00:00
Jurko Gospodnetić
379a177ec5 Minor stylistic code indentation changes.
[SVN r42626]
2008-01-09 01:09:26 +00:00
Jurko Gospodnetić
0ecead741e Comment correction.
[SVN r42617]
2008-01-08 17:51:30 +00:00
Jurko Gospodnetić
6bb216cf1a Comment cleanup.
[SVN r42496]
2008-01-05 20:14:48 +00:00
Jurko Gospodnetić
0c58c9ae6b Minor stylistic changes such as: comment typo corrections, wrapping lines to 80 characters, indentations, removing trailing spaces, etc.
[SVN r42494]
2008-01-05 20:02:24 +00:00
Jurko Gospodnetić
9c6f90696b Removed trailing spaces and some empty lines.
[SVN r42492]
2008-01-05 18:29:36 +00:00
Vladimir Prus
b34c3d8fa0 Implement ISFILE for real
[SVN r41980]
2007-12-11 19:45:37 +00:00
Rene Rivera
f7ca3fdfaf Bump bjam to 3.1.17 after 3.1.16 release.
[SVN r41629]
2007-12-03 04:05:39 +00:00
Rene Rivera
7e35e8c18a Work around some Windows CMD.EXE programs that will fail executing a totally empty batch file.
[SVN r41626]
2007-12-03 02:57:49 +00:00
Rene Rivera
d7f47dd8e2 Add support for detection and building with vc9. (fixes #1490)
[SVN r41548]
2007-12-01 20:17:52 +00:00
Rene Rivera
e2ae7d0a18 Plug memory leak when closing out actions. Thanks to Martin Kortmann for finding this.
[SVN r41535]
2007-12-01 16:44:54 +00:00
Rene Rivera
000431fdc1 build-system.jam
* Reflect added start/end timestamps for actions in xml output. And update action rules for new args.

execcmd.h
* Add start/end timestamps to action timing info.

execnt.c
* Fix filetime_seconds calculation when time is larger than low 32 bit value.
* Add calc of C time_t from Windows FILETIME.
* Add start/end timestamps recording to action timing info.

execunix.c
* Add start/end timestamps recording to action timing info.

jam.c
* Change JAMDATE to use common ISO date format.

make1.c
* Redo __TIMING_RULE__ and __ACTION__RULE__ invocations to new argument ordering and added end/result timestamp values.

[SVN r41431]
2007-11-28 07:21:49 +00:00
Rene Rivera
3f53335fe0 Fix buffer overrun bug in expanding @() subexpressions.
[SVN r41417]
2007-11-27 17:58:50 +00:00
Rene Rivera
4e7c391043 Check empty string invariants, instead of assuming all strings are allocated. And reset strings when they are freed.
[SVN r41416]
2007-11-27 17:57:15 +00:00
Rene Rivera
d8094040a6 Add some utility output formatting functions.
[SVN r41415]
2007-11-27 17:55:13 +00:00
Rene Rivera
f33adc78fc Remove non-existent option info.
[SVN r41414]
2007-11-27 17:53:56 +00:00
Boris Gubenko
f2da9cc8a9 add OSPLAT=PARISC for HP-UX PA-RISC
[SVN r41242]
2007-11-19 19:25:21 +00:00
Rene Rivera
b6585b5e14 Make quietly actions really quiet by not printing the command output. The output for the quietly actions is still available through "__ACTION_RULE__".
[SVN r41236]
2007-11-19 17:44:31 +00:00
Rene Rivera
51fbf5b137 Switch intel-win32 to use static multi thread runtime since the single thread static runtime is no longer available. (fixes #1287)
[SVN r41113]
2007-11-15 18:56:43 +00:00
Boris Gubenko
5b1455512d when setting OSPLAT, check __ia64 macro
[SVN r41050]
2007-11-13 00:51:37 +00:00
K. Noel Belcourt
08e879a007 Get the unix timing working correctly.
[SVN r41048]
2007-11-12 22:52:12 +00:00
Boris Gubenko
1aaa0782f4 add -fno-strict-aliasing to compilation with gcc
[SVN r41036]
2007-11-12 17:03:38 +00:00
Vladimir Prus
d5fbab60f8 New Python rule -- 'backtrace'.
[SVN r40497]
2007-10-27 09:55:58 +00:00
Vladimir Prus
165534e07e Add missing Py_INCREF on Py_None objects.
[SVN r40289]
2007-10-22 16:45:49 +00:00
Rene Rivera
f626fa511a Allow specifying options with quotes, i.e. "--with-python=xyz", to work around the CMD shell using "=" as an argument separator.
[SVN r40095]
2007-10-16 19:08:58 +00:00
Vladimir Prus
cb7f29fcd3 Better diagnostics when trying to import non-callable Python
object to Jam.


[SVN r40006]
2007-10-14 09:09:41 +00:00