[bug #57681] 2nd expansion only for required targets

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[bug #57681] 2nd expansion only for required targets

Paul D. Smith

                 Summary: 2nd expansion only for required targets
                 Project: make
            Submitted by: ydaveluy
            Submitted on: lun. 27 janv. 2020 21:02:13 UTC
                Severity: 3 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.3
        Operating System: Any
           Fixed Release: None
           Triage Status: None




The second expansion of the prerequisites should be done only when a target is
needed. This could improve performances.

With this design it will be possible to include dependencies file only when

Actually the next pattern is often used:

deps:=$(patsubst %.o,%.d,${objects})

-include ${deps}
%.o : %.c
        ${GCC} ...

With this pattern all existing dependencies files are included even if only
one file needs to be recompiled.

If 2nd expansions were performed only when a target is needed, we could write
previous pattern like this:

%.o : %.c $$(get_dependencies %.d)

get_dependencies can be a user or builtin function that read the dependency
file and return the list of prerequisites.

I developed this enhancement in the following repo:

Thanks to give me your feedback.



Reply to this item at:


  Message posté via Savannah