Jeff Tanner Jeff Tanner - 11 months ago 95
Linux Question

Makefile as simlink: not found

Is it possible to have a Makefile referenced by a simlink, and try calling action using make?

I am experiencing that calling make in a directory where Makefile is a simlink, Makefile is not found.

I have a need to reduce replication of Makefiles, and I would prefer using simlinks.


mko mko
Answer Source

It should work just fine:

├── Makefile
└── mylink -> Makefile
cd test
make -f mylink
cat mylink
        @echo "Hello"