bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`cd foo && make` != `make -C foo`


From: Akim Demaille
Subject: `cd foo && make` != `make -C foo`
Date: Fri, 10 Nov 2017 17:36:11 +0100

Hi friends!

I have been bitten (or beaten, I guess both convey the same idea :)
but the following difference between `cd dir && make` vs.
`make -C dir`:

> $ cat foo.dir/Makefile
> all:
>         cd bar && make
>         make -C bar
> $ cat bar.dir/Makefile
> all:
>         pwd
> $ ls -l foo.dir
> total 8
> -rw-r--r--  1 akim  wheel  34 10 nov 14:11 Makefile
> lrwxr-xr-x  1 akim  wheel  10 10 nov 14:11 bar -> ../bar.dir
> $ make -C foo.dir
> cd bar && make
> pwd
> /private/tmp/foo.dir/bar
> make -C bar
> pwd
> /private/tmp/bar.dir


in other words, cd respects my symlinks, but make -C resolves them.
It turns out that on the project I work on, due to specific layout
constraints (golang trees…) resolving the symlink breaks everything.

So I cannot use -C.

Yet I did not see anything about this in the documentation, and I
don’t know whether this is on purpose.

Cheers!

(FWIW, observed with 3.81 and 4.2.1)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]