bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #19298] simplify automatic generation of prerequisites example


From: anonymous
Subject: [bug #19298] simplify automatic generation of prerequisites example
Date: Sun, 11 Mar 2007 17:38:49 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070302 Ubuntu/dapper-security Firefox/1.5.0.10

URL:
  <http://savannah.gnu.org/bugs/?19298>

                 Summary: simplify automatic generation of prerequisites
example
                 Project: make
            Submitted by: None
            Submitted on: Sunday 03/11/2007 at 17:38 UTC
                Severity: 3 - Normal
              Item Group: Documentation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.81
        Operating System: Any
           Fixed Release: None

    _______________________________________________________

Details:

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 $@ $<






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?19298>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]