I have a Makefile that includes another makefile with the include makefile directive and the included Makefile exists on a deep path (200 characters). The Makefile doesn't produce any error on reading the long path Makefile however it's contents are not included in the main Makefile.
include <long-path>/my.mk
I have tried using UNC path post script as well but that also seems to have no effect. Any help how to handle long paths inclusions in Makefiles?
Asked
Active
Viewed 189 times
0

sbunny
- 433
- 6
- 25
-
You can try to use extended path format `\\?\C:\path\to\somewhere` or opt-in for an unlimited path length. See https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation. – raspy Jun 24 '21 at 12:18
-
\\?\ Doesn't work with Makefile and it produce no differences. – sbunny Jun 24 '21 at 13:39
1 Answers
0
There can be different ways on how you handle this:
- Provide Relative Path: A relative path refers to a location that is relative to a current directory, so you dont require to give a full path
- Keep your files/sandbox at very short location if possible: Eg:
C:
- You can use
mount
/shortpath
option to use short paths.

Altaf
- 2,838
- 1
- 16
- 8