[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #57680] Feature request "import"
From: |
Yannick DAVELUY |
Subject: |
[bug #57680] Feature request "import" |
Date: |
Mon, 27 Jan 2020 13:40:09 -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/?57680>
Summary: Feature request "import"
Project: make
Submitted by: ydaveluy
Submitted on: lun. 27 janv. 2020 18:40:07 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,
I developed a new feature that import a makefile.
It is similar to include feature except that if the imported makefile is in a
different directory all rules using relative path remains relative to the
imported makefile and not the parent one.
To achieve this, make does a chdir in the imported makefile directory before
reading it, prefix relative targets and prerequisites with the path of the
imported makefile and does a chdir before executing commands.
With import feature it is possible to do things like this:
$ path/to/a.mk:
relative_target : relative_prerequisite /prerequisite
cmd1
/target : relative_prerequisite /prerequisite
cmd2
$ b.mk
import path/to/a.mk
> make -f b.mk
In this example make will create the following rules:
path/to/relative_target : path/to/relative_prerequisite /prerequisite
cmd1
/target : path/to/relative_prerequisite /prerequisite
cmd2
cmd1 and cmd2 are executed in path/to/ directory.
This feature is on my repo:
https://github.com/ydaveluy/make/tree/feature_import
Can you give me a feedback ?
I can write some unit test and improve the code if needed.
Yannick
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57680>
_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #57680] Feature request "import",
Yannick DAVELUY <=