bug-make
[Top][All Lists]
Advanced

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

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


From: Yannick DAVELUY
Subject: [bug #57681] 2nd expansion only for required targets
Date: Mon, 27 Jan 2020 16:02:14 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0

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

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