bugmake - Bugs: bug #35455, “Empty Recipes” documentation...

 
 

bug #35455: “Empty Recipes” documentation update

Submitted by:  Simon Wright <sjw>
Submitted on:  Sun 05 Feb 2012 05:11:29 PM UTC  
 
Severity: 3 - NormalItem Group: Documentation
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.80Operating System: POSIX-Based
Fixed Release: SCMTriage Status: Small Effort

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 29 Feb 2016 08:32:19 AM UTC, comment #2:

Thanks for that. Looking at it, I think the point is that

foo: bar-stamp

would leave make baffled about how it is supposed to make foo from bar-stamp; whereas

foo: bar-stamp ;

means that the way to do it is to do nothing (and rely on the side-effect); and also that there is now a reason to consider whether foo has changed as a result of the side-effect. I think this last point is why I needed to make the change to my Makefiles.

Simon Wright <sjw>
Mon 29 Feb 2016 06:47:23 AM UTC, comment #1:

I added a bit more text here. I'm not sure I captured everything but at least I made it less definitive that there's only one useful way to use empty recipes.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Sun 05 Feb 2012 05:11:29 PM UTC, original submission:

I found it necessary to use the “empty recipe” rule in circumstances which don’t seem to match those in the documentation (edition 0.71 as at http://www.gnu.org).

I’ve attached a Makefile with comments to indicate what works for me and what goes wrong.

In summary, I process a .uml file to extract the .norm files implied by its contents, and then process the .norm files to create .gen files. Most of this can be standardised, but there’s no way for standard processing to determine beforehand which .norm files are “contained” in a .uml file.

I created a .norm-stamp file whenever I’ve processed a .uml file, and then added a rule to say that many.uml “contains” a.norm and b.norm:

a.norm b.norm: many.norm-stamp

The first time I say “make a.gen”, all is well. If I then touch many.uml and say “make a.gen” again, make only gets as far as creating many.norm-stamp (and a.norm, b.norm); you have to run make again to regenerate a.gen.

I found that I can get the behaviour I need by adding an empty recipe:

a.norm b.norm: many.norm-stamp ;

Simon Wright <sjw>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #24990:  Makefile added by sjw (909B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by bgwf (had a very similar problem here)
  • -unavailable- added by sjw (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 29 Feb 2016 06:47:23 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>SCM
      Triage StatusNone=>Small Effort
    Thu 05 Jul 2012 02:09:58 PM UTCbgwfCarbon-Copy-=>Added bgwf
    Sun 05 Feb 2012 05:11:29 PM UTCsjwAttached File-=>Added Makefile, #24990

    Back to the top


    Powered by Savane 3.1-cleanup