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

898 Commits

Author SHA1 Message Date
Jurko Gospodnetić
a2413be235 Restored old Boost Jam '-v' version information screen to what it was like before revision [79779] as requested by Steven Watanabe. Boost Jam now reports its minimum supported path modification timestamp resolution using a new builtin JAM_TIMESTAMP_RESOLUTION variable. Updated Boost Build's internal testing system to correctly fetch this Boost Jam version information.
[SVN r79880]
2012-08-05 18:31:19 +00:00
Steven Watanabe
5b1cbbd531 Fix mode for mkdir.
[SVN r79852]
2012-08-02 15:19:18 +00:00
Jurko Gospodnetić
f4e7f9a811 Minor stylistic changes (added const modifiers in a couple of places).
[SVN r79842]
2012-08-02 09:16:34 +00:00
Jurko Gospodnetić
103f8d7893 Updated Boost Jam to know how to report its minimum supported file modification timestamp resolution (currently reported as part of Boost Jam's version information). This allows external tools using Boost Jam to adapt to Boost Jam's potential ignorance of fine file modification timestamp changes.
For example, Boost Build's internal testing framework may use this information to reduce the time it spends doing nothing by sleeping until enough time passes to make newly created or touched files be correctly recognized by Boost Build.

[SVN r79780]
2012-07-28 09:20:29 +00:00
Jurko Gospodnetić
f7316995e6 Boost Jam version information output cleaned up a bit to make it easier to update it with additional information.
[SVN r79779]
2012-07-28 09:04:41 +00:00
Jurko Gospodnetić
b28fc465c3 Boost Jam code cleanup - minor stylistic changes.
[SVN r79778]
2012-07-28 08:58:39 +00:00
Jurko Gospodnetić
a3a1170ec1 Boost Jam cleanup - minor stylistic changes.
[SVN r79693]
2012-07-23 09:02:49 +00:00
Jurko Gospodnetić
f9f7b0204e Updated the Windows Boost Build implementation to use direct Windows APIs instead of the Windows POSIX layer & standard C library functionality for collecting information about files. Now returns file timestamps with much better precision than 1 second.
[SVN r79691]
2012-07-23 07:26:02 +00:00
Jurko Gospodnetić
344d758e94 Boost Jam cleanup - removed internal file size tracking. The data was being collected but never actually used and did not support file sizes larger than can fit in a 32 bit integer.
[SVN r79677]
2012-07-22 16:52:53 +00:00
Jurko Gospodnetić
28200e7f97 Boost Jam cleanup - minor comment corrections.
[SVN r79675]
2012-07-22 16:10:36 +00:00
Jurko Gospodnetić
64494521bf Boost Jam cleanup - removed defective header parsing code seemingly intended for stripping trailing newline characters from read lines. This code has never done anything since it was originally added so there seems no reason to 'fix' it to do what it 'seems to have been intended to do'.
[SVN r79674]
2012-07-22 16:05:58 +00:00
Jurko Gospodnetić
fde452f38f Boost Jam cleanup - minor stylistic changes.
[SVN r79673]
2012-07-22 15:43:04 +00:00
Jurko Gospodnetić
35f4195ec7 Boost Jam cleanup - cleaned up some header includes, minor stylistic changes.
[SVN r79672]
2012-07-22 14:53:50 +00:00
Jurko Gospodnetić
89f740660f Boost Jam/Build code cleanup - minor stylistic changes.
[SVN r79620]
2012-07-20 14:20:55 +00:00
Jurko Gospodnetić
bae5e920ac Boost Jam code cleanup - removed an old, untested and up to recently definitely non-compiling 'old Borland compiler' code branch in the filent.c module. The compilers in question themselves are Borlands free compiler tools predating the more modern and more standard compliant free 'Visual Studio Express' toolchain so there should be no need for anyone to depend on them any more.
[SVN r79618]
2012-07-20 10:57:31 +00:00
Jurko Gospodnetić
4e711ebd44 Minor stylistic change.
[SVN r79593]
2012-07-19 02:58:55 +00:00
Jurko Gospodnetić
681b6609af Boost Jam code cleanup - minor stylistic changes (added missing spaces around some parameters inside brackets in C code).
[SVN r79587]
2012-07-18 15:06:44 +00:00
Jurko Gospodnetić
cbb48b5d01 Updated Boost Jam implementation comment related to it adding internal fake INCLUDES relationships between targets built by a single action in order to make sure none of them may get used until their action had successfully completed its work.
[SVN r79586]
2012-07-18 14:50:53 +00:00
Jurko Gospodnetić
35883dacc0 Boost Build build bug corrected when compiling using old Borland compilers. This has been in for a long time and has been noticed only as part of a quick code review. It could be there is no need to support this 'old Borland compilers' code branch.
[SVN r79585]
2012-07-18 14:27:22 +00:00
Jurko Gospodnetić
58beabb9dc Boost Jam code cleanup - moved code for creating new internal include targets into a single location (rules.c module) instead of having it done in two (rules.c & builtins.c modules).
[SVN r79584]
2012-07-18 14:24:19 +00:00
Jurko Gospodnetić
c16ae1c68a Boost Jam/Build cleanup - minor stylistic changes (comment updates; line wrapping; removed some dead/unused function declarations, parameters & code; declared variables as const; reordered some #include directives alphabetically, removed some unnecessary ones and added several missing ones discovered by the reordering).
[SVN r79569]
2012-07-17 08:56:49 +00:00
Jurko Gospodnetić
145ce56f80 Windows Boost Jam implementation now uses finer resolution than 1 second when creating timestamps based on the current system time. Since these are never (and should never be!) compared to file system timestamps - this causes no conflicts with file system timestamps still using 1 second resolution at best.
Related stylistic changes:
  - filetime_to_timestamp() function renamed to timestamp_from_filetime() and moved to the timestamp.c module.
  - filetime_to_seconds() function moved back to the execnt.c module as a static function as it only used from there after the timestamp_from_filetime() reimplementation in revision [79494].
  - filent.h header now empty and removed.

[SVN r79511]
2012-07-14 18:55:06 +00:00
Jurko Gospodnetić
c2858c8b5d Boost Jam code cleanup - extracted code for getting a timestamp for the current system time to timestamp_current().
[SVN r79507]
2012-07-14 17:28:50 +00:00
Jurko Gospodnetić
e548f836d9 Boost Jam's internal timestamp data structure now holds a member for nanosecond information. This information is still always set to 0 but, if set, is used when needed. Updated Boost Jam's header cache file format to hold the new extended timestamp information (bumped format version up to 5).
[SVN r79506]
2012-07-14 17:17:09 +00:00
Jurko Gospodnetić
f18abd8674 Boost Jam now reports its timestamps using a bit more complete format (still ISO-8601 compliant) to include nanosecond information. The new format is 'YYYY-MM-DD HH:MM:SS.ZZZZZZZZZ +0000'. Currently the nanosecond part value is always 0.
[SVN r79502]
2012-07-14 16:36:56 +00:00
Jurko Gospodnetić
3736a64fd6 Boost Jam code cleanup - wrapped up timestamp values inside a timstamp structure instead of using a raw time_t value as another preparation step towards implementing support for timestamps with resolution finer than 1 second. All timestamp manipulation now done using the new timestamp_XXX() API.
File timestamps displayed with -d+3 debug output now presented in UTC (+0000) timezone.

Other related minor stylistic changes:
  - timestamp_from_target() renamed to timestamp_from_path()
  - timestamp_from_target() parameter order switched
  - comment updates
  - added some const function parameter modifiers
  - some header #include directives reordered alphabetically

[SVN r79501]
2012-07-14 16:11:16 +00:00
Jurko Gospodnetić
8202d97670 Boost Jam code cleanup - extracted Windows specific FILETIME structure conversion functions from execnt.c to a lowel level filent.c Windows specific module so they may be reused in both. Renamed the functions to make their purpose clearer.
[SVN r79497]
2012-07-14 13:23:45 +00:00
Jurko Gospodnetić
eb8c859a26 Boost Jam execnt.c module code cleanup. No longer attempts to perform some operations like closing alert windows or reading their output (before the code depended on some operations not doing anything if given invalid handles or process ids). No longer needs to find out the process id from a process handle (since it actually already had these process ids all along), thus avoiding hacks needed to support this on Windows versions prior to Windows XP SP1 (where there was no GetProcessId() Windows API). Minor stylistic changes.
[SVN r79496]
2012-07-14 13:10:00 +00:00
Jurko Gospodnetić
fe47abe424 Boost Jam code cleanup - removed a redundant #include directive.
[SVN r79495]
2012-07-14 11:49:52 +00:00
Jurko Gospodnetić
8e716991c8 Corrected Boost Jam's Windows FILETIME to POSIX time_t conversion. New implementation lifted shamelessly from the CPython implementation. The old implementation did not work correctly in all cases depending on the user's regional (timezone & daylight saving time) settings as well as the TZ environment variable (affects some C runtime library routines). It also used the double type to represent some interim values during its calculation - sometimes causing off-by-one rounding errors.
[SVN r79494]
2012-07-14 11:42:58 +00:00
Jurko Gospodnetić
743cc7ed4b Boost Jam code cleanup - minor stylistic code changes & comment updates.
[SVN r79493]
2012-07-14 11:35:29 +00:00
Jurko Gospodnetić
0a656de095 Boost Jam code cleanup - cleaned up the timestamp.c module identifiers and better commented its functions.
[SVN r79489]
2012-07-13 23:14:40 +00:00
Jurko Gospodnetić
fb8fb8317e Boost Jam code cleanup - minor stylistic code changes & comment updates.
[SVN r79488]
2012-07-13 23:11:45 +00:00
Jurko Gospodnetić
d7cf40907c Reverted accidental commit in revision 79486.
[SVN r79487]
2012-07-13 23:09:58 +00:00
Jurko Gospodnetić
ada97b6599 Boost Jam code cleanup - minor stylistic code changes & comment updates.
[SVN r79486]
2012-07-13 22:48:58 +00:00
Jurko Gospodnetić
b9fa41fecd Boost Jam code cleanup - minor stylistic changes.
[SVN r79483]
2012-07-13 20:15:00 +00:00
Jurko Gospodnetić
f0a27a9473 Minor stylistic changes.
[SVN r79472]
2012-07-13 16:42:25 +00:00
Steven Watanabe
8c067504b8 Make annoying unconditional hcache message only appear with DEBUG_HEADER.
[SVN r79464]
2012-07-13 01:53:46 +00:00
Jurko Gospodnetić
8bef878ab5 Boost Jam cleanup - minor stylistic changes.
[SVN r79450]
2012-07-12 13:36:31 +00:00
Jurko Gospodnetić
9905deabee Fixed a Boost Jam error reporting bug where it would report the error as originating from an incorrect file & line in case the error occurred after parsing the final token in some file. It usually reported it as the file including the file in question or, if the file is the main project build script not included from anywhere, then it reported the error as originating from file '(builtin)' and line -1. Added a related internal Boost Build unit test (core_source_line_tracking.py).
[SVN r79449]
2012-07-12 13:21:46 +00:00
Jurko Gospodnetić
91e29f3735 Boost Jam code cleanup - minor stylistic changes.
[SVN r79442]
2012-07-12 10:28:58 +00:00
Jurko Gospodnetić
9425ca14b9 Booat Jam code cleanup - synchronized filent.c & fileunix.c OS specific implementation modules. Extracted shared functionality to filesys.c. Updated related descriptive function & module comments. Added missing copyright comment for the filesys.c module.
[SVN r79429]
2012-07-11 21:42:51 +00:00
Jurko Gospodnetić
975cc49106 Boost Jam code cleanup - minor stylistic changes.
[SVN r79415]
2012-07-11 15:16:11 +00:00
Jurko Gospodnetić
e70c45c3e5 Boost Jam code cleanup - minor stylistic changes.
[SVN r79414]
2012-07-11 14:50:49 +00:00
Jurko Gospodnetić
3b80184839 Cleaned up the main Boost Jam build state machine. MAKE1ATAIL state integrated into MAKE1A, MAKE1D state removed since it was doing nothing but morphing itself to MAKE1C and the main state structure no longer needs to contain extra MAKE1D state specific information. Cleaned up and updated related state description comments. Added a related missing #include directive in the make.h header caught by the make1.c module cleanup. Minor stylistic changes.
[SVN r79413]
2012-07-11 14:45:44 +00:00
Jurko Gospodnetić
2049470934 Boost Jam now again removes partially built targets in case of an interrupted command. Broken in revision [79341].
One scenario in which this bug occurs:

Prerequisites:
  - using the execunix.c implementation
       - may detect multiple finished jobs at the same time (in
         exec_wait()) and call all of their make_closure() callbacks in
         sequence
  - globs.max_jobs set to 2

Notes:
  - <<< X. f() >>> marks a function call f() made at depth X
  - [...] are additional comments about the current program state
  - We use the following target dependency tree (X <-- Y meaning Y is a
    dependency (source) for X):
      A
      B
      C <-- B
      D <-- B
      E <-- A, B


 <<< 1. make1() >>>
    ...
    <<< 2. make1c(B) >>>
        ...
        [stack: <empty>]
        [running jobs: A & B]
        <<< 3. exec_wait() >>>
            - detects job A as failed (which leaves a partially built
              target A)
            - detects job B as completed successfully
            <<< 4. make_closure(A) >>>
                - pushes state MAKE1D(A)
            <<< 4. make_closure(B) >>>
                - pushes state MAKE1D(B)

    [control returns to make1()]
    [stack: MAKE1D(A), MAKE1D(B)]
    [running jobs: <none>]
    - goes on to process the next state on the stack - MAKE1D(B)
    <<< 2. make1d(B) >>>
        - morphs its state node into MAKE1C(B)

    [control returns to make1()]
    [stack: MAKE1D(A), MAKE1C(B)]
    [running jobs: <none>]
    - goes on to process the next state on the stack - MAKE1C(B)
    <<< 2. make1c(B) >>>
        - pops its state off the stack
        - there are no more commands to execute for building B so that
          target is considered built and we notify its parents C, D & E
          about this by pushing MAKE1B(E), MAKE1B(D) & MAKE1B(C) states

    [control returns to make1()]
    [stack: MAKE1D(A), MAKE1B(E), MAKE1B(D), MAKE1B(C)]
    [running jobs: <none>]
    - goes on to process the next state on the stack - MAKE1B(C)
    <<< 2. make1b(C) >>>
        - there are no more dependencies target C has to wait for so it
          goes on to build target C by morphing its state to MAKE1C(C)

    [control returns to make1()]
    [stack: MAKE1D(A), MAKE1B(E), MAKE1B(D), MAKE1C(C)]
    [running jobs: <none>]
    - goes on to process the next state on the stack - MAKE1C(C)
    <<< 2. make1c(C) >>>
        - pops its state off the stack
        <<< 3. exec_cmd(C) >>>
            - runs a new job for building target C

    [control returns to make1()]
    [stack: MAKE1D(A), MAKE1B(E), MAKE1B(D)]
    [running jobs: C]
    - goes on to process the next state on the stack - MAKE1B(D)
    <<< 2. make1b(D) >>>
        - there are no more dependencies target D has to wait for so it
          goes on to build target D by morphing its state to MAKE1C(D)

    [control returns to make1()]
    [stack: MAKE1D(A), MAKE1B(E), MAKE1C(D)]
    [running jobs: C]
    - goes on to process the next state on the stack - MAKE1C(D)
    <<< 2. make1c(D) >>>
        - pops its state off the stack
        <<< 3. exec_cmd(D) >>>
            - runs a new job for building target D.
        - since we are already at the globs.max_jobs limit - wait for
          one of the jobs to complete
        <<< 3. exec_wait() >>>
            - detects job C as interrupted
            <<< 4. make_closure(C) >>>
                - raises the intr interupt flag
                - pushes state MAKE1D(C)

    [control returns to make1()]
    [stack: MAKE1D(A), MAKE1B(E), MAKE1D(C)]
    [running jobs: D]
    - goes on to process the next state on the stack - MAKE1D(C)
    - intr is set - pops the MAKE1C(D) state from the stack
        - as an unrelated issue, note that from now we are accessing the
          MAKE1C(D) stack node information from 'released memory' which
          smells but works fine as long as we do not push another state
          on the stack due to the way released node memory is managed
          internally - via a separate 'free list' to be reused instead
          of actually releasing it
    <<< 2. make1d(C) >>>
        - morphs its (already popped!) state node into MAKE1C(C)

    [control returns to make1()]
    [stack: MAKE1D(A), MAKE1B(E)]
    [running jobs: D]
    - goes on to process the next state on the stack - MAKE1B(E)
    - intr is set - pops the MAKE1B(E) state from the stack
    <<< 2. make1b(E) >>>
        - there are more unbuilt dependencies (A) left for target E so
          it just wants to pop its state off the stack but since that
          state has already been popped it actually pops off the next
          state MAKE1D(A)

    [control returns to make1()]
    [stack: <empty>]
    [running jobs: D]
    ...

  As you can see in the last shown state, the MAKE1D(A) state got popped prematurely and never got processed - thus causing the partially built target A never to be removed.

  There are several issues present in this scenario and fixing any of them would solve the problem at hand. This commit just picks 'the easiest one'.

[SVN r79412]
2012-07-11 06:30:11 +00:00
Jurko Gospodnetić
f8f1a93154 Boost Jam code cleanup.
[SVN r79411]
2012-07-11 05:05:45 +00:00
Jurko Gospodnetić
0c986af085 Recommitting the rest of the valid changes reverted in revision [79321].
[SVN r79410]
2012-07-11 04:58:43 +00:00
Jurko Gospodnetić
ed56af5717 Restoring Boost Build & Jam changes from revisions [79281 - 79310] (inclusive) previously temporarily reverted in revision [79321]. This is done to test whether the problem causing the original revert was introduced in revision [79311] (a bug has been found in that revision that could cause the observed Boost Jam crashes). Remaining reverted changes will be reverted if we do not detect any Boost library tester failures with this revision.
[SVN r79402]
2012-07-10 15:27:58 +00:00
K. Noel Belcourt
dc8e3d28bc Fix buffer output so newline is actully written to
cmd buffer.  Also move some closure diagnostics to
avoid interleaved output (no functional change, just
better encapsulation).



[SVN r79341]
2012-07-08 02:36:24 +00:00