Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger: Errors at searching path for included makefiles #112

Open
TaiwanMadao opened this issue Aug 15, 2020 · 1 comment
Open

Debugger: Errors at searching path for included makefiles #112

TaiwanMadao opened this issue Aug 15, 2020 · 1 comment

Comments

@TaiwanMadao
Copy link

TaiwanMadao commented Aug 15, 2020

I have a directory [aaa] with Makefile & sub-directory as illustrated.
image
(The directory was compressed and please download from aaa.tar.gz )

At the beginnig, invoke remake in folder [aaa].
In folder [aaa], Makefile[1] would be read , and invoke remake in foler [bbb] with searching path added (-I'absolute_path'/aaa).
In folder [bbb], Makefile[2] would be read, include another.mk in folder [aaa] with searching path, and invoke remake in folder [ccc].
In folder [ccc], Makefile[2] would be re-read again, and include anotther.mk in folder [aaa] with searching path.
Without debugger, all is fine; however, with debugger step by step executed, the the path of included another.mk in Makefile[2] is wrong at first (but still includable) in folder [bbb]. Finally, in folder [ccc], the another.mk in Makefile[2] is not includable and debugger catch an error.

The following is the message given by remake. I also print the variable [.INCLUDE_DIRS] in every recipe in Makefile[1] & [2] to inspect the searching path of included files. It seems that the searching path was not correctly added to sub-folders.

remake -X
Reading makefiles...
Updating makefiles...
-> (/home/kwlee/aaa/another.mk:1)
Makefile:
remake<0> s
Updating goal targets...
-> (/home/kwlee/aaa/Makefile:1)
all:
remake<1> s
File 'all' does not exist.
Must remake target 'all'.
/usr/local/include /usr/local/include /usr/include
Makefile:2: target 'all' does not exist
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
remake -I/home/kwlee/aaa -C bbb
##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
++ (/home/kwlee/aaa/Makefile:1)
all
remake<2> s
Reading makefiles...
remake[1]: Entering directory '/home/kwlee/aaa/bbb'
Updating makefiles...
-> (/home/kwlee/aaa/bbb/another.mk:1)
Makefile:
remake<<0>> s
Updating goal targets...
-> (/home/kwlee/aaa/bbb/Makefile:8)
all:
remake<<1>> s
File 'all' does not exist.
Must remake target 'all'.
/home/kwlee/aaa /usr/local/include /usr/local/include /usr/include
Makefile:9: target 'all' does not exist
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
remake -C ccc -f ../Makefile
##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
++ (/home/kwlee/aaa/bbb/Makefile:8)
all
remake<<2>> s
Reading makefiles...
remake[2]: Entering directory '/home/kwlee/aaa/bbb/ccc'
Updating makefiles...
File 'another.mk' does not exist.
Must remake target 'another.mk'.
../Makefile:14: another.mk: No such file or directory
remake[2]: *** No rule to make target 'another.mk'. Stop.
remake[2]: Leaving directory '/home/kwlee/aaa/bbb/ccc'
Makefile:9: *** [all] error 2
#0 all at /home/kwlee/aaa/bbb/Makefile:8
***Entering debugger because we encountered a fatal error.
** Exiting the debugger will exit make with exit code 2.
!! (/home/kwlee/aaa/bbb/Makefile:8)
all

@rocky
Copy link
Owner

rocky commented Aug 16, 2020

Personally, this something I am not going to have time for in the foreseeable future.

And probably not something I'm that interested in until such time as I encounter this problem (if ever).

If you are others are interesting in invesigating, please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants