URL:
  <https://savannah.gnu.org/bugs/?57681>

                 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

    _______________________________________________________

Details:


Hello,

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
needed.

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:
https://github.com/ydaveluy/make/tree/feature_2nd_expansion_improvement

Thanks to give me your feedback.

Yannick







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57681>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/


Reply via email to