home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dmake40.zip / readme / release < prev    next >
Text File  |  1994-10-23  |  18KB  |  438 lines

  1. dmake Version 4.0
  2. =================
  3. FULL RELEASE OF DMAKE, REPLACES VERSIONS 3.8, and 3.9 (never posted)
  4.  
  5. Nature: This distribution advances dmake to Version 4.0, patch level 0.
  6. ------- The release is an attempt at addressing obscure faults in dmake
  7.     and at providing some much needed new functionality.  See below
  8.     for details of enhancements and bug fixes.
  9.  
  10.     NOTE:  There is one minor syntactic change to the makefile format
  11.            See the Section "FUTURE FEATURES" below and insure that you do
  12.            not rely on the previous semantic meaning of the construct
  13.            whose meaning has changed.
  14.  
  15. Availability:
  16. -------------
  17.     dmake is available via anonymous ftp from plg.uwaterloo.ca as:
  18.  
  19.           pub/dmake/dmake38.tar.gz        - compressed tar archive
  20.           pub/dmake/dmake38.zip        - zip archive
  21.           pub/dmake/dmake38-msdos-exe.zip    - MSDOS executable zip archive
  22.           pub/dmake/dmake38.shar01        - xx part shar archive
  23.           ...                  (get all parts)
  24.           pub/dmake/dmake38.sharxx
  25.  
  26.     and comes in several archive formats.  Choose the one that best
  27.     suits your needs.
  28.  
  29.  
  30. DONATIONS TOWARDS REFERENCE MANUAL:
  31. -----------------------------------
  32.     I'm happy to announce that a new project has begun to create a
  33.     dmake reference manual and user guide.  This is being done using the
  34.     services of a technical writer.  The project's success depends to a
  35.     large degree on support that I receive from the NET community.  I have
  36.     carefuly considered how to approach this issue and have decided to
  37.     NOT change the status of dmake to 'shareware', but have rather decided
  38.     to ask for voluntary donations.
  39.  
  40.     If you find dmake useful to your endeavours then I would appreciate
  41.     a donation in support of the documentation project.  The suggested
  42.     donations are:
  43.  
  44.         $20    - if you are a private non-commercial user.
  45.         $50    - if you are a commercial or corporate user and
  46.               use dmake in support of your software development
  47.               efforts.
  48.  
  49.     I promise to accurately track donors and will insure them first
  50.     access to the reference manual when it is ready, which at this time
  51.     is estimated to be the start of the second quarter in 95.
  52.  
  53.     If you want to support this effort then please send a cheque or money
  54.         order in a suitable (to you), amount made out to:
  55.  
  56.         Dennis Vadura
  57.         Dept. of Computer Science
  58.         University of Waterloo
  59.         Waterloo, Ont.
  60.         Canada, N2L 3G1
  61.  
  62.     Your support will be greatly appreciated.
  63.  
  64.  
  65.  
  66. DETAILS OF ENHANCEMENTS/TWEAKS:
  67. ===============================
  68.  
  69. BUG FIXES:
  70. ----------
  71. - cleaned up the code to fully remove the notion of an initial .SETDIR target
  72.   and macro, had some remnants still present.
  73.  
  74. - If the first target in a file was a multi :: recipe then if any of the
  75.   :: rules had no recipes an erroneous error was issued.  This is now fixed and
  76.   all of the :: targets behave in a manner consistent with non-:: targets that
  77.   appear as the first target in the makefile.
  78.  
  79. - Fixed a bug with not properly setting the value of MAKESTARTUP if it was
  80.   given on the command line.
  81.  
  82. - Specifying -u would not remove inferred prerequisites, they are now forcefully
  83.   rebuilt and then removed if appropriate.
  84.  
  85. - $ (xx) now expands to just (xx), the $ is eaten.
  86.  
  87. - fixed a bug with erroneously freeing a directory string for a target.
  88.  
  89. - Under MSDOS the value of DirSepStr is now used to construct temporary file
  90.   names when $(mktmp ...) is called.  TMPDIR is still taken from the
  91.   environment only since this is what the standard UNIX versions of tempnam do.
  92.  
  93. - Cleaned up -k processing in conjuction with -P#, it now behaves as expected.
  94.  
  95. - under MSDOS/and related OS's surrounded the call to exec in spawn.c with
  96.   a getcwd/setcwd pair, this way we will be cd'ed to the same place we were
  97.   at before we ran the command.  DOS is broken this way.  This makes DOS scripts
  98.   behave more like UNIX scripts.  If you really want to say:
  99.  
  100.     cd foo
  101.     commands...
  102.  
  103.   Then you will have to use a group recipe, you can do that easier by specifying
  104.   the new .GROUP attribute.
  105.  
  106. - Fixed incompatibility with Augmake special target mapping, causing
  107.  
  108.      $(foo:suff1=suff2)
  109.  
  110.   to behave oddly.  It now behaves as Sun and GNU Make do.  Also suff1,
  111.   and suff2 can now be arbitrary strings not containing an '=' character.
  112.   Both are expanded before the substitution is performed.
  113.  
  114. - Macro expansion treated ':' as a modifier flag even in function macros.
  115.  
  116. - Fixed a small bug when parsing makefiles containing #'s in their recipe
  117.   texts and when -B was specified, things now work as expected.
  118.  
  119. - The inference engine was incorrectly using the value of PREP, fixed.
  120.  
  121. - Fixed the expansion of $(foo)/{x y z}.o to produce 
  122.     a/x.o a/y.o a/z.o
  123.   if foo = a, and
  124.     a b/x.o a b/y.o a b/z.o
  125.   if foo = a b and
  126.     a/x.o b/x.o a/y.o b/y.o a/z.o b/z.o
  127.   if the specified expansion is stated as:
  128.     {$(foo)}/{x y z}.o
  129.  
  130. - Fixed a nasty bug in stat.c where the result of Build_path was not dupped
  131.   when computing a new library path name.
  132.  
  133. - Modified COMMAND macro expansion to properly handle the expansion of
  134.   commands that result in new recipe line attributes.
  135.  
  136. - Fixed a "feature" that prevented the correct handling of :: recipes.
  137.  
  138.     a.o :: a.c b.h
  139.        echo "first recipe..."
  140.        touch a.o
  141.  
  142.     a.o :: a.y b.h
  143.        echo "second recipe..."
  144.  
  145.   now runs both recipes if b.h is newer than a.o.  It used to run only the
  146.   recipe for a.c.  This was contrary to the documentation, and is probably
  147.   not correct in general, in that by definition :: promisses to run all
  148.   recipes that are out of date not just those that are out of date while the
  149.   build continues.
  150.  
  151. - Fixed a bug with improper output on -n.  It now reports work
  152.   that it thinks should get done.  The actual make may however do less,
  153.   depending on how timestamps are actually modified during the run.
  154.  
  155. - Fixed a bug in detecting function macros, the following now works:
  156.   (caused a core dump before)...
  157.  
  158.      bar = a b c
  159.      foo = $(!null,$(bar:s/ /) -Lhithere)
  160.  
  161.      all:; echo $(foo)
  162.  
  163.   Thanks to "Brett M. Bergquist, brett.bergquist@corp.gdc.com" for pointing
  164.   it out, and for providing the inspiration for the fix..
  165.  
  166.  
  167. NEW EXTENSIONS:
  168. ---------------
  169. - added .EXIT special target to exit from parsing a makefile and ignore
  170.   the remainder to the end.  If verbose is set then a message is issued.
  171.  
  172. - Made the macros DIRSEPSTR, and DIRBRKSTR user settable.  The default setting
  173.   for the MSDOS version of DIRSEPSTR is now \\, this allows it to correctly
  174.   work for $(mktmp ...) diversions.
  175.  
  176. - Added two new attributes, and a command line option.
  177.     .GROUP when specified with a target says execute this targets recipe
  178.     as if it were a group recipe specified in [ ... ] notation.
  179.  
  180.     .IGNOREGROUP is an attribute variable that when set to "yes" says
  181.     don't assume that a recipe line beginning with '[' is a group recipe.
  182.     This in effect turns off group recipe parsing at the granularity of
  183.     a single target or globally if specified alone in the makefile.
  184.  
  185.     -g is equivalent to saying .IGNOREGROUP:=yes at the start of startup.mk
  186.     file.
  187.  
  188. - Path name construction for stat'ed targets has been modified to ignore './'
  189.   entries and to reduce 'foo/..' sequences to NULL.  That is, it makes little
  190.   sense to have a path that cd's to a directory and then back up.  This may
  191.   result in having the value of $@ be somewhat unexpected depending on
  192.   settings of .SOURCE and their friends.  However this is infact the correct
  193.   behaviour since the resolved pathname and the target name (as used internally)
  194.   are not the same.  dmake treats the resolved pathname as an attribute of the
  195.   target that may infact be different from the target name itself.
  196.  
  197. - dmake attempts to make targets of .INCLUDE if the name cannot be found in
  198.   any of the subdirectories specified in .INCLUDEDIRS.  Specifying .INCLUDE
  199.   .IGNORE causes dmake to not terminate if a prerequisite of .INCLUDE cannot
  200.   be made.
  201.  
  202. - Added a .FIRST attribute for .INCLUDE special targets.  Specifying .FIRST
  203.   on a .INCLUDE line will attempt to include each named prerequisite and will
  204.   halt after finding the first prerequisite that exists.  If no prerequisite
  205.   is successfully included and .IGNORE was not specified then an error is
  206.   issued.
  207.  
  208. - Created new variable .NAMEMAX which when set to an integer value bounds the
  209.   maximum length of a file name component.  By default it is set to the
  210.   compiled value NAME_MAX.
  211.  
  212. - $(shell,expand stuff) is a modification to $(shell ...) that causes the
  213.   result to be expanded before it is returned.  if ',expand' is not specified
  214.   then the result is not expanded.  The addition of expansion together with
  215.   the new $(assign ...) macro allows external files to be read and to have them
  216.   define macros as a result of the $(shell ...) execution.
  217.  
  218.  
  219. NEW FEATURES:
  220. -------------
  221. - Generalized the expansion of Dynamic prerequisites.  Specification of
  222.   $$(foo) as a prerequisite is recursively expanded until the current cell
  223.   contains no $ signs.  If the expansion results in multiple white space
  224.   separated tokens they are inserted into the prerequisite list in place of
  225.   the initial dynamic prerequisite.  If the new list contains additional
  226.   dynamic prerequisites then they will be expanded when they are processed.
  227.   NOTE:  there is a limit on the number of times the same prerequisite can be
  228.   recursively dynamically expanded, it is controlled by the setting of the
  229.   macro DYNAMICNESTINGLEVEL, and is set to 100 by default.  Thus the same
  230.   prerequisite can be expanded dynamically a 100 times before dmake gives
  231.   up with an error.
  232.  
  233. - Added -w and -W (whatif command line flags) and also significantly fixed up
  234.   the processing for -n, to actually produce sensible output.
  235.  
  236. - Added '!' macro prefix indicating that the macro assignment is to be forced.
  237.   That is, don't complain if the macro has been previously expanded.  This can
  238.   be used for single macro assignments:
  239.  
  240.     foo := stuff
  241.     foo !:= silently blow away stuff in foo
  242.     foo !+:= add this silently to previous value of foo
  243.  
  244.   or in conjunction with .SILENT as in:
  245.  
  246.     __.SILENT !:= $(.SILENT)
  247.     change stuff to your hearts content...
  248.     .SILENT !:= $(__.SILENT)
  249.  
  250. - Added a $(macro:e) extension for returning the suffixes of a file list
  251.   in the macro.
  252.  
  253. - Added a $(macro:u) and $(macro:l) modifiers for converting the macro value
  254.   to all upper case and lower case respectively.
  255.  
  256. - Added a $(macro:i) modifier.  It returns the inferred names for targets as
  257.   given in a $< macro.  For example:
  258.  
  259.     .SOURCE : objs
  260.     OBJS = x.o y.o
  261.  
  262.     all:$(OBJS); echo $(OBJS:i)
  263.  
  264.    will produce
  265.  
  266.     objs/x.o y.o
  267.  
  268.    if x.o is found in the subdirectory 'objs'.  The 'i' modifier can be
  269.    mixed with all other modifiers.
  270.  
  271.  
  272. - Added the .ROOT special target, it is the top level target that dmake builds
  273.   when it starts to build targets.  Also all user specified targets, either
  274.   through the command line or by default in the makefile, are made prerequisites
  275.   of the special target .TARGETS.  By default dmake sets up the relationship
  276.   that .ROOT depends on .TARGETS, and the world gets made.  This allows you
  277.   to customize within the makefile the order of building targets as well as
  278.   which target is made first.  For example the default makefiles come with
  279.   settings for .ROOT that specify:
  280.  
  281.      .ROOT .PHONY .NOSTATE .SEQUENTIAL : .INIT .TARGETS .DONE
  282.  
  283.   with .INIT and .DONE defined as:
  284.  
  285.      .INIT .DONE :;
  286.  
  287.   which nicely emulates the behaviour of Sun's make extensions.  The building
  288.   of .ROOT's prerequisites is internally always forced to be sequential.
  289.  
  290. - Added dynamic macro assignment for use in recipes and otherwise.
  291.   $(assign string) parses string as if it were a macro assignment string.
  292.   string must contain a valid macro assignment, otherwise an error is issued.
  293.  
  294.     eg. $(assign foo := fred)
  295.         $(assign $(indirect_macro_name) +:= $(morejunk))
  296.  
  297.   The result of this macro assignment is the name of the macro that was
  298.   assigned, and NULL if the expression is not a valid assignment.
  299.  
  300. - Added a new macro modifier $(foo:^prefix) where prefix is either a quoted
  301.   string "string" that is prepended to each token found in
  302.   the value of $(foo) or prefix is a macro expression beginning with $, in
  303.   which case prefix is expanded and the result is prepended to each token
  304.   found in $(foo).
  305.  
  306. - Added a new macro modifier $(foo:+suffix) where suffix is either a quoted
  307.   string "string" that is appended to each token found in
  308.   the value of $(foo) or suffix is a macro expression beginning with $, in
  309.   which case suffix is expanded and the result is appended to each token
  310.   found in $(foo).
  311.  
  312. - You can now put $$@ into .SETDIR attribute strings, and the name of the
  313.   target to be built is used for the attempted CD.  Note that the final
  314.   value of $@ will depend on the result of the stat search which is done
  315.   after the change directory call forced by the .SETDIR attribute.
  316.  
  317. - Added a new function macro $(nil args) that always returns "", no matter what
  318.   its arguments are.
  319.  
  320. - Added directory caching.  It is enabled by default and causes dmake to
  321.   cache the timestamps of entries in a directory the first time the directory
  322.   is visited.  Dmake tracks entries and performs actual stats as required
  323.   to collect new timestamps, but does not perform stats on potential targets
  324.   during inference after reading the directory contents the first time.
  325.  
  326.   setting .DIRCACHE=yes enables directory cache, and setting .DIRCACHE=no
  327.   disbles it.  It is on by default.
  328.  
  329. - Added conditional macros.
  330.  
  331.      You can now say the following:
  332.  
  333.     target ?= MacroName MacroOp Value
  334.  
  335.      This creates a definition for MacroName whose value is Value
  336.      only when target is being made.  You may use a conditional macro
  337.      assignment anywhere that a regular macro assignment may appear, including
  338.      as the value of a $(assign ...) macro.
  339.  
  340.      The new definition is associated with the most recent cell definition
  341.      for 'target'.  If no prior definition exists then one is created.  The
  342.      implications of this are immediately evident in the following example:
  343.  
  344.     foo := hello
  345.  
  346.     all : cond;@echo "all done, foo=[$(foo)] bar=[$(bar)]"
  347.  
  348.     cond ?= bar := global decl
  349.  
  350.     cond .SETDIR=unix::;@echo $(foo) $(bar)
  351.     cond ?= foo := hi
  352.  
  353.     cond .SETDIR=msdos::;@echo $(foo) $(bar)
  354.     cond ?= foo := hihi
  355.  
  356.      The first conditional assignment creates a binding for 'bar' that is
  357.      activated when 'cond' is made.  The bindings following the :: definitions
  358.      are activated when their respective recipe rules are built.  Thus the
  359.      first binding serves to provide a global value for 'bar' while any of the
  360.      cond :: rules are processed, and the local bindings for 'foo' come into
  361.      effect when their associated :: rule is processed.
  362.  
  363.      Conditionals for targets of .UPDATEALL are all activated before the
  364.      target group is made.  Assignments are processed in order.  Note that
  365.      the value of a conditional macro assignment is NOT AVAILABLE until the
  366.      associated target is made, thus the construct
  367.  
  368.     mytarget ?= bar := hello
  369.     mytarget ?= foo := $(bar)
  370.  
  371.      results in $(foo) expanding to "", if you want the result to be "hello"
  372.      you must use:
  373.  
  374.     mytarget ?= bar := hello
  375.     mytarget ?= foo  = $(bar)
  376.  
  377.      Once a target is made any associated conditional macros are deactivated
  378.      and their values are no longer available.  Activation occurrs after all
  379.      inference, and .SETDIR directives have been processed and after $@ is
  380.      assigned, but before prerequisites are processed; thereby making the set
  381.      conditional macro values available during construction of prerequisites.
  382.  
  383.      If a %-meta rule target has associated conditional macro assignments,
  384.      and the rule is chosen by the inference algorithm then the conditional
  385.      macro assignments are inferred together with the associated recipe.
  386.  
  387. - Enhanced the processing of .UPDATEALL, the following constructs are now
  388.   allowed:
  389.  
  390.     a b .UPDATEALL : c
  391.  
  392.     a b .UPDATEALL :: d
  393.  
  394.   A .UPDATEALL causes all targets on the left to be treated as a single target
  395.   all are updated whenever any one of them is made.  As a sideffect, such
  396.   targets are sorted in ascending alphabetical order, when any one of the
  397.   group is constructed the value of $@ is the one that is first in the sorted
  398.   set.
  399.  
  400.  
  401. FUTURE FEATURES:
  402. ----------------
  403. In the future the functionality of .UPDATEALL will be extended to %-meta
  404. rules as will the ability to infer multiple prerequisites.  Thereby allowing
  405. inference of multiple targets from multiple prerequisites.  In preparation
  406. for this functionality the following change was made to the parser.
  407.  
  408.     %.o : %.c %.f ; recipe
  409.  
  410.   used to be equivalent to:
  411.  
  412.     %.o : %.c ; recipe
  413.     %.o : %.f ; recipe
  414.  
  415.   It now means defaults to:
  416.  
  417.     %.o : %.c ; recipe
  418.  
  419.   you must specify:
  420.  
  421.     %.o :| %.c %.f ; recipe
  422.  
  423.   to get the old behaviour.  This is due to the fact that construction of
  424.   the internal target graph has been been altered but the inference engine
  425.   has not yet been updated to utilize the new functionality (I ran out of
  426.   time).
  427.  
  428.  
  429. ACKNOWLEDGEMENTS:
  430. =================
  431.     Thanks to all who submitted code for new features, suggestions for
  432.     improvements, and bug fixes.  I have tried to make sure no gotchas
  433.     remain, if you encounter problems installing or running dmake please
  434.     let me know.  As always, I am always happy to receive e-mail.
  435.  
  436.     Many have contributed suggestions and bug fixes that make this
  437.     release possible.  The NET thanks you.
  438.