#1216: [PATCH] Fix dependency in docs/Makefile
----------------------+-----------------------------------------------------
 Reporter:  doughera  |       Owner:  jkeenan 
     Type:  bug       |      Status:  assigned
 Priority:  normal    |   Milestone:          
Component:  build     |     Version:  1.7.0   
 Severity:  medium    |    Keywords:          
     Lang:            |       Patch:  new     
 Platform:            |  
----------------------+-----------------------------------------------------
Changes (by doughera):

  * patch:  => new


Comment:

 Replying to [comment:1 jkeenan]:

 > What am I missing?  What should be different or improved once the patch
 is applied?

 Hmm.  email2trac appears to have dropped my reply.  It correctly shows up
 on the parrot-tickets list at http://lists.parrot.org/pipermail/parrot-
 tickets/Week-of-Mon-20091102/005432.html but it didn't show up here in
 Trac.
 Let me try again.

 It's a dependency problem.  The old version had:
 {{{
     all: doc-prep packfile-c.pod $(POD)
 }}}
 The doc-prep target creates the ops/ directory.  The $(POD) target
 puts stuff in the ops/ directory.  Obviously, it can't do that if the
 directory
 doesn't exist yet.  A make program is free to attempt
 all three targets in any order.  A parallel make program is free to
 try to make them all at the same time.  If the $(POD) target starts
 running before the doc-prep target, it will fail.

 My patch adds the dependency
 {{{
     $(POD): doc-prep
 }}}
 indicating that you can't make the $(POD) files in the ops/ directory
 until you've created the directory.

 I can think of three reasons why others might not have seen this.

 1. the docs/ops/ directory exists in a fresh svn checkout, but not in a
 release.  Since the directory already exists in the svn checkout, there is
 no
 problem in the svn checkout.

 2.  The docs/ops directory is created by the build process (if needed)
 but is not removed by 'make distclean'.  Thus cleaning and rebuilding
 doesn't expose the problem.

 3.  I suspect GNU might evaluate such targets left to right, so they get
 executed in the order you expect.  However, such order is not guaranteed.
 Even with GNU make, if there is a parallel make, there is no guarantee
 that the doc-prep would be done before the $(POD) target started.

 In short, my patch is designed to ensure that the directory exists before
 any documents are placed in it.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1216#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to