build: enable developer mode for all working trees

Developer mode was detected if `.git` was a directory.
Linked git working trees created by `git worktree add`
contain `.git` file instead of `.git` directory.
Developer mode was not detected for such directories.
Detect developer mode by the presence of `.git` path.

Fixes: bc46174338 ("build: enable a developer mode setting")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
This commit is contained in:
Dmitry Kozlyuk 2022-08-10 20:40:58 +03:00 committed by Thomas Monjalon
parent af00c9352e
commit 7ccd05e7b7

View File

@ -20,7 +20,7 @@ developer_mode = false
if get_option('developer_mode').auto()
if meson.version().version_compare('>=0.53') # fs module available
fs = import('fs')
developer_mode = fs.is_dir('.git')
developer_mode = fs.exists('.git')
endif
else
developer_mode = get_option('developer_mode').enabled()