bugmake - Bugs: bug #19298, simplify automatic generation of...

 
 

bug #19298: simplify automatic generation of prerequisites example

Submitted by:  None
Submitted on:  Sun 11 Mar 2007 05:38:48 PM UTC  
 
Severity: 1 - WishItem Group: Documentation
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.81Operating System: Any
Fixed Release: NoneTriage Status: Medium Effort

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 03 Oct 2011 10:21:21 AM UTC, comment #3:

I would not discuss too much on this issue (4 years already!). The first example works indep. of compiler used, second works for gcc.

The request is then to remove the given example in the manual and replace it with:

--------------------------------

Using gcc as compiler, one can also use -MT and -MF:

--------------------------------

For the rest, I would make another bug request. Afaik the section is very clear, and I don't need to be convinced any further that it is useful.

Patrick M. <fuujuhi>
Sun 02 Aug 2009 11:33:05 PM UTC, comment #2:

It's more than time to rework this section of the manual to document the newer method of handling automatic prerequisite generation.

Then the question becomes, what example can we use to show the power of automated makefile rebuilds? I think we might need a section in the manual discussing dynamic makefile creation options. We can start with constructed variable names, then move to included makefile generation, and end up with the most complex: eval. We'll need to think up a good set of examples to show the various options and when they're appropriate.

Paul D. Smith <psmith>
Project Administrator
Sun 11 Mar 2007 06:29:00 PM UTC, comment #1:

Unfortunately not every compiler supports these options. The GNU make manual does not assume that everyone is using GCC.

Specialized commands for use with GCC could perhaps be added as an alternative to the generic method.

Paul D. Smith <psmith>
Project Administrator
Sun 11 Mar 2007 05:38:48 PM UTC, original submission:

in section 4.14 Generating Prerequisites Automatically

the example is quite complex using sed to add the *.d files as target. there are easier ways to do that.

using an extra echo
%.d : %.c
@echo -n $@" " > $@
$(CC) $(CFLAGS) -MM $< >> $@

using gcc options -MT and -MF
%.d : %.c
$(CC) $(CFLAGS) -MM -MT $@ -MT $(basename $@).o -MF $@ $<

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 fuujuhi (Posted a comment)
  • -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 02 Aug 2009 11:33:05 PM UTCpsmithTriage StatusNone=>Medium Effort
    Sun 11 Mar 2007 06:29:00 PM UTCpsmithSeverity3 - Normal=>1 - Wish

    Back to the top


    Powered by Savane 3.1-cleanup1