home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume20 / dmake / patch02a next >
Encoding:
Text File  |  1991-06-29  |  7.5 KB  |  197 lines

  1. Newsgroups: comp.sources.misc
  2. From: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  3. Subject:  v20i076:  dmake - dmake version 3.7, Patch02a/12
  4. Message-ID: <csm-v20i076=dmake.172257@sparky.imd.sterling.com>
  5. X-Md4-Signature: 513035e78a9efa274c63a4aab8dfa7eb
  6. Date: Sat, 29 Jun 1991 22:24:05 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  10. Posting-number: Volume 20, Issue 76
  11. Archive-name: dmake/patch02a
  12. Patch-To: dmake: Volume 19, Issue 22-58
  13.  
  14. DMAKE 3.7 PATCH #2
  15. ------------------
  16. Priority:  Medium
  17.  
  18. Prerequisite:  dmake 3.7 patch level 1 full distribution.
  19.  
  20. Location:  You can obtain a copy of the patch from watmsg.uwaterloo.edu
  21.        via anonymous ftp from the directory pub/dmake.  The file is
  22.        dmake37-patch2.Z.  The patch is also submitted for posting
  23.        to comp.sources.misc.
  24.  
  25. Application:  Change directory to the source directory containing the
  26.           dmake sources and run the patch through /bin/sh.  It constructs
  27.           any required subdirectories and applies the patch program as
  28.           needed to apply patches to files.  If you obtain the patch
  29.           files from a news group then you must first build the patch
  30.           source by running all parts of the patch through unshar or
  31.           /bin/sh.
  32.  
  33. Acknowledgment:  Thanks to everyone who wrote with suggestions or bug fixes.
  34.           In most cases your fixes and/or suggestions were
  35.           incorporated into the sources.  Your continued input makes
  36.           dmake a better tool.
  37.  
  38.  
  39. DETAILS OF FIXES:
  40. -----------------
  41. - Fixed a bug in function.c.  If you used a $(shell ...) macro in a line
  42.   which got expanded from within the input buffer Buffer (eg. in a rule
  43.   definition) nasty things could happen since _exec_shell re-used Buffer
  44.   when it shouldn't have.
  45.  
  46. - Made sure that -v and -n flags do not take effect across a $(shell ...)
  47.   macro expansion.  This ensures that $(shell ...) recipes are always
  48.   executed when the macro is expanded and never contain noise from a -v
  49.   flag.  Dunno how I missed this the first time around.
  50.  
  51. - Fixed a bug that set Current_target to NULL when making successive recipe
  52.   lines individually.  This meant that temp files were being deleted late,
  53.   possibly from the wrong places, and hence not deleted at all.
  54.  
  55. - Fixed several inference bugs.  Nothing too major:
  56.  
  57.     1. a recipe of the form
  58.         %.foo:
  59.         @[
  60.            stuff ...
  61.         ]
  62.        didn't get the group recipe attribute attached to the %.foo node
  63.        so when the inference algorithm was run it failed to attach the
  64.        correct attribute to go along with the new recipe.
  65.  
  66.     2. Inference algorithm now marks for REMOVAL, ALL intermediate nodes
  67.        (it did this before too -- but by luck), and marks ALL nodes as
  68.        TARGETS, and all but the first node as being INFERRED.  I doubt
  69.        that anyone will notice these changes.  I had to have a really
  70.        screwy makefile to find the bug.
  71.  
  72. - Fixed $(shell ...) macro so that it can be nested to arbitrary depths.
  73.   It uses a single temporary file for the purpose and keeps reusing it for
  74.   each nested instance.  Works like a charm.
  75.  
  76. - Fixed bug in rulparse.c where an attribute flag variable was of type
  77.   int and not t_attr as it should be.  This caused problems on 16-bit
  78.   machines (reported by lots of people).
  79.  
  80. - Fixed a bug reported by paul@halserv2.hal.com, dmake.c line 373, would
  81.   dereference a NULL pointer if the hash table didn't contain an entry.
  82.  
  83. - Fixed a bug reported by paul@halserv2.hal.com, rulparse.c line 949
  84.   would dereference a NULL pointer if it tried to match a certain sequence
  85.   of %-meta rules.
  86.  
  87. - Fixed a bug reported by paul@halserv2.hal.com, make.c, the SET_TOKEN
  88.   call was getting called with a NULL pointer.
  89.  
  90. - Minor tweaks to the OS/2 scripts as reported by Frank Waley.  Should make
  91.   MSC compiles work now.
  92.  
  93. - Changed sysvr4/stdarg.h to ensure that va_dcl is defined.
  94.  
  95. - Modified man page.  The diffs would have been bigger than the source so
  96.   I just included new copies.
  97.  
  98.  
  99.  
  100. DETAILS OF ADDITIONS/CHANGES:
  101. -----------------------------
  102. - Added a sysvr3/pwd directory along with getcwd.c.  The reason for this
  103.   addition is to hopefully eliminate once and for all the annoying
  104.   "lost a child" bug.  If you see this bug appear then remake dmake with
  105.  
  106.     make sysvr3pwd
  107.     or  make xenixpwd
  108.  
  109.   Both create a version of dmake that uses a local version of getcwd rather
  110.   than the C-library version.  Thanks to Gwyn Dyer for providing the code
  111.   to getcwd.c.  I used his version as it compiled on a xenix machine and
  112.   seemed to be the more widely used one.  Thanks to all that sent me copies
  113.   of it.  I hope this gets rid of the lost child issue once and for all.
  114.  
  115. - The MSDOS version now behaves identically to the UNIX versions when
  116.   running recipes containing embedded cd calls.  I changed dmake to restore
  117.   the directory it was in prior to invoking a child process.
  118.  
  119.   The following recipe will now behave identically under UNIX and DOS
  120.  
  121.       all:
  122.         cd foo; make ...
  123.         cd fee; make ...
  124.  
  125.   Previously to this change, the DOS version of DMAKE would have been in
  126.   the foo directory after the first line of the recipe, and would not
  127.   find fee.
  128.  
  129. - Added the -B flag.  This is in response to several requests at supporting
  130.   spaces in front of recipe lines.  This does not come without a price.
  131.   By default the flag is off and tabs are required to start recipe lines
  132.   unless it is a group recipe.  If you turn the flag on, either through
  133.   supplying -B on the command line or by putting ".NOTABS := y" in the
  134.   makefile then when dmake scans non-group recipes they are terminated at
  135.   the first line that is only white space or contains no leading white space
  136.   and is either a macro definition or a rule definition.
  137.  
  138.   Consider the following makefile:
  139.  
  140.       all:
  141.     <tab>  echo hi there
  142.     <space>echo e:test
  143.     <tab>  echo hello
  144.  
  145.   By default the recipe for all is simply: "echo hi there", and the remaining
  146.   two lines are parsed as a new rule definition with the associated recipe
  147.   being "echo hello".  If you supply -B, then the recipe for 'all' is all
  148.   three lines above, since the second recipe line now begins with a space.
  149.   
  150.   If you change the makefile to contain:
  151.  
  152.       all:
  153.     <tab>  echo hi there
  154.  
  155.     <space>echo e:test
  156.     <tab>  echo hi there
  157.  
  158.   then the -B flag has no visible effect.  The makefile is parsed the
  159.   same in both cases as the first recipe is terminated by the empty line.
  160.   or a valid recipe rule.
  161.  
  162.   If you now change the makefile to contain:
  163.  
  164.       all:
  165.     <tab>  echo hi there
  166.  
  167.     <tab>  echo e:test
  168.     <tab>  echo hi there
  169.  
  170.   then by default all three lines form the recipe for 'all'.
  171.   Specifying -B terminates the first recipe after the first line and begins
  172.   a new rule definition with the line "echo e:test".
  173.  
  174.   In summary:
  175.       By default:  (no -B) a recipe is terminated by a line containing some
  176.            text that does not begin with a <tab>.
  177.  
  178.       Specify -B:  A recipe is terminated by a line that is only white space
  179.            or by a line containg text that contains NO leading
  180.            white space.
  181.  
  182.   You can use the .NOTABS macro to set/reset this behaviour at will from
  183.   within a makefile.  See the man page.
  184.  
  185. - Added OSRELEASE=coherent targets and directories to support Coherent
  186.   systems.  Patches provided by David Fenyes (dfenyes@thesis1.med.uth.tmc.edu).
  187.  
  188. - Added OSRELEASE=msdos OSENVIRONMENT=ztcdos targets and directories to
  189.   support making of dmake using Zortech C++ 2.1.  Patches provided by
  190.   David Engel (ods@utdallas.edu).
  191.  
  192. -- 
  193. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  194. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  195. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  196. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  197.