Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] _make: target: handle "make -C dir"



Mikael Magnusson wrote on Fri, 23 Aug 2019 10:40 +00:00:
> On 8/23/19, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > Daniel Hahler wrote on Thu, Aug 22, 2019 at 08:37:53 +0200:
> >> `$basedir` defaults to `$PWD`, so it is ok to pass it always (I assume).
> >
> > If the current working directory has been deleted, «$PWD» and «./» may refer
> > to different directories.
> 
> I think you won't have much success running make in a deleted directory.

I would, if it's been recreated:

[[[
% cd "$(mktemp -d)"
% rm -rf $PWD
% mkdir $PWD
% printf 'all:\n\ttrue\n' > $PWD/Makefile
% make -C $PWD
make: getcwd: No such file or directory
make: Entering directory '/tmp/tmp.ko7oZrXDP2'
true
make: Leaving directory '/tmp/tmp.ko7oZrXDP2'
% echo $?
0
% 
]]]



Messages sorted by: Reverse Date, Date, Thread, Author