bugmake - Bugs: bug #22442, Old-style cancelation of implicit...

 
 

bug #22442: Old-style cancelation of implicit rules

Submitted by:  None
Submitted on:  Fri 29 Feb 2008 01:09:57 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.81Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 07 Jun 2009 01:53:20 AM UTC, comment #2:

Closing. Feel free to re-open if you have more details. But, if you're just looking for help then the -unavailable- mailing list might be more productive.

Paul D. Smith <psmith>
Project Administrator
Fri 28 Mar 2008 03:56:02 AM UTC, comment #1:

I'm not sure your reading of POSIX is correct. It says:

-----
Inference rules can be redefined. A target that matches an existing inference rule shall overwrite the old inference rule. An empty rule can be created with a command consisting of simply a semicolon (that is, the rule still exists and is found during inference rule search, but since it is empty, execution has no effect). The empty rule can also be formatted as follows:

rule: ;

where zero or more <blank>s separate the colon and semicolon.
-----

To me this seems to reaffirm make's behavior: the rule exists and is found during inference rule search, but execution has no effect.

I think you can get the behavior you want by some combination of removing suffixes in .SUFFIXES, and perhaps changing the order in which they appear.

If not can you provide a simple test case? You can dummy out the actual compilation with touch and cp etc. commands.

Paul D. Smith <psmith>
Project Administrator
Fri 29 Feb 2008 01:09:57 AM UTC, original submission:

I'd like to write portable makefiles that avoid the "%"
mechanism, but this leaves me no way of cancelling implicit
rules. According to POSIX, it should be possible to cancel
a rule be writing something like

rule: ;

But in gnu make version 3.81, this only results in changing
rule so that it does nothing. For example if I want to
control how C++ gets compiled and linked I define

.cc.o:
My compile command

.o :
My link command

But in the special case where there is only one .cc file
needed to make an executable the default ".cc" rule kicks
in and bypasses my commands.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

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)
  •  

    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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Jun 2009 01:53:20 AM UTCpsmithStatusNone=>Not A Bug
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1