# # There are a number of modifications made to Jam which you can either # accept or reject as you wish. # # # To turn on one of these features, either alter the default below or # set it on the Jam command line, like: # jam -sHeaderCache=1 # # CWM, 2001. AllOptions ?= "" ; DynamicCommandSize ?= True ; ImprovedWarnings ?= True ; SerialOutput ?= True ; SlashModifiers ?= True ; HeaderCache ?= True ; OptionalHeaders ?= True ; GraphDebugDump ?= True ; DebugFateChanges ?= True ; LargeBuildOutput ?= True ; TimeStamps ?= True ; DebugOutputMods ?= True ; NocareNodes ?= True ; PercentDone ?= True ; ExportJobNum ?= True ; JobSlotExpansion ?= True ; PrintTotalTime ?= True ; W32GetReg ?= True ; Semaphore ?= True ; IntrFix ?= True ; EnvFix ?= True ; # ---------------------------------------------------------------------- # A rule that checks a variable, if its set, it adds the define to the # list of defines OPT_DEFINES = ; rule config { if $($(<)) || $(AllOptions) { OPT_DEFINES += $(2) ; ECHO "Config:" $(<) is on ; $(<) = True ; # Turn on if all options is on } else { ECHO "Config:" $(<) is off ; } } if $(AllOptions) { ECHO "Config:" AllOptions is on ; } else { ECHO "Config:" AllOptions is off ; } # ---------------------------------------------------------------------- # A note on the names of the defines. # # An optional part of Jam is initially an extension. # # If an extension is accepted into to the mainline, its define is either # removed completely and the code simply placed into the mainline in a # non-conditional manner, or the EXT extension is dropped and it remains # conditional. # # For example, if the header cache code is accepted into the mainline but # as a continuing option to the build, the define would be OPT_HEADER_CACHE, # not OPT_HEADER_CACHE_EXT. # # Or something like that. Just an idea. # When creating the actions command buffer, dynamically grow the buffer # to as large as needed. Even though some shells are not able to accept # very large buffers - some OSs support amazingly large commands. Multi # mega-byte commands are ok on Solaris, HPUX, Linux, etc # # Craig McPheeters, 2001. config DynamicCommandSize : OPT_DYNAMIC_COMMAND_SIZE_EXT ; # Try to associate a filename and line number with errors and warnings # # Craig McPheeters, 2001. config ImprovedWarnings : OPT_IMPROVED_WARNINGS_EXT ; # Actions write their output into temporary files. When an action # completes, the files contents are displayed along with the associated # jam action line. This serializes the output from Jam - however it # introduces a latency in that you don't see what Jam is doing as it # works on an action, you only see the results afterwards # # Craig McPheeters, 2001. config SerialOutput : OPT_SERIAL_OUTPUT_EXT ; # Add support for the variable expansion modifiers: # $(foo:/) - which converts all \ characters to /, and # $(foo:\) - which converts all / characters to \ # These are useful mainly on NT to get the pathname syntax you want # # Craig McPheeters, 2001. config SlashModifiers : OPT_SLASH_MODIFIERS_EXT ; # The header cache is used to cache the results from the scan of each # file to find headers. Pretty much as it sounds. # # When Jam is started, the header cache is read into a hash table. Then # as each file is about to be scanned for headers, it is looked up in # the cache, and if its there and the files timestamp agrees with the # cache then the cache's results are used. This is really useful for large # builds. # # Craig McPheeters, 2001. config HeaderCache : OPT_HEADER_CACHE_EXT ; # This option allows you to ignore header dependencies when building with # Jam. If you are working with a large system, and you have modified a # low level header, you may want to delay the full build Jam would do # when it sees the dependencies that are out of date. By building with # this option, you can specify a command line argument to have include # file dependencies ignored for a build: jam -p # # Craig McPheeters, 2001. config OptionalHeaders : OPT_HEADER_OPTION_EXT ; # This option enables two new debugging levels. The first, debug level # 10 outputs a more readable form of the dependency graph. This may be # useful for people trying to understand a problem with the dependency # graph # # The second new debug level is debug level 11. This shows more # information about the fate of each target, as it is processed in make0(). # The debug level 10 extension shows you the final state of the targets. # There are times when this is insufficient to know why a target is being # updated. Debug level 11 gives a little information on why a targets fate # is changed from stable, to newer, update, missing, etc. # # Craig McPheeters, 2001. config GraphDebugDump : OPT_GRAPH_DEBUG_EXT ; # This option controls a variety of minor mods to the output of Jam which # I found more suitable when working with large systems. YMMV. # # Craig McPheeters, 2001. config LargeBuildOutput : OPT_LARGE_BUILD_EXT ; # This option places time stamps on various output messages in jam. I # found this useful to guage the performance of long builds to find # where most of the time was spent, to compare build performance between # machines, or to compare the effect on a build of any changes you are # making. # # Craig McPheeters, 2001. config TimeStamps : OPT_TIME_STAMP_OUTPUT_EXT ; # Various minor mods to the debug level 4, execcmds() level. # # Craig McPheeters, 2001. config DebugOutputMods : OPT_OUTPUT_MOD_EXT ; # This option allows you to mark an intermediate node as being # NOCARE. If an action related to the building of this node fails, # any dependencies on this NOCARE node continue anyway. This is useful # when partial results from the build are useful. # # Craig McPheeters, 2001. config NocareNodes : OPT_NOCARE_NODES_EXT ; # This displays the percentage of the build which is done, as each # rule is printed out # # Craig McPheeters, 2001. config PercentDone : OPT_PERCENT_DONE_EXT ; # Create Jam variables which shows how many jobs have been requested, # if the build is using more than one job, and a list of the job # numbers. These variables can be used in a variety of ways. # # Craig McPheeters, 2001. config ExportJobNum : OPT_EXPORT_JOBNUM_EXT ; # When building some objects, there may be conflicts between shared files # being accessed by more than one jam job. For example, when processing # yacc .y files, there are intermediate files created. If more than one # action processes yacc files at the same time, these temporary files may # collide. Most Unix shells allow you to easily incorporate a process id # into a filename, via the $$ expansion. NT's cmd.exe doesn't allow this. # This extension allows a portable method for creating temporary file # names, among other uses. Jam has a variable number of slots it can run a # command from, depending on the value of the '-j' argument. This # extension replaces a '!!' sequence in the action block with a two digit # representation of the jam slot the action is running in. There is a # maximum of 64 jobs enforced by jam, two digits is sufficient to represent # the job slot. # # The other way for jam to communicate the job slot being used by an acion # is via the '!' character in the JAMSHELL for the action. This extension # may potentially interfere with some given syntax in an action block, if # the !! character sequence is used in a different way. This hasn't been # a problem for me, and I prefer the ease of getting the job slot via this # extension. YMMV. # # Craig McPheeters, 2001. config JobSlotExpansion : OPT_JOB_SLOT_EXT ; # This extension is from Matt Armstrong. For the original, see: # //guest/matt_armstrong/jam/patched_version/... # # If the total time jam runs is greater than 10 seconds, the time is # printed when jam exits. This helps people back up claims that the # build is too slow and they need a faster machine. ;-) # # Matt Armstrong, 2001. config PrintTotalTime : OPT_PRINT_TOTAL_TIME_EXT ; # This extension is from Matt Armstrong. For the original, see: # //guest/matt_armstrong/jam/patched_version/... # # Available only under WinNT (Win2k as well). Gets a value from the # registry, like so: # # value = [ W32_GETREG list ] ; # # This is primarily so Jam can find the location of the Visual C++ # installation from the registry, which makes it a bit easier to get # a build environment up and running. Otherwise, they would have to # set the MSVCDIR environment variable, either at Visual C++ install # time or by running the vcvars32.bat file that comes with Visual C++. # # Matt Armstrong, 2001. config W32GetReg : OPT_BUILTIN_W32_GETREG_EXT ; # When building, there are rare occassions when you just can't allow # multiple jobs to operate on the same object, or with the same file # at the same time. This is most often best expressed by setting up the # proper dependencies. There are occassions where the dependencies are not # able to express the relationships however. # # An example of this is on NT, related to PDB debug files used with # pre-compiled headers. Each set of files which are compiled with the same # pre-compiled header must use the same .pdb file as was used for the # pre-compiled header. Only one compile job that references the .pdb file # must be active at one time, as the compiler needs to open the file in # exclusive write mode. Its not a dependency on the file existing, its a # dependency that only one job access the file at one time, its a timing # rather than a dependency problem. # # Rather than doing a build with only one job active, using this extension # it is possible to identify portions of the graph which must be serialized # with respect to some file. This is done by creating a node which acts as # a semaphore, and assigning that node to the variable JAM_SEMAPHORE either # globally or on a set of targets. Only one job is able to be active at # one time for each semaphore node you create. # # This facility could also be used to ensure only one occurence of a certain # action type be launched at once. For example, if the link of some shared # objects consumes a lot of memory, you can set a semaphore on the links and # only one link at a time will be run. # # Note, that a dependency node used as a semaphore should not be part of # the graph, nothing should depend on them. A semaphore node does not get # normal dependency propogation. # # Craig McPheeters, April 2002. config Semaphore : OPT_SEMAPHORE ; # To test the semaphore extension, uncomment the following line # JAM_SEMAPHORE = .semaphore. ; # Get interruptions to halt jam earlier. Jam used to only check the interrupt # flag when traversing the graph. It now checks the flag when getting ready to # launching new commands as well # # Craig McPheeters, April 2002. config IntrFix : OPT_INTERRUPT_FIX ; # When importing the environment, if the variable has trailing spaces the old # code would incorrectly create a list with null elements. This fix tests that # the size of each list element when creating from the environment is non-null. # # Craig McPheeters, June 2002. config EnvFix : OPT_ENVIRONMENT_FIX ; # ---------------------------------------------------------------------- # Propogate the defines into the compiler flags if $(UNIX) { CCFLAGS += -D$(OPT_DEFINES) ; } else if $(NT) { CCFLAGS += /D$(OPT_DEFINES) ; } else { ECHO The build options are not supported on this platform. ; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#12 | 3183 | Craig Mcpheeters | Integration of my jam mainline branch into my work branch. | ||
#11 | 3182 | Craig Mcpheeters | Update of my work branch. | ||
#10 | 1664 | Craig Mcpheeters | A new extension - semaphores | ||
#9 | 1605 | Craig Mcpheeters |
Updated with respect to my copy at work. A few minor updates/enhancements |
||
#8 | 1484 | Craig Mcpheeters |
Integration from my mainline into my branch. Incorporation of the W32_GetReg stuff from Matt to set MSVCNT. Cool |
||
#7 | 1477 | Craig Mcpheeters |
Integration from my main jam branch. This is 2.4-dev with my extensions. |
||
#6 | 1347 | Craig Mcpheeters |
Integration from my public area. This is the latest header cache changes. |
||
#5 | 1188 | Craig Mcpheeters |
The latest updates from my A|W work copy. Added a -d11 debug mode, which outputs information on fate changes Create jam variables to show job (-jn) information, such as the number of jobs requested, whether or not there is more than one job, and a list of the job slot numbers. These can be used in a variety of ways in supporting multi-job builds Added jobs slot expansion to the action blocks, the sequence !! is replaced by the job slot the action is running in. Modified the special shell handling to include unix. It used to be that on Unix, you could create an action block which exceeded the size that execvp() could handle (perhaps only when the DynamicCommandSize option is enabled.) On NT, all non-default shells are invoked through a intermediate file. This modification does the same for unix shells. Improved the -d+10 debug level, the dependency graph. It now shows the flags on the node as well (NOUPDATE, NOTFILE, etc.) Only issue the '...skipped' messages for nodes which would have been built |
||
#4 | 1100 | Craig Mcpheeters |
Added a percent-done extension Converted the hcache file to ansi, as the rest of Jam was updated in 2.3 |
||
#3 | 1085 | Craig Mcpheeters |
Returned some changes to bring this copy in line with our internal version * Added some double quotes in the Jambase so we can compile files with spaces in the names * Updated our Jambase.aw from the Jambase * Added some debug/optim code to the Jamfile * Fixed a bug in command.c In my dynamic command size extension, it no longer took into account if a target was marked as piecemeal. Now it does * Fixed a bug in execunix.c In jam 2.3 the logic for when to invoke the interpreter directly, and when to go through an intermediate .bat file was changed. This was failing for us, as on NT, cmd.exe does not handle large lines. rc.exe was failing when it went through a .bat file. Reverted it to the 2.2 logic |
||
#2 | 785 | Craig Mcpheeters |
Integration from //guest/craig_mcpheeters/jam/src/... This work area now contains both the Alias|Wavefront changes, and the latest integrations from the mainline. There are some changes in this area which shouldn't be merged back into the mainline. As I merge this branch back into my jam/src/... branch, I'll leave out a few of the changes. |
||
#1 | 782 | Craig Mcpheeters |
Initial return of the Alias|Wavefront mods to jam 2.2. I made a stab at a configuration system - see the file Jamfile.config. Most of the mods are now enclosed within #ifdef blocks, which kind of pollutes the code, but may make it easier to accept or reject some of these changes. Some of these #ifdefs could disappear completely if they are accepted into the mainline This return implements the following extensions: * header cache * dynamic command block size, allowing for *large* commands * slightly improved warnings and errors * serial output from jam - nice when working with multiple jobs * an extension to variable modifiers: $(>:/) and $(>:\\) * ability to ignore header dependencies for a build (jam -p) * new debug level, -d+10, which outputs the dependency graph * added no-care support to internal nodes. if they fail, dependents are built anyway * time stamps on output * a few minor output modifications * a fix for nt batch file names conflicing when more than one jam runs at a time Each of the above can be enabled/disabled on the command line. For example, to turn on the HeaderCache code: jam -sHeaderCache=1 that is, build jam first, then use that jam to build a new one with the options you want. Some of these changes may have been made in the mainline already, my next step will be to integrate the mainline changes into these ones This return isn't yet ready for prime-time |