make - Support: sr #105552, (include subdir/Makefile) extra...
You are not allowed to post comments on this tracker with your current authentication level.
sr #105552: (include subdir/Makefile) extra option to change directory. This option is hopefully much better than recursive make.
Submitter: | None | ||
Submitted: | Sat 09 Sep 2006 04:04:45 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Severity: | 1 - Wish | Status: | None |
Privacy: | Public | Assigned to: | None |
Originator Email: | -email is unavailable- | Open/Closed: | Open |
Operating System: | Any |
Mon 11 Sep 2006 09:33:18 AM UTC, comment #2: |
Anonymous |
Sat 09 Sep 2006 05:49:28 PM UTC, comment #1: I agree that recursive make has some serious issues. However, I don't see how your suggestion would work in practice. First, make could only modify target and prerequisite names; any filenames that were contained in command scripts could not be modified. Although a well-written makefile will use automatic variables for most of the file references, there are those that don't which could be confusing.
|
Paul D. Smith <psmith>![]() |
Sat 09 Sep 2006 04:04:45 PM UTC, original submission:
(include subdir/Makefile) extra option to change directory or new command.
|
Anonymous |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2006-09-09 | None | Carbon-Copy | - | ![]() |
Added -ej tillgänglig- |
sr #105552
I have done some thinking and experimenting and come up with "included targets".
All targets in the included targets are built using the rules from the file that the target was included from. The dependency tree is built using all rules.
Implicit rule that automatically try to use the makefile to build the target using the makefile in the targets directory would be great (it actually does exactly this for the current directory and it has an alghoritm for rule search).
Extra comments:
I use to think of the Makefile as a way to express dependencies and rules how to update them.
I have seen that using variables and repeat the build rule is very common I prefer using implicit rules because the dependencies become clearer.
I currently use a method there i add the directory to all Makefiles.
It requires discipline (easy to make errors) and extra writing and is hard to read and if I want to include targets from another makefile I have to use recursive make (considered harmful because it doesn't build the whole dependency tree).
The file can never know from which directory it will be included using the current directory as a starting point seems like a very good idea.
Everything that is incuded is global. Targets in the included file could work different if it's inlcuded than run alone.