News for hackers. Stuff that matters.
Re:Ask HN: Small scripts, hacks and automations you're proud... by evgpbfhnr on Thursday March 23, 2023 @07:54PM (#35283203)
I've been trying this for a few days and now noticed u-boot no longer builds with an output dir ( `make O=subdir whatever` ).

It sure took me ages to figure it was CDPATH, but CDPATH it is. I won't retry without making that "cd @" thing a subfunction (that might involve making its own completion, but that's easy compared to debugging make... I still don't know WHY it broke, just that it's CDPATH that broke it -- it decided to duplicate the subdir arg when invoking a submake so make was now left with a weird unknown target, but it obviously wouldn't say that and just failed weirdly)

Re:Ask HN: Small scripts, hacks and automations you're proud... by kkoncevicius on Saturday March 25, 2023 @01:41PM (#35305026)
Interesting, thanks for sharing. I would be tempted to call this a bug in the Makefile if this is the case. CDPATH is a standard bash environment variable, people use it in various ways: https://github.com/search?q=%22export+CDPATH%22&type=code

If all these causes the build to fail then the maintainers of that build should be informed.