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

 
 

bug #22442: Old-style cancelation of implicit rules

Submitter:  None
Submitted:  Fri 29 Feb 2008 01:09:57 AM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.81 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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 -email is unavailable- mailing list might be more productive.

Paul D. Smith <psmith>
Group 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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-06-07 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code